GRAPHICTREE Class Reference

#include <mi32/grtree.h>

List of all members.

Classes

class  ITEM
 Individual tree item. More...

Public Types

enum  FLAGS {
  FirstAtTop = 0x00000000, FirstAtBottom = 0x00000001, NoScrollHorizontal = 0x00000002, AllowChildSelection = 0x00000004,
  AllowChildReorder = 0x00000008, IncludeExpandIcons = 0x00000010, ItemMayHaveChildren = 0x00000020, SingleSelectionOnly = 0x00000040,
  ChildrenHidden = 0x00000080
}

Public Member Functions

 GRAPHICTREE (Widget parent, const char *sizefield, Arg *arglist, int argcount, FLAGS flags=FirstAtTop)
 ~GRAPHICTREE ()
void DeleteChildren (void *ParentReference, UINT32 ParentRefIndex, bool redraw=true)
ITEMFindItemByRef (const void *RefPointer, UINT32 RefIndex) const
void * GetActiveChild (void *ParentReference, UINT32 ParentRefIndex)
ITEMGetActiveItem () const
Widget GetDrawingArea () const
void * GetFirstItem (void *ParentReference, UINT32 ParentRefIndex) const
void * GetNextItem (void *ItemReference, UINT32 ItemRefIndex) const
void * GetParentItem (void *ItemReference, UINT32 ItemRefIndex) const
void * GetPrivData () const
const ITEMGetRootItem () const
Widget GetWidget () const
ITEMItemAdd (void *ItemReference, UINT32 ItemRefIndex, void(*MsgHandler)(ITEM::MSG *), int position, FLAGS flags=FirstAtTop)
ITEMItemAdd (void *ParentReference, UINT32 ParentRefIndex, void *ItemReference, UINT32 ItemRefIndex, void(*MsgHandler)(ITEM::MSG *), int position, FLAGS flags=FirstAtTop)
bool ItemAreChildrenVisible (void *ItemReference, UINT32 ItemRefIndex)
bool ItemDelete (void *ItemReference, UINT32 ItemRefIndex, bool redraw=true)
bool ItemExists (void *ItemReference, UINT32 ItemRefIndex)
int ItemGetPosition (void *ItemReference, UINT32 ItemRefIndex)
void * ItemGetPrivPtr (void *ItemReference, UINT32 ItemRefIndex)
bool ItemIsVisible (void *ItemReference, UINT32 ItemRefIndex)
void ItemNotifyChanged (void *ItemReference, UINT32 ItemRefIndex, bool redraw=true)
void ItemRedraw (void *ItemReference, UINT32 ItemRefIndex)
void ItemSetChildMarginBottom (void *ItemReference, UINT32 ItemRefIndex, UINT8 Margin)
void ItemSetChildMarginLeft (void *ItemReference, UINT32 ItemRefIndex, UINT8 Margin)
void ItemSetChildMarginRight (void *ItemReference, UINT32 ItemRefIndex, UINT8 Margin)
void ItemSetChildMarginTop (void *ItemReference, UINT32 ItemRefIndex, UINT8 Margin)
void ItemSetChildrenVisible (void *ItemReference, UINT32 ItemRefIndex, bool visible, bool redraw=true)
void ItemSetChildSpacing (void *ItemReference, UINT32 ItemRefIndex, UINT8 Spacing)
void ItemSetPosition (void *ItemReference, UINT32 ItemRefIndex, int position, bool redraw=true)
void ItemSetPrivPtr (void *ItemReference, UINT32 ItemRefIndex, void *PrivPtr)
void ItemSetVisible (void *ItemReference, UINT32 ItemRefIndex, bool visible, bool redraw=true)
void NotifyChanged (bool redraw=true)
void Redraw (LRECT2D *rect=0)
void RedrawDisable ()
void RedrawEnable (bool redraw=true)
void ScrollToItem (ITEM *item)
void SetActiveChild (void *ParentReference, void *ItemReference)
void SetActiveChild (void *ParentReference, UINT32 ParentRefIndex, void *ItemReference, UINT32 ItemRefIndex)
void SetActiveItem (ITEM *item)
void SetPrivData (void *data)

Member Enumeration Documentation

Flags used in tree and item creation.

Enumerator:
FirstAtTop 
FirstAtBottom 
NoScrollHorizontal 

Don't include horizontal scrollbar.

AllowChildSelection 
AllowChildReorder 
IncludeExpandIcons 

Include expand/collapse icons.

ItemMayHaveChildren 

Item may have children, determine when attempt to expand.

SingleSelectionOnly 

Only single tree item may be selected at a time.

ChildrenHidden 

Children initially hidden.


Constructor & Destructor Documentation

GRAPHICTREE::GRAPHICTREE ( Widget  parent,
const char *  sizefield,
Arg *  arglist,
int  argcount,
FLAGS  flags = FirstAtTop 
)

Constructor.

GRAPHICTREE::~GRAPHICTREE (  ) 

Destructor.


Member Function Documentation

void GRAPHICTREE::DeleteChildren ( void *  ParentReference,
UINT32  ParentRefIndex,
bool  redraw = true 
)

Delete all children of specified parent.

ITEM* GRAPHICTREE::FindItemByRef ( const void *  RefPointer,
UINT32  RefIndex 
) const

Find item matching specified reference pointer and index.

Returns:
Pointer to item or NULL if none found.
void* GRAPHICTREE::GetActiveChild ( void *  ParentReference,
UINT32  ParentRefIndex 
)

Get "active" child for given parent if any.

ITEM* GRAPHICTREE::GetActiveItem (  )  const [inline]

get 'active' item in single-selection mode.

Returns:
Pointer to active item, NULL if none active.
Widget GRAPHICTREE::GetDrawingArea (  )  const [inline]

Get DrawingArea widget for GraphicTree.

void* GRAPHICTREE::GetFirstItem ( void *  ParentReference,
UINT32  ParentRefIndex 
) const

Get first child for given parent.

void* GRAPHICTREE::GetNextItem ( void *  ItemReference,
UINT32  ItemRefIndex 
) const

Get next "sibling" item.

void* GRAPHICTREE::GetParentItem ( void *  ItemReference,
UINT32  ItemRefIndex 
) const
void* GRAPHICTREE::GetPrivData (  )  const [inline]
const ITEM* GRAPHICTREE::GetRootItem (  )  const [inline]
Widget GRAPHICTREE::GetWidget (  )  const [inline]

Get widget.

ITEM* GRAPHICTREE::ItemAdd ( void *  ItemReference,
UINT32  ItemRefIndex,
void(*)(ITEM::MSG *)  MsgHandler,
int  position,
FLAGS  flags = FirstAtTop 
) [inline]

Add item to GRAPHICTREE as child of root.

Returns:
Pointer to ITEM added.
ITEM* GRAPHICTREE::ItemAdd ( void *  ParentReference,
UINT32  ParentRefIndex,
void *  ItemReference,
UINT32  ItemRefIndex,
void(*)(ITEM::MSG *)  MsgHandler,
int  position,
FLAGS  flags = FirstAtTop 
)

Add item to GRAPHICTREE as child of specified item.

Returns:
Pointer to ITEM added.
bool GRAPHICTREE::ItemAreChildrenVisible ( void *  ItemReference,
UINT32  ItemRefIndex 
)

Determine if item's children are visible.

bool GRAPHICTREE::ItemDelete ( void *  ItemReference,
UINT32  ItemRefIndex,
bool  redraw = true 
)

Delete item and all children.

bool GRAPHICTREE::ItemExists ( void *  ItemReference,
UINT32  ItemRefIndex 
) [inline]

Determine if specified item exists.

int GRAPHICTREE::ItemGetPosition ( void *  ItemReference,
UINT32  ItemRefIndex 
)

Get position of item in parent's list of children.

void* GRAPHICTREE::ItemGetPrivPtr ( void *  ItemReference,
UINT32  ItemRefIndex 
) [inline]

Get private pointer for item.

bool GRAPHICTREE::ItemIsVisible ( void *  ItemReference,
UINT32  ItemRefIndex 
)

Determine visibility for item.

void GRAPHICTREE::ItemNotifyChanged ( void *  ItemReference,
UINT32  ItemRefIndex,
bool  redraw = true 
)

Notify GRAPHICTREE that item has changed so will update size.

void GRAPHICTREE::ItemRedraw ( void *  ItemReference,
UINT32  ItemRefIndex 
)

Redraw specified item.

void GRAPHICTREE::ItemSetChildMarginBottom ( void *  ItemReference,
UINT32  ItemRefIndex,
UINT8  Margin 
) [inline]

Set bottom margin for child list.

void GRAPHICTREE::ItemSetChildMarginLeft ( void *  ItemReference,
UINT32  ItemRefIndex,
UINT8  Margin 
) [inline]

Set left margin for child list.

void GRAPHICTREE::ItemSetChildMarginRight ( void *  ItemReference,
UINT32  ItemRefIndex,
UINT8  Margin 
) [inline]

Set right margin for child list.

void GRAPHICTREE::ItemSetChildMarginTop ( void *  ItemReference,
UINT32  ItemRefIndex,
UINT8  Margin 
) [inline]

Set top margin for child list.

void GRAPHICTREE::ItemSetChildrenVisible ( void *  ItemReference,
UINT32  ItemRefIndex,
bool  visible,
bool  redraw = true 
)

Set visibility for children of item.

void GRAPHICTREE::ItemSetChildSpacing ( void *  ItemReference,
UINT32  ItemRefIndex,
UINT8  Spacing 
) [inline]

Set spacing between children.

void GRAPHICTREE::ItemSetPosition ( void *  ItemReference,
UINT32  ItemRefIndex,
int  position,
bool  redraw = true 
)

Set item position in list.

void GRAPHICTREE::ItemSetPrivPtr ( void *  ItemReference,
UINT32  ItemRefIndex,
void *  PrivPtr 
) [inline]

Set private pointer for item.

void GRAPHICTREE::ItemSetVisible ( void *  ItemReference,
UINT32  ItemRefIndex,
bool  visible,
bool  redraw = true 
)

Set visiblity for item.

void GRAPHICTREE::NotifyChanged ( bool  redraw = true  )  [inline]

Notify GraphicTree that item has changed so can recompute size/position.

void GRAPHICTREE::Redraw ( LRECT2D rect = 0  ) 

Redraw GRAPHICTREE.

void GRAPHICTREE::RedrawDisable (  )  [inline]

Disable redraw.

void GRAPHICTREE::RedrawEnable ( bool  redraw = true  )  [inline]

Enable redraw.

void GRAPHICTREE::ScrollToItem ( ITEM item  ) 

Scroll to make specified item visible.

Parameters:
item Item to make visible
void GRAPHICTREE::SetActiveChild ( void *  ParentReference,
void *  ItemReference 
) [inline]

Set active child item.

void GRAPHICTREE::SetActiveChild ( void *  ParentReference,
UINT32  ParentRefIndex,
void *  ItemReference,
UINT32  ItemRefIndex 
)

Set active child item.

Parameters:
ItemReference Pass NULL to set to have no active item
void GRAPHICTREE::SetActiveItem ( ITEM item  ) 

Set active item in single-selection mode.

void GRAPHICTREE::SetPrivData ( void *  data  )  [inline]

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

Generated on Sun Oct 7 21:33:28 2012 for TNTsdk 2012 by  doxygen 1.6.1