## wxTreeLayoutStored

wxTreeLayoutStored provides storage for node labels, position and client data. It also provides hit-testing (which node a mouse event occurred on). It is usually a more convenient class to use than wxTreeLayout.

Derived from

wxTreeLayout
wxObject

See also

wxTreeLayout

Members

wxTreeLayoutStored::wxTreeLayoutStored
wxTreeLayoutStored::AddChild
wxTreeLayoutStored::GetClientData
wxTreeLayoutStored::GetNode
wxTreeLayoutStored::GetNodeCount
wxTreeLayoutStored::GetNumNodes
wxTreeLayoutStored::HitTest
wxTreeLayoutStored::NameToId
wxTreeLayoutStored::SetClientData

### wxTreeLayoutStored::wxTreeLayoutStored

wxTreeLayoutStored(int noNodes = 200)

Constructor. Specify the maximum number of nodes to be allocated.

### wxTreeLayoutStored::AddChild

long AddChild(const wxString& name, const wxString& parent = "")

Adds a child with a given parent, returning the node id.

### wxTreeLayoutStored::GetClientData

long GetClientData(long id) const

Gets the client data for the given node.

### wxTreeLayoutStored::GetNode

wxStoredNode* GetNode(long id) const

Returns the wxStoredNode object for the given node id.

### wxTreeLayoutStored::GetNodeCount

int GetNodeCount() const

Returns the current number of nodes.

### wxTreeLayoutStored::GetNumNodes

int GetNumNodes() const

Returns the maximum number of nodes.

### wxTreeLayoutStored::HitTest

wxString HitTest(wxMouseEvent& event, wxDC& dc)

Returns a string with the node name corresponding to the position of the mouse event, or the empty string if no node was detected.

### wxTreeLayoutStored::NameToId

long NameToId(const wxString& name)

Returns the id for the given node name, or -1 if there was no such node.

### wxTreeLayoutStored::SetClientData

void SetClientData(long id, long clientData)

Sets client data for the given node.