GTree Class Reference

A tree control. More...

#include <GTree.h>

Inheritance diagram for GTree:

GLayout GView

List of all members.

Public Member Functions

char * GetClass ()
virtual void OnItemClick (GTreeItem *Item, GMouse &m)
 Called when an item is clicked.
virtual void OnItemBeginDrag (GTreeItem *Item, int Flags)
 Called when an item is dragged from it's position.
virtual void OnItemExpand (GTreeItem *Item, bool Expand)
 Called when an item is expanded/contracted to show or hide it's children.
virtual void OnItemSelect (GTreeItem *Item)
 Called when an item is selected.
void OnMouseClick (GMouse &m)
 The mouse was clicked over this view.
void OnMouseMove (GMouse &m)
 The mouse moves over the control.
void OnMouseWheel (double Lines)
 The mouse wheel was scrolled.
void OnPaint (GSurface *pDC)
 Called to paint the onscreen representation of the view.
void OnFocus (bool b)
 The view gains or loses the keyboard focus.
void OnPosChange ()
 Called when the view position changes.
bool OnKey (GKey &k)
 A key was pressed while this view has focus.
int OnNotify (GViewI *Ctrl, int Flags)
 Called when a child view or view with it's SetNotify() set to this window changes.
int OnEvent (GMessage *Msg)
 Handles the incoming events.
void OnPulse ()
 Called every so often by the timer system.
GTreeItemInsert (GTreeItem *Obj=0, int Pos=-1)
 Add a item to the tree.
bool Delete (GTreeItem *Obj)
 Remove and delete an item.
bool Remove (GTreeItem *Obj)
 Remove but don't delete an item.
GTreeItemItemAt (int Pos)
 Gets the item at an index.
bool Select (GTreeItem *Obj)
 Select the item 'Obj'.
GTreeItemSelection ()
 Returns the first selected item.
GTreeItemItemAtPoint (int x, int y)
 Returns the item at an x,y location.
void SelectDropTarget (GTreeItem *Item)
void Empty ()
 Delete all items (frees the items).
void RemoveAll ()
 Remove reference to items (doesn't free the items).
void UpdateAllItems ()
 Call 'Update' on all tree items.

Friends

class GTreeItem


Detailed Description

A tree control.

Member Function Documentation

char* GTree::GetClass (  )  [inline]

The class' name. Should be overriden in child classes to return the right class name. Mostly used for debugging, but in the win32 port it is also the default WIN32 class name passed to RegisterClass() in GView::CreateClass().

Returns:
the Class' name for debugging

Reimplemented from GLayout.

int GTree::OnNotify ( GViewI *  Ctrl,
int  Flags 
)

Called when a child view or view with it's SetNotify() set to this window changes.

The event by default will bubble up to the GWindow at the top of the window heirarchy visiting each GView on the way. If it reaches a GView that processes it then the event stops propergating up the heirarchy.

Reimplemented from GLayout.

References IDC_HSCROLL, IDC_VSCROLL, and GView::Invalidate().

void GTree::OnPulse (  ) 

Called every so often by the timer system.

See also:
SetPulse()

Reimplemented from GView.

References GLayout::GetClient(), GView::GetMouse(), GLayout::HScroll, GView::SetPulse(), GScrollBar::Value(), GLayout::VScroll, GRect::X(), GMouse::x, GRect::Y(), and GMouse::y.

void GTree::SelectDropTarget ( GTreeItem Item  ) 

Temporarily selects one of the items as the drop target during a drag and drop operation. Call SelectDropTarget(0) when done.

References OnFocus(), and GTreeItem::Update().


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