PushButton control supporting both text and icon buttons. More...
#include <mgui/ctrl.h>

Public Types | |
| enum | STYLE { STYLE_Default = 0, STYLE_NoFrame = 0x01, STYLE_NoMargin = 0x02, STYLE_SetCursor = 0x04, STYLE_WideMargins = 0x08, STYLE_HighlightOnMouseOver = 0x10, STYLE_ShadowOnMouseOver = 0x20, STYLE_TextAtLeft = 0x40 } |
Public Member Functions | |
| CTRL_PUSHBUTTON () | |
| virtual | ~CTRL_PUSHBUTTON () |
| void | Create (MGUI::LAYOUT_PANE_BASE &ParentPane, ICONID iconid, const MISTRING &tooltip, UINT16 iconsize=0, STYLE style=STYLE_Default, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedSize) |
| void | Create (MGUI::LAYOUT_PANE_BASE &ParentPane, const MGUI::ICON &iconNormal, const MGUI::ICON &iconMouseOver, const MISTRING &tooltip, STYLE style=STYLE_Default, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedSize) |
| void | Create (MGUI::LAYOUT_PANE_BASE &ParentPane, const MGUI::ICON &icon, const MISTRING &tooltip, STYLE style=STYLE_Default, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedSize) |
| void | Create (MGUI::LAYOUT_PANE_BASE &ParentPane, const MISTRING &label, STYLE style=STYLE_Default, MGUI::LAYOUT_SIZEALIGN sizealign=MGUI::LAYOUT_SIZEALIGN_FixedSize) |
| void | SetDelegateOnPressed (DELEGATE_VOID_NOPARMS delegate) |
| void | UpdateIcon (const MGUI::ICON &icon) |
Private Member Functions | |
| virtual void | OnPressed () |
PushButton control supporting both text and icon buttons.
Button styles.
| MGUI::CTRL_PUSHBUTTON::CTRL_PUSHBUTTON | ( | ) |
Constructor.
| virtual MGUI::CTRL_PUSHBUTTON::~CTRL_PUSHBUTTON | ( | ) | [virtual] |
Destructor.
| void MGUI::CTRL_PUSHBUTTON::Create | ( | MGUI::LAYOUT_PANE_BASE & | ParentPane, | |
| ICONID | iconid, | |||
| const MISTRING & | tooltip, | |||
| UINT16 | iconsize = 0, |
|||
| STYLE | style = STYLE_Default, |
|||
| MGUI::LAYOUT_SIZEALIGN | sizealign = MGUI::LAYOUT_SIZEALIGN_FixedSize | |||
| ) |
Create control with ICONID.
| ParentPane | Parent pane | |
| iconid | Icon ID | |
| tooltip | ToolTip string | |
| iconsize | Icon size, 0 for default | |
| style | Button style |
| void MGUI::CTRL_PUSHBUTTON::Create | ( | MGUI::LAYOUT_PANE_BASE & | ParentPane, | |
| const MGUI::ICON & | iconNormal, | |||
| const MGUI::ICON & | iconMouseOver, | |||
| const MISTRING & | tooltip, | |||
| STYLE | style = STYLE_Default, |
|||
| MGUI::LAYOUT_SIZEALIGN | sizealign = MGUI::LAYOUT_SIZEALIGN_FixedSize | |||
| ) |
Create control with different icons for "normal" and "mouse-over" states.
| ParentPane | Parent pane | |
| iconNormal | Icon | |
| iconMouseOver | Icon when mouse is over and not pressed | |
| tooltip | ToolTip string | |
| style | Button style |
| void MGUI::CTRL_PUSHBUTTON::Create | ( | MGUI::LAYOUT_PANE_BASE & | ParentPane, | |
| const MGUI::ICON & | icon, | |||
| const MISTRING & | tooltip, | |||
| STYLE | style = STYLE_Default, |
|||
| MGUI::LAYOUT_SIZEALIGN | sizealign = MGUI::LAYOUT_SIZEALIGN_FixedSize | |||
| ) |
Create control with icon.
| ParentPane | Parent pane | |
| icon | Icon | |
| tooltip | ToolTip string | |
| style | Button style |
| void MGUI::CTRL_PUSHBUTTON::Create | ( | MGUI::LAYOUT_PANE_BASE & | ParentPane, | |
| const MISTRING & | label, | |||
| STYLE | style = STYLE_Default, |
|||
| MGUI::LAYOUT_SIZEALIGN | sizealign = MGUI::LAYOUT_SIZEALIGN_FixedSize | |||
| ) |
Create control with text label.
| ParentPane | Parent pane | |
| label | Label string | |
| style | Button style |
| virtual void MGUI::CTRL_PUSHBUTTON::OnPressed | ( | ) | [private, virtual] |
Called when button is pushed.
Default implementation calls delegate if has been set.
| void MGUI::CTRL_PUSHBUTTON::SetDelegateOnPressed | ( | DELEGATE_VOID_NOPARMS | delegate | ) | [inline] |
Set delegate to call when button pressed.
| void MGUI::CTRL_PUSHBUTTON::UpdateIcon | ( | const MGUI::ICON & | icon | ) |
Update icon for button.
Button must have been created with icon and new icon must match size of original.
| icon | Icon |
1.6.1