You may return to the Cvo Object Documenation Index from this document. This document contains the following sections describing the Cvo_TreeNode object:
Cvo_TreeNode
#include
<Cvo/Tree.h++>
new
Cvo_TreeNode ( Cvo_Window *window,
{ Cvo_Tree *tree | Cvo_TreeNode *node } )
new
Cvo_TreeNode ( char *,
Cvo_TreeNode *node )
The Cvo_TreeNode object contains information stored about a particular node in a Cvo_Tree object. The argument window should be a newly allocated Cvo_Window which has tree as it's parent. The argument tree is the actual Cvo_Tree which this Cvo_TreeNode belongs to. Note that all child objects of the Cvo_Tree must have a corresponding Cvo_TreeNode created.
If window is unmapped, all of its children objects will be unmapped as well. If it is remapped, all children who have MapWithParent set (set by default) will be mapped as well.
The Cvo_TreeNode object also provides the ability for the application
to store void *
associated with it.
This object defines the following member functions.
Cvo_Window *Object (
)
Return the Cvo_Tree or Cvo_Window associated with this node. These will be the pointers passed to the constructor, if available.
Cvo_TreeNode *Parent (
)
Return the parent node, if any, of this node.
Cvo_TreeNode *Elder (
)
Cvo_TreeNode *Sibling (
)
Return the next sibling, or the previous sibling (Elder) of this node, if any.
Cvo_TreeNode *Children (
)
Return the first child node of this node.
BOOL SetMapWithParent (
[ BOOL value ] )
If MapWithParent is set (True by default), this node will automatically be mapped when it's parent is mapped. If value is False then the program must explicitly map the window in order for this node to be mapped.
BOOL MapWithParent (
)
Return the value of the MapWithParent state.
SetClient_data(void *data (
)
Associate data with this node.
void *Client_data (
)
Retreive the data for this cell which was set with SetClient_data.
See the example source code for an example of how to use this object.
See the legend for information about the conventions used in this documentation.