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
See also
Members
wxTreeLayoutStored::wxTreeLayoutStored
wxTreeLayoutStored::AddChild
wxTreeLayoutStored::GetClientData
wxTreeLayoutStored::GetNode
wxTreeLayoutStored::GetNodeCount
wxTreeLayoutStored::GetNumNodes
wxTreeLayoutStored::HitTest
wxTreeLayoutStored::NameToId
wxTreeLayoutStored::SetClientData
wxTreeLayoutStored(int noNodes = 200)
Constructor. Specify the maximum number of nodes to be allocated.
long AddChild(const wxString& name, const wxString& parent = "")
Adds a child with a given parent, returning the node id.
long GetClientData(long id) const
Gets the client data for the given node.
wxStoredNode* GetNode(long id) const
Returns the wxStoredNode object for the given node id.
int GetNodeCount() const
Returns the current number of nodes.
int GetNumNodes() const
Returns the maximum number of nodes.
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.
long NameToId(const wxString& name)
Returns the id for the given node name, or -1 if there was no such node.
void SetClientData(long id, long clientData)
Sets client data for the given node.