MGUI::CTRL_TOGGLEBUTTON Class Reference

Toggle button control supporting both "checkbox" and "radio" behavior with text and icon buttons. More...

#include <mgui/ctrl.h>

Inheritance diagram for MGUI::CTRL_TOGGLEBUTTON:

Inheritance graph
[legend]
List of all members.

Public Types

enum  STYLE { STYLE_Check, STYLE_Radio, STYLE_RadioFirst }

Public Member Functions

void Create (MGUI::LAYOUT_PANE_BASE &ParentPane, ICONID iconid, const MISTRING &tooltip, STYLE style=STYLE_Check, bool dftvalue=false, int iconsize=0)
void Create (MGUI::LAYOUT_PANE_BASE &ParentPane, ICONID iconid, const char *tooltip, STYLE style=STYLE_Check, bool dftvalue=false, int iconsize=0)
void Create (MGUI::LAYOUT_PANE_BASE &ParentPane, const MISTRING &label, STYLE style=STYLE_Check, bool dftvalue=false, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedSize)
void Create (MGUI::LAYOUT_PANE_BASE &ParentPane, const char *label, STYLE style=STYLE_Check, bool dftvalue=false, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedSize)
 CTRL_TOGGLEBUTTON ()
CButton & GetCtrl ()
bool GetValue () const
void SetValue (bool value, bool notify=true)
virtual ~CTRL_TOGGLEBUTTON ()

Protected Member Functions

virtual void OnPressed ()

Detailed Description

Toggle button control supporting both "checkbox" and "radio" behavior with text and icon buttons.

Note that in the X version radio behavior between buttons is NOT enforced by this control. For portability it is recommended that the MGUI::FORM_RADIOBUTTONS class be used to manage a set of radio buttons or that the code enforce radio behavior itself for more complex cases.

Definition at line 841 of file ctrl.h.


Member Enumeration Documentation

enum MGUI::CTRL_TOGGLEBUTTON::STYLE
 

Enumeration values:
STYLE_Check  Checkbox style.
STYLE_Radio  Radiobutton style.
STYLE_RadioFirst  Radiobutton style, first in radio group (MFC only).

Definition at line 844 of file ctrl.h.


Constructor & Destructor Documentation

MGUI::CTRL_TOGGLEBUTTON::CTRL_TOGGLEBUTTON  )  [inline]
 

Constructor.

Definition at line 853 of file ctrl.h.

virtual MGUI::CTRL_TOGGLEBUTTON::~CTRL_TOGGLEBUTTON  )  [virtual]
 

Destructor.


Member Function Documentation

void MGUI::CTRL_TOGGLEBUTTON::Create MGUI::LAYOUT_PANE_BASE ParentPane,
ICONID  iconid,
const MISTRING tooltip,
STYLE  style = STYLE_Check,
bool  dftvalue = false,
int  iconsize = 0
 

Create icon togglebutton with Unicode ToolTip.

Parameters:
ParentPane  Parent pane
iconid  Icon ID
tooltip  ToolTip string
style  Toggle style
dftvalue  Default value
iconsize  Icon size, 0 for default

void MGUI::CTRL_TOGGLEBUTTON::Create MGUI::LAYOUT_PANE_BASE ParentPane,
ICONID  iconid,
const char *  tooltip,
STYLE  style = STYLE_Check,
bool  dftvalue = false,
int  iconsize = 0
 

Create icon togglebutton with ToolTip from resource lookup.

Parameters:
ParentPane  Parent pane
iconid  Icon ID
tooltip  ToolTip string
style  Toggle style
dftvalue  Default value
iconsize  Icon size, 0 for default

void MGUI::CTRL_TOGGLEBUTTON::Create MGUI::LAYOUT_PANE_BASE ParentPane,
const MISTRING label,
STYLE  style = STYLE_Check,
bool  dftvalue = false,
MGUI::LAYOUT_SIZEALIGN  sizealign = MGUI::LAYOUT_SIZEALIGN_FixedSize
 

Create with Unicode label.

Parameters:
ParentPane  Parent pane
label  Label string
style  Toggle style
dftvalue  Default value

void MGUI::CTRL_TOGGLEBUTTON::Create MGUI::LAYOUT_PANE_BASE ParentPane,
const char *  label,
STYLE  style = STYLE_Check,
bool  dftvalue = false,
MGUI::LAYOUT_SIZEALIGN  sizealign = MGUI::LAYOUT_SIZEALIGN_FixedSize
 

Create with label from resource lookup.

Parameters:
ParentPane  Parent pane
label  Label string for resource lookup
style  Toggle style
dftvalue  Default value

CButton& MGUI::CTRL_TOGGLEBUTTON::GetCtrl  )  [inline]
 

Get reference to MFC control (MFC only).

Definition at line 905 of file ctrl.h.

bool MGUI::CTRL_TOGGLEBUTTON::GetValue  )  const [inline]
 

Get current toggle setting.

Definition at line 910 of file ctrl.h.

virtual void MGUI::CTRL_TOGGLEBUTTON::OnPressed  )  [protected, virtual]
 

Called when button is pushed.

void MGUI::CTRL_TOGGLEBUTTON::SetValue bool  value,
bool  notify = true
 

Set control value.

Parameters:
value  Value to set
notify  If true call OnChangeValue() if value changed


The documentation for this class was generated from the following file:
Generated on Wed May 31 15:29:51 2006 for TNTsdk by  doxygen 1.3.8-20040913