LightWrap++
AC++wrapperfortheLightWave3DSDK
lwpp::LWPanelTreeControlCallBacks Class Reference

#include <lwpp/panel.h>

List of all members.

Public Member Functions

virtual PanelTreeNodecontrolTreeChild (PanelControl &control, PanelTreeNode *node, int i)
virtual int controlTreeCount (PanelControl &control, PanelTreeNode *node)
virtual PanelTreeNodecontrolTreeGetRoot (lwpp::PanelControl &control)=0
virtual const char * controlTreeInfo (PanelControl &control, PanelTreeNode *node, int *flags)
virtual void controlTreeMove (PanelControl &, PanelTreeNode *, PanelTreeNode *, int)

Detailed Description

Inherit from this and override the virtual functions to handle Tree control events

A tree control is like a listbox, but with the menu items organized hierarchically. Child nodes of the tree can be revealed, hidden and sometimes moved by the user. The value of a tree control is a pointer to a node in your tree data, which can be obtained and set through GET_ADDR() and SET_ADDR(). Trees don't prescribe the internal form of your tree data, but you have to be able to answer the questions about that data asked by the callbacks, which look like this.


Member Function Documentation

virtual PanelTreeNode* lwpp::LWPanelTreeControlCallBacks::controlTreeChild ( PanelControl control,
PanelTreeNode node,
int  i 
)
inlinevirtual

Returns a pointer to the i-th child of the node

Parameters:
controlreference to the control
nodeis a pointer returned by a previous call to this callback, or NULL for the root
iAn integer indicating the i-th child
virtual int lwpp::LWPanelTreeControlCallBacks::controlTreeCount ( PanelControl control,
PanelTreeNode node 
)
inlinevirtual

Returns the number of child nodes for a given node.

Parameters:
controlreference to the control
nodeis a pointer returned by a previous call to this callback, or NULL for the root
virtual PanelTreeNode* lwpp::LWPanelTreeControlCallBacks::controlTreeGetRoot ( lwpp::PanelControl control)
pure virtual

Returns a pointer to the root of the node

Parameters:
controlreference to the tree control
virtual const char* lwpp::LWPanelTreeControlCallBacks::controlTreeInfo ( PanelControl control,
PanelTreeNode node,
int *  flags 
)
inlinevirtual

Returns the name of the node. This is what is displayed in the tree control. If flags is non-zero, store the flags value in your node data, and if it's 0, retrieve it from your data and put it into flags.

Parameters:
controlreference to the control
nodeis a pointer returned by a previous call to this callback, or NULL for the root
flagsThe flags of the node, indicate if it's collapsed or not
virtual void lwpp::LWPanelTreeControlCallBacks::controlTreeMove ( PanelControl ,
PanelTreeNode ,
PanelTreeNode ,
int   
)
inlinevirtual

Called when the user moves a node. The node becomes the i-th child of the parent node. This isn't in the TREE_CTL macro's argument list TREE_CTL sets this to NULL, which prevents the user from moving your nodes. If you want to allow the user to move your nodes, use the code in the body of the TREE_CTL macro to create the control, putting your move callback in desc.tree.moveFn.

Parameters:
controlreference to the control
nodeis a pointer to the moved node
parentis a pointer to the parent node
iAn integer indicating the i-th child

The documentation for this class was generated from the following file: