Form with tabs to allow user to select page from one or more available pages. More...
#include <mgui/formtabbed.h>

Public Types | |
| enum | FORMSTYLE { FORMSTYLE_TabTopLeft = 0x00, FORMSTYLE_TabTopRight = 0x01, FORMSTYLE_TabBottomLeft = 0x02, FORMSTYLE_TabBottomRight = 0x03, FORMSTYLE_TabLeftTop = 0x04, FORMSTYLE_TabLeftBottom = 0x05, FORMSTYLE_TabRightTop = 0x06, FORMSTYLE_TabRightBottom = 0x07, FORMSTYLE_UseIcons = 0x08 } |
| enum | PAGESTYLE { PAGESTYLE_Default = 0, PAGESTYLE_IgnoreNonVisible = 0x01, PAGESTYLE_Disabled = 0x02, PAGESTYLE_ShowTextWithIcon = 0x04 } |
Public Member Functions | |
| FORM_TABBED () | |
| virtual | ~FORM_TABBED () |
| int | AddPage (const MGUI::ICON &icon, const MISTRING &tooltip, MGUI::LAYOUT_ORIENTATION orientation=MGUI::LAYOUT_ORIENTATION_Vertical, PAGESTYLE pagestyle=PAGESTYLE_Default, int ChildSpacing=4, int ExtraBorder=4) |
| int | AddPage (const MISTRING &label, MGUI::LAYOUT_ORIENTATION orientation=MGUI::LAYOUT_ORIENTATION_Vertical, PAGESTYLE pagestyle=PAGESTYLE_Default, int ChildSpacing=4, int ExtraBorder=4) |
| void | Create (MGUI::LAYOUT_PANE_BASE &PaneParent, FORMSTYLE formstyle=FORMSTYLE_TabTopLeft, LAYOUT_SIZEALIGN sizealign=LAYOUT_SIZEALIGN_FixedSize) |
| int | GetActivePage () const |
| int | GetNumPages () const |
| LAYOUT_PANE_BASE & | GetPagePane (int pageindex) |
| void | SetActivePage (int pageindex) |
| void | SetDelegateOnPageActivate (DELEGATE_VOID_NOPARMS delegate, int pageindex=-1) |
| void | SetDelegateOnPageDeactivate (DELEGATE_BOOL_NOPARMS delegate, int pageindex=-1) |
| void | SetPageEnabled (int pageindex, bool enabled=true) |
Form with tabs to allow user to select page from one or more available pages.
Form style enumeration.
| MGUI::FORM_TABBED::FORM_TABBED | ( | ) |
Constructor.
| virtual MGUI::FORM_TABBED::~FORM_TABBED | ( | ) | [virtual] |
Destructor.
| int MGUI::FORM_TABBED::AddPage | ( | const MGUI::ICON & | icon, | |
| const MISTRING & | tooltip, | |||
| MGUI::LAYOUT_ORIENTATION | orientation = MGUI::LAYOUT_ORIENTATION_Vertical, |
|||
| PAGESTYLE | pagestyle = PAGESTYLE_Default, |
|||
| int | ChildSpacing = 4, |
|||
| int | ExtraBorder = 4 | |||
| ) |
Add page with icon tab to form, must be called after Create().
| icon | Icon for tab | |
| tooltip | ToolTip string |
| int MGUI::FORM_TABBED::AddPage | ( | const MISTRING & | label, | |
| MGUI::LAYOUT_ORIENTATION | orientation = MGUI::LAYOUT_ORIENTATION_Vertical, |
|||
| PAGESTYLE | pagestyle = PAGESTYLE_Default, |
|||
| int | ChildSpacing = 4, |
|||
| int | ExtraBorder = 4 | |||
| ) |
Add page with text label tab to form, must be called after Create().
| label | Label string |
| void MGUI::FORM_TABBED::Create | ( | MGUI::LAYOUT_PANE_BASE & | PaneParent, | |
| FORMSTYLE | formstyle = FORMSTYLE_TabTopLeft, |
|||
| LAYOUT_SIZEALIGN | sizealign = LAYOUT_SIZEALIGN_FixedSize | |||
| ) |
Create the form, must be called before AddPage().
| int MGUI::FORM_TABBED::GetActivePage | ( | ) | const |
Get index to 'active' page.
| int MGUI::FORM_TABBED::GetNumPages | ( | ) | const |
Get number of tab pages.
| LAYOUT_PANE_BASE& MGUI::FORM_TABBED::GetPagePane | ( | int | pageindex | ) |
Get reference to pane for specified page index.
| pageindex | Zero-based page index |
| void MGUI::FORM_TABBED::SetActivePage | ( | int | pageindex | ) |
Set active page by index.
| pageindex | Zero-based page index |
| void MGUI::FORM_TABBED::SetDelegateOnPageActivate | ( | DELEGATE_VOID_NOPARMS | delegate, | |
| int | pageindex = -1 | |||
| ) |
Set delegate to call after page is activated.
Note that if both page-specific and "overall" delegates are set then both will be called. Also note that delegate may not attempt to call SetActivePage(), attempts to do so will be ignored.
| delegate | Delegate to call | |
| pageindex | Page to set for, -1 to set in addition to any page-specific delegate |
| void MGUI::FORM_TABBED::SetDelegateOnPageDeactivate | ( | DELEGATE_BOOL_NOPARMS | delegate, | |
| int | pageindex = -1 | |||
| ) |
Set delegate to call before page is deactivated.
Note that if both page-specific and "overall" delegates are set then both will be called. Also note that delegate may not attempt to call SetActivePage(), attempts to do so will be ignored.
| delegate | Delegate to call, return 'true' to accept, 'false' to keep current page | |
| pageindex | Page to set for, -1 to set in addition to any page-specific delegate |
| void MGUI::FORM_TABBED::SetPageEnabled | ( | int | pageindex, | |
| bool | enabled = true | |||
| ) |
Set whether page is enabled.
| pageindex | Zero-based page index |
1.6.1