MGUI::FORM_TABBED Class Reference

Form with tabs to allow user to select page from one or more available pages. More...

#include <mgui/formtabbed.h>

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

List of all members.

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_BASEGetPagePane (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)

Detailed Description

Form with tabs to allow user to select page from one or more available pages.


Member Enumeration Documentation

Form style enumeration.

Enumerator:
FORMSTYLE_TabTopLeft 

Tabs on top at left (default if no other tab location specified).

FORMSTYLE_TabTopRight 

Tabs on top at right.

FORMSTYLE_TabBottomLeft 

Tabs on bottom at left.

FORMSTYLE_TabBottomRight 

Tabs on bottom at right.

FORMSTYLE_TabLeftTop 

Tabs on left at top.

FORMSTYLE_TabLeftBottom 

Tabs on left at bottom.

FORMSTYLE_TabRightTop 

Tabs on right at top.

FORMSTYLE_TabRightBottom 

Tabs on right at bottom.

FORMSTYLE_UseIcons 

Use icons on tabs.

Style for pages.

Enumerator:
PAGESTYLE_Default 
PAGESTYLE_IgnoreNonVisible 

Ignore non-visible items for layout of page.

PAGESTYLE_Disabled 

Page is initially disabled.

PAGESTYLE_ShowTextWithIcon 

Show both text label and icon.


Constructor & Destructor Documentation

MGUI::FORM_TABBED::FORM_TABBED (  ) 

Constructor.

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

Destructor.


Member Function Documentation

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().

Returns:
Index of page, use GetPagePane() to access pane for creating controls on page.
Parameters:
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().

Returns:
Index of page, use GetPagePane() to access pane for creating controls on page.
Parameters:
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.

Returns:
Zero-based index to active page, -1 if none created.
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.

Parameters:
pageindex Zero-based page index
void MGUI::FORM_TABBED::SetActivePage ( int  pageindex  ) 

Set active page by index.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
pageindex Zero-based page index

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

Generated on Sun Oct 7 21:36:08 2012 for TNTsdk 2012 by  doxygen 1.6.1