#include <GTree.h>
Inheritance diagram for GTreeItem:
Public Member Functions | |
char * | GetText (int i=0) |
Get the text for the node. | |
bool | SetText (char *s, int i=0) |
Sets the text for the node. | |
int | GetImage (int Flags=0) |
Returns the icon index into the parent tree's GImageList. | |
void | SetImage (int i) |
Sets the icon index into the parent tree's GImageList. | |
void | Update () |
bool | Select () |
Returns true if the tree item is currently selected. | |
void | Select (bool b) |
Selects or deselects the tree item. | |
bool | Expanded () |
Returns true if the node has children and is open. | |
void | Expanded (bool b) |
Opens or closes the node to show or hide the children. | |
GTreeItem * | Insert (GTreeItem *Obj=NULL, int Pos=-1) |
Inserts a tree item as a child at 'Pos'. | |
void | Remove () |
Removes this node from it's parent, for permanent separation. | |
void | Detach () |
Detachs the item from the tree so it can be re-inserted else where. | |
GTreeItem * | GetNext () |
Gets the node after this one at the same level. | |
GTreeItem * | GetPrev () |
Gets the node before this one at the same level. | |
GTreeItem * | GetChild () |
Gets the first child node. | |
GTreeItem * | GetParent () |
Gets the parent of this node. | |
GTree * | GetTree () |
Gets the owning tree. May be NULL if not attached to a tree. | |
bool | IsRoot () |
Returns true if this is the root node. | |
int | IndexOf () |
Returns the index of this node in the list of item owned by it's parent. | |
void | ScrollTo () |
Scrolls the tree view so this node is visible. | |
virtual void | OnExpand (bool b) |
Called when the node expands/contracts to show or hide it's children. | |
virtual void | OnPaint (GSurface *pDC, GRect &r, COLOUR Back) |
Paints the item. | |
Friends | |
class | GTree |
|
Get the text for the node. You can either return a string stored internally to your object by implementing this function in your item class or use the SetText function to store the string in this class. Reimplemented from GItem. |
|
Sets the text for the node. This will allocate and store the string in this class. Reimplemented from GItem. |
|
Tells the item to update itself on the screen when the GTreeItem::GetText data has changed. Reimplemented from GItem. |