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

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.
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.
void OnPaint (ItemPaintCtx &Ctx)
 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.

Referenced by OnPaint().

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.

References Update().

void GTreeItem::Update (  )  [virtual]

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

Reimplemented from GItem.

References GRect::x2.

Referenced by GTree::OnFocus(), Select(), GTree::SelectDropTarget(), and SetText().


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

Generated on Wed Dec 1 15:41:05 2010 for Lgi by  doxygen 1.5.7.1