Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

GTreeItem Class Reference

The item class for a tree. This defines a node in the heirarchy. More...

#include <GTree.h>

Inheritance diagram for GTreeItem:

GItem GEvent GTree GFilterView List of all members.

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.
GTreeItemInsert (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.
GTreeItemGetNext ()
 Gets the node after this one at the same level.
GTreeItemGetPrev ()
 Gets the node before this one at the same level.
GTreeItemGetChild ()
 Gets the first child node.
GTreeItemGetParent ()
 Gets the parent of this node.
GTreeGetTree ()
 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

Detailed Description

The item class for a tree. This defines a node in the heirarchy.


Member Function Documentation

char * GTreeItem::GetText int  i = 0  )  [virtual]
 

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.

bool GTreeItem::SetText char *  s,
int  i = 0
[virtual]
 

Sets the text for the node.

This will allocate and store the string in this class.

Reimplemented from GItem.

void GTreeItem::Update  )  [virtual]
 

Tells the item to update itself on the screen when the GTreeItem::GetText data has changed.

Reimplemented from GItem.


The documentation for this class was generated from the following files:
Generated on Wed Oct 26 14:47:04 2005 for Lgi by  doxygen 1.4.1