GRE::CTRL_TREEVIEW Class Reference

When using this class do not use the ID methods or values from MGUI::CTRL_TREE as the ID is managed by CTRL_TREEVIEW and does not refer to any externally accessible object. More...

#include <gre/uitreeview.h>

Inheritance diagram for GRE::CTRL_TREEVIEW:
Inheritance graph
[legend]

List of all members.

Classes

class  SHARED

Public Types

typedef FastDelegate< bool(CTRL_TREEVIEW
&, ITEMHND, HITRESULT, const
LPOINT2D
&, MGUI::POINTERBUTTON,
MGUI::KEYSTATE)> 
DELEGATE_BUTTON
typedef FastDelegate
< MGUI::CUSTOMDRAW::RETVALUE(CTRL_TREEVIEW
&, MGUI::CUSTOMDRAW_TREE &)> 
DELEGATE_CUSTOMDRAW
typedef FastDelegate< void(CTRL_TREEVIEW
&, ITEMVALUES, ITEMINFO &)> 
DELEGATE_GETITEMINFO
typedef FastDelegate< void(CTRL_TREEVIEW
&, ITEMHND)> 
DELEGATE_ITEM
typedef FastDelegate< bool(CTRL_TREEVIEW
&, ITEMHND, HITRESULT, const
LPOINT2D &, MGUI::CTRL_TOOLTIP &)> 
DELEGATE_TOOLTIP
typedef FastDelegate< void(CTRL_TREEVIEW
&, ITEMHND, CHILDVISIBILITY)> 
DELEGATE_VISIBILITYCHANGED
typedef FastDelegate< bool(CTRL_TREEVIEW
&, ITEMHND, CHILDVISIBILITY)> 
DELEGATE_VISIBILITYCHANGING
enum  IMAGEIDX {
  IMAGEIDX_Blank = 0, IMAGEIDX_Layout, IMAGEIDX_Group2D, IMAGEIDX_Group3D,
  IMAGEIDX_Legend, IMAGEIDX_Component_Node, IMAGEIDX_Component_Point, IMAGEIDX_Component_Line,
  IMAGEIDX_Component_Polygon, IMAGEIDX_Component_Edge, IMAGEIDX_Component_Triangle, IMAGEIDX_Component_Text,
  IMAGEIDX_Component_Element, IMAGEIDX_Table_Generic, IMAGEIDX_Table_Form, IMAGEIDX_Table_Linked,
  IMAGEIDX_Table_StdAttrib, IMAGEIDX_Table_Style, IMAGEIDX_Table_Internal, IMAGEIDX_Table_LinkedMissing
}
enum  STATEIDX {
  STATEIDX_None = 0, STATEIDX_Hidden = 1, STATEIDX_Visible = 2, STATEIDX_VisibleNotAll = 3,
  STATEIDX_ComponentNotSelectable = 4, STATEIDX_ComponentSelectable = 5, STATEIDX_Blank = 6
}
enum  VIEWMODE { VIEWMODE_Automatic = 0x00, VIEWMODE_Controls = 0x01, VIEWMODE_Legend = 0x02, VIEWMODE_Mixed = 0x03 }

Public Member Functions

 CTRL_TREEVIEW ()
virtual ~CTRL_TREEVIEW ()
void Attach (GRE::VIEW *view)
void Attach (VIEWABLE *viewable, bool ShowTopObject)
void Attach (VIEWABLE *viewable)
void AttachAll ()
void Detach ()
ITEMHND GetItemFromObject (const GRE::OBJECT *object) const
ITEMHND GetItemFromPtr (const void *ptr) const
const ELEMSAMPLE_DCGetLegendDC (GRE::LEGEND &legend, MGD::CONTEXT *pgc)
void * GetPtr (ITEMHND hndItem) const
GRE::VIEWGetView () const
GRE::VIEWABLEGetViewable () const
VIEWMODE GetViewMode () const
ITEMHND Insert (const MISTRING &name, ITEMHND hndParent, ITEMHND hndInsertAfter, int ImageIdx, void *object, STATEIDX StateIdx=STATEIDX_None)
bool IsAllBold (ITEMHND hndItem) const
void SetAutoExpandWhenAddFirstChild (bool AutoExpand)
void SetDelegateOnChildVisibilityChanged (ITEMHND hndItem, DELEGATE_VISIBILITYCHANGED delegate)
void SetDelegateOnChildVisibilityChanging (ITEMHND hndItem, DELEGATE_VISIBILITYCHANGING delegate)
void SetDelegateOnCustomDraw (ITEMHND hndItem, DELEGATE_CUSTOMDRAW delegate)
void SetDelegateOnGetItemInfo (ITEMHND hndItem, DELEGATE_GETITEMINFO delegate)
void SetDelegateOnItemChangePosition (ITEMHND hndItem, DELEGATE_ITEM delegate)
void SetDelegateOnPointerButtonDown (ITEMHND hndItem, DELEGATE_BUTTON delegate)
void SetDelegateOnToolTipRequest (ITEMHND hndItem, DELEGATE_TOOLTIP delegate)
void SetPtr (ITEMHND hndItem, void *ptr)
void SetViewMode (VIEWMODE viewmode)

Static Public Member Functions

static SHAREDGetShared ()

Detailed Description

When using this class do not use the ID methods or values from MGUI::CTRL_TREE as the ID is managed by CTRL_TREEVIEW and does not refer to any externally accessible object.


Member Typedef Documentation

Delegate for pointer button.

Delegate for custom drawing.

Delegate for obtaining owner-supplied item info.

Delegate for item.

Delegate for tooltip request.

Delegate for child visibility changed.

Delegate for child visibility changing.


Member Enumeration Documentation

Enumerator:
IMAGEIDX_Blank 
IMAGEIDX_Layout 
IMAGEIDX_Group2D 
IMAGEIDX_Group3D 
IMAGEIDX_Legend 
IMAGEIDX_Component_Node 
IMAGEIDX_Component_Point 
IMAGEIDX_Component_Line 
IMAGEIDX_Component_Polygon 
IMAGEIDX_Component_Edge 
IMAGEIDX_Component_Triangle 
IMAGEIDX_Component_Text 
IMAGEIDX_Component_Element 
IMAGEIDX_Table_Generic 
IMAGEIDX_Table_Form 
IMAGEIDX_Table_Linked 
IMAGEIDX_Table_StdAttrib 
IMAGEIDX_Table_Style 
IMAGEIDX_Table_Internal 
IMAGEIDX_Table_LinkedMissing 

Image index for 'state' indicators.

Enumerator:
STATEIDX_None 
STATEIDX_Hidden 
STATEIDX_Visible 
STATEIDX_VisibleNotAll 
STATEIDX_ComponentNotSelectable 
STATEIDX_ComponentSelectable 
STATEIDX_Blank 
Enumerator:
VIEWMODE_Automatic 
VIEWMODE_Controls 
VIEWMODE_Legend 
VIEWMODE_Mixed 

Constructor & Destructor Documentation

GRE::CTRL_TREEVIEW::CTRL_TREEVIEW (  ) 

Default constructor.

virtual GRE::CTRL_TREEVIEW::~CTRL_TREEVIEW (  )  [virtual]

Destructor.


Member Function Documentation

void GRE::CTRL_TREEVIEW::Attach ( GRE::VIEW view  ) 

Attach to GRE_VIEW and associated viewable object.

Parameters:
view View to attach
void GRE::CTRL_TREEVIEW::Attach ( VIEWABLE viewable,
bool  ShowTopObject 
)

Attach to VIEWABLE.

Parameters:
viewable Viewable object to attach
ShowTopObject Whether to show topmost object (viewable) in tree
void GRE::CTRL_TREEVIEW::Attach ( VIEWABLE viewable  ) 

Attach to VIEWABLE.

Parameters:
viewable Viewable object to attach
void GRE::CTRL_TREEVIEW::AttachAll (  ) 

Attach to all top GRE objects.

void GRE::CTRL_TREEVIEW::Detach (  ) 

Detach from viewable/view.

ITEMHND GRE::CTRL_TREEVIEW::GetItemFromObject ( const GRE::OBJECT object  )  const

Find handle for first item associated with specified pointer.

ITEMHND GRE::CTRL_TREEVIEW::GetItemFromPtr ( const void *  ptr  )  const

Find handle for first item associated with specified pointer.

const ELEMSAMPLE_DC& GRE::CTRL_TREEVIEW::GetLegendDC ( GRE::LEGEND legend,
MGD::CONTEXT pgc 
)

Get element sample drawing context for legend.

Parameters:
legend Legend
void* GRE::CTRL_TREEVIEW::GetPtr ( ITEMHND  hndItem  )  const

Get pointer previously set for handle.

static SHARED& GRE::CTRL_TREEVIEW::GetShared (  )  [static]

Get shared information for use by all object trees.

GRE::VIEW* GRE::CTRL_TREEVIEW::GetView (  )  const [inline]

Get view associated with control, if any.

GRE::VIEWABLE* GRE::CTRL_TREEVIEW::GetViewable (  )  const [inline]

Get viewable associated with control, if any.

VIEWMODE GRE::CTRL_TREEVIEW::GetViewMode (  )  const [inline]

Get current view mode.

ITEMHND GRE::CTRL_TREEVIEW::Insert ( const MISTRING name,
ITEMHND  hndParent,
ITEMHND  hndInsertAfter,
int  ImageIdx,
void *  object,
STATEIDX  StateIdx = STATEIDX_None 
)

Insert item into tree.

bool GRE::CTRL_TREEVIEW::IsAllBold ( ITEMHND  hndItem  )  const
void GRE::CTRL_TREEVIEW::SetAutoExpandWhenAddFirstChild ( bool  AutoExpand  )  [inline]

Set whether to auto-expand layout/group when add first child.

Default is to auto-expand.

void GRE::CTRL_TREEVIEW::SetDelegateOnChildVisibilityChanged ( ITEMHND  hndItem,
DELEGATE_VISIBILITYCHANGED  delegate 
)

Set delegate to call when child visibility changed.

void GRE::CTRL_TREEVIEW::SetDelegateOnChildVisibilityChanging ( ITEMHND  hndItem,
DELEGATE_VISIBILITYCHANGING  delegate 
)

Set delegate to call when child visibility about to change.

void GRE::CTRL_TREEVIEW::SetDelegateOnCustomDraw ( ITEMHND  hndItem,
DELEGATE_CUSTOMDRAW  delegate 
)

Set delegate to call for custom drawing.

void GRE::CTRL_TREEVIEW::SetDelegateOnGetItemInfo ( ITEMHND  hndItem,
DELEGATE_GETITEMINFO  delegate 
)

Set delegate to call to get item info.

void GRE::CTRL_TREEVIEW::SetDelegateOnItemChangePosition ( ITEMHND  hndItem,
DELEGATE_ITEM  delegate 
)

Set delegate to call when item position changed.

void GRE::CTRL_TREEVIEW::SetDelegateOnPointerButtonDown ( ITEMHND  hndItem,
DELEGATE_BUTTON  delegate 
)

Set delegate to call when pointer button pressed.

Delegate must return true if handled, false to perform default action.

void GRE::CTRL_TREEVIEW::SetDelegateOnToolTipRequest ( ITEMHND  hndItem,
DELEGATE_TOOLTIP  delegate 
)

Set delegate to call when tooltip requested.

void GRE::CTRL_TREEVIEW::SetPtr ( ITEMHND  hndItem,
void *  ptr 
)

Set pointer to associate with item.

void GRE::CTRL_TREEVIEW::SetViewMode ( VIEWMODE  viewmode  ) 

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

Generated on Sun Oct 7 21:34:06 2012 for TNTsdk 2012 by  doxygen 1.6.1