MGUI::CTRL_TOOLBAR Class Reference

#include <mgui/toolbar.h>

Inheritance diagram for MGUI::CTRL_TOOLBAR:
Inheritance graph
[legend]

List of all members.

Public Types

enum  CREATEITEM {
  CREATEITEM_Default = MENU::CREATEITEM_Default, CREATEITEM_Check = MENU::CREATEITEM_Check, CREATEITEM_CheckOn = MENU::CREATEITEM_CheckOn, CREATEITEM_Radio = MENU::CREATEITEM_Radio,
  CREATEITEM_RadioOn = MENU::CREATEITEM_RadioOn, CREATEITEM_RadioFirst = MENU::CREATEITEM_RadioFirst, CREATEITEM_RadioFirstOn = MENU::CREATEITEM_RadioFirstOn, CREATEITEM_ToggleOn = MENU::CREATEITEM_ToggleOn,
  CREATEITEM_Disabled = MENU::CREATEITEM_Disabled, CREATEITEM_NoDelegate = MENU::CREATEITEM_NoDelegate, CREATEITEM_MI_Internal = MENU::CREATEITEM_MI_Internal, CREATEITEM_MI_Programmer = MENU::CREATEITEM_MI_Programmer,
  CREATEITEM_Hidden = MENU::CREATEITEM_Hidden
}
typedef
fastdelegate::FastDelegate
< void(MGUI::ID, bool)> 
DELEGATE
enum  ITEMHND { ITEMHND_None = MENU::ITEMHND_None, ITEMHND_Last = MENU::ITEMHND_Last }

Public Member Functions

 CTRL_TOOLBAR ()
virtual ~CTRL_TOOLBAR ()
ITEMHND Add (ICONID iconid, const MISTRING &label, MENU &menu, CREATEITEM createflags=CREATEITEM_Default, UINT32 icid=0)
ITEMHND Add (ICONID iconid, const MISTRING &label, MGUI::MENU::DELEGATE delegate, ID id=0, CREATEITEM createflags=CREATEITEM_Default, UINT32 icid=0)
ITEMHND Add (ICONID iconid, const MISTRING &label, ID id, CREATEITEM createflags=CREATEITEM_Default, UINT32 icid=0)
void AddSeparator ()
void AddSpaceFixed (int space)
void Create (LAYOUT_PANE_BASE &ParentPane, LAYOUT_ORIENTATION orientation=LAYOUT_ORIENTATION_Horizontal, LAYOUT_SIZEALIGN sizealign=LAYOUT_SIZEALIGN_FixedSize)
void Delete (ITEMHND hndItem)
void DeleteAll ()
bool GetToggleStateID (ID id) const
bool GetToggleStateItem (ITEMHND hndItem) const
void SetDelegate (ID id, DELEGATE delegate)
void SetDftDelegate (DELEGATE delegate)
void SetEnabledID (ID id, bool enabled)
void SetEnabledItem (ITEMHND hndItem, bool enabled)
void SetToggleStateID (ID id, bool ToggleOn, bool notify)
void SetToggleStateItem (ITEMHND hndItem, bool ToggleOn, bool notify)
void SetVisibleID (ID id, bool visible)
void SetVisibleItem (ITEMHND hndItem, bool visible)

Static Public Member Functions

static CREATEITEM CREATEITEM_CheckSet (bool ToggleOn)
static CREATEITEM CREATEITEM_RadioSet (bool ToggleOn, bool RadioFirst=false)

Member Typedef Documentation

typedef fastdelegate::FastDelegate<void(MGUI::ID,bool)> MGUI::CTRL_TOOLBAR::DELEGATE

Delegate for selection from button.

Values passed to delegate are ID and toggle state. If item is not a toggle the state will always be 'true'.


Member Enumeration Documentation

Flags for use when adding items.

Enumerator:
CREATEITEM_Default 
CREATEITEM_Check 

Create with check style, cannot be combined with CREATEITEM_Radio.

CREATEITEM_CheckOn 

Create with check style, initially toggled on.

CREATEITEM_Radio 

Create with radio style, cannot be combined with CREATEITEM_Check.

CREATEITEM_RadioOn 

Create with radio style, initially toggled on.

CREATEITEM_RadioFirst 

First item in radio group, implies radio style, only need if multiple radio groups.

CREATEITEM_RadioFirstOn 

First item in new radio group, initially toggled on.

CREATEITEM_ToggleOn 

Create initially toggled on, requires CREATEITEM_Check or CREATEITEM_Radio.

CREATEITEM_Disabled 

Create initially disabled.

CREATEITEM_NoDelegate 

Create item with no delegate, use when menu has default delegate if want label.

CREATEITEM_MI_Internal 

Only create if MicroImages internal license.

CREATEITEM_MI_Programmer 

Only create if MicroImages programmer license.

CREATEITEM_Hidden 

Create item initially hidden.

Predefined item handles.

Enumerator:
ITEMHND_None 
ITEMHND_Last 

Constructor & Destructor Documentation

MGUI::CTRL_TOOLBAR::CTRL_TOOLBAR (  ) 

Default constructor.

virtual MGUI::CTRL_TOOLBAR::~CTRL_TOOLBAR (  )  [virtual]

Destructor.


Member Function Documentation

ITEMHND MGUI::CTRL_TOOLBAR::Add ( ICONID  iconid,
const MISTRING label,
MENU menu,
CREATEITEM  createflags = CREATEITEM_Default,
UINT32  icid = 0 
)

Add a item with menu to toolbar.

Must be called before Create().

Returns:
Handle to item for subsequent reference, will be < 0 if error
Parameters:
iconid Icon ID
label Label
menu Menu for item
icid Interface customization ID
ITEMHND MGUI::CTRL_TOOLBAR::Add ( ICONID  iconid,
const MISTRING label,
MGUI::MENU::DELEGATE  delegate,
ID  id = 0,
CREATEITEM  createflags = CREATEITEM_Default,
UINT32  icid = 0 
)

Add an item to the toolbar, using specified delegate.

Must be called before Create().

Returns:
Handle to item for subsequent reference, will be < 0 if error
Parameters:
iconid Icon ID
label Label for item
delegate Delegate to call
id Optional application-defined ID to be passed to delegate
icid Interface customization ID
ITEMHND MGUI::CTRL_TOOLBAR::Add ( ICONID  iconid,
const MISTRING label,
ID  id,
CREATEITEM  createflags = CREATEITEM_Default,
UINT32  icid = 0 
)

Add an item to the toolbar, using default delegate.

Must be called before Create().

Returns:
Handle to item for subsequent reference, will be < 0 if error
Parameters:
iconid Icon ID
label Label for item
id Application-defined ID to be passed to default delegate
icid Interface customization ID
void MGUI::CTRL_TOOLBAR::AddSeparator (  ) 

Add separator to toolbar.

Must be called before Create().

void MGUI::CTRL_TOOLBAR::AddSpaceFixed ( int  space  ) 

Add fixed space to toolbar.

Must be called before Create().

Parameters:
space Space in pixels
void MGUI::CTRL_TOOLBAR::Create ( LAYOUT_PANE_BASE ParentPane,
LAYOUT_ORIENTATION  orientation = LAYOUT_ORIENTATION_Horizontal,
LAYOUT_SIZEALIGN  sizealign = LAYOUT_SIZEALIGN_FixedSize 
)

Create control.

Parameters:
ParentPane Parent pane
static CREATEITEM MGUI::CTRL_TOOLBAR::CREATEITEM_CheckSet ( bool  ToggleOn  )  [inline, static]

Convenience method to get CREATEITEM flag for check item with control of whether initially on.

static CREATEITEM MGUI::CTRL_TOOLBAR::CREATEITEM_RadioSet ( bool  ToggleOn,
bool  RadioFirst = false 
) [inline, static]

Convenience method to get CREATEITEM flag for radio item with control of whether initially on.

void MGUI::CTRL_TOOLBAR::Delete ( ITEMHND  hndItem  ) 

Delete item from toolbar.

Parameters:
hndItem Handle returned by Add()
void MGUI::CTRL_TOOLBAR::DeleteAll (  ) 

Delete all items from toolbar.

bool MGUI::CTRL_TOOLBAR::GetToggleStateID ( ID  id  )  const

Get whether item is toggled on using ID.

Parameters:
id ID of item(s) to enable
bool MGUI::CTRL_TOOLBAR::GetToggleStateItem ( ITEMHND  hndItem  )  const

Get whether item is toggled on using handle.

Parameters:
hndItem Handle returned by Add()
void MGUI::CTRL_TOOLBAR::SetDelegate ( ID  id,
DELEGATE  delegate 
) [inline]

Set delegate for existing item ID.

Parameters:
id ID of item
delegate Delegate to set
void MGUI::CTRL_TOOLBAR::SetDftDelegate ( DELEGATE  delegate  ) 

Set default delegate for use with Add() when no delegate specified.

If used, must be called before Add().

void MGUI::CTRL_TOOLBAR::SetEnabledID ( ID  id,
bool  enabled 
)

Set whether item is enabled using ID.

Parameters:
id ID of item(s) to enable
enabled true to enable, false to disable
void MGUI::CTRL_TOOLBAR::SetEnabledItem ( ITEMHND  hndItem,
bool  enabled 
)

Set whether item is enabled using handle.

Parameters:
hndItem Handle returned by Add()
enabled true to enable, false to disable
void MGUI::CTRL_TOOLBAR::SetToggleStateID ( ID  id,
bool  ToggleOn,
bool  notify 
)

Set whether item is toggled on using ID.

Parameters:
id ID of item(s) to enable
ToggleOn true to toggle on, false to toggle off
notify Send notification via delegate if true
void MGUI::CTRL_TOOLBAR::SetToggleStateItem ( ITEMHND  hndItem,
bool  ToggleOn,
bool  notify 
)

Set whether item is toggled on using handle.

Parameters:
hndItem Handle returned by Add()
ToggleOn true to toggle on, false to toggle off
notify Send notification via delegate if true
void MGUI::CTRL_TOOLBAR::SetVisibleID ( ID  id,
bool  visible 
)

Set whether item is visible using ID.

Parameters:
id ID of item(s) to show
visible true to enable, false to hide
void MGUI::CTRL_TOOLBAR::SetVisibleItem ( ITEMHND  hndItem,
bool  visible 
)

Set whether item is visible using handle.

Parameters:
hndItem Handle returned by Add()
visible true to show, false to hide

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

Generated on Sun Oct 7 21:35:39 2012 for TNTsdk 2012 by  doxygen 1.6.1