|
LightWrap++
AC++wrapperfortheLightWave3DSDK
|
#include <lwpp/panel.h>
Public Member Functions | |
| virtual PanelTreeNode * | controlTreeChild (PanelControl &control, PanelTreeNode *node, int i) |
| virtual int | controlTreeCount (PanelControl &control, PanelTreeNode *node) |
| virtual PanelTreeNode * | controlTreeGetRoot (lwpp::PanelControl &control)=0 |
| virtual const char * | controlTreeInfo (PanelControl &control, PanelTreeNode *node, int *flags) |
| virtual void | controlTreeMove (PanelControl &, PanelTreeNode *, PanelTreeNode *, int) |
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.
|
inlinevirtual |
Returns a pointer to the i-th child of the node
| control | reference to the control |
| node | is a pointer returned by a previous call to this callback, or NULL for the root |
| i | An integer indicating the i-th child |
|
inlinevirtual |
Returns the number of child nodes for a given node.
| control | reference to the control |
| node | is a pointer returned by a previous call to this callback, or NULL for the root |
|
pure virtual |
Returns a pointer to the root of the node
| control | reference to the tree control |
|
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.
| control | reference to the control |
| node | is a pointer returned by a previous call to this callback, or NULL for the root |
| flags | The flags of the node, indicate if it's collapsed or not |
|
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.
| control | reference to the control |
| node | is a pointer to the moved node |
| parent | is a pointer to the parent node |
| i | An integer indicating the i-th child |