MGUI::FORM_BOOK Class Reference

Form containing multiple "pages", only one of which is shown at at time. More...

#include <mgui/formbook.h>

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

List of all members.

Public Types

enum  PAGESTYLE { PAGESTYLE_Default = 0, PAGESTYLE_IgnoreNonVisible = 0x01 }

Public Member Functions

 FORM_BOOK ()
virtual ~FORM_BOOK ()
int AddPage (MGUI::LAYOUT_ORIENTATION orientation=MGUI::LAYOUT_ORIENTATION_Vertical, PAGESTYLE pagestyle=PAGESTYLE_Default, int ChildSpacing=4, int ExtraBorder=0)
void Create (MGUI::LAYOUT_PANE_BASE &PaneParent, LAYOUT_SIZEALIGN sizealign=LAYOUT_SIZEALIGN_FixedSize, int ExtraBorder=0)
int GetActivePage () const
int GetNumPages () const
MGUI::ID GetPageID (int pageindex) const
LAYOUT_PANEGetPagePane (int pageindex)
void SetActivePage (int pageindex)
void SetActivePageID (MGUI::ID id)
void SetPageID (int pageindex, MGUI::ID id)

Detailed Description

Form containing multiple "pages", only one of which is shown at at time.

All pages are the same size, which avoids issues with resizing when switching pages.


Member Enumeration Documentation

Style for pages.

Enumerator:
PAGESTYLE_Default 
PAGESTYLE_IgnoreNonVisible 

Ignore non-visible items for layout of page.


Constructor & Destructor Documentation

MGUI::FORM_BOOK::FORM_BOOK (  ) 

Constructor.

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

Destructor.


Member Function Documentation

int MGUI::FORM_BOOK::AddPage ( MGUI::LAYOUT_ORIENTATION  orientation = MGUI::LAYOUT_ORIENTATION_Vertical,
PAGESTYLE  pagestyle = PAGESTYLE_Default,
int  ChildSpacing = 4,
int  ExtraBorder = 0 
)

Add page to form, must be called after Create().

Returns:
Index of page, use GetPagePane() to access pane for creating controls on page.
void MGUI::FORM_BOOK::Create ( MGUI::LAYOUT_PANE_BASE PaneParent,
LAYOUT_SIZEALIGN  sizealign = LAYOUT_SIZEALIGN_FixedSize,
int  ExtraBorder = 0 
)

Create the form, must be called before AddPage().

int MGUI::FORM_BOOK::GetActivePage (  )  const [inline]

Get index to 'active' page.

Returns:
index to active page, -1 if none created.
int MGUI::FORM_BOOK::GetNumPages (  )  const [inline]

Get number of pages.

MGUI::ID MGUI::FORM_BOOK::GetPageID ( int  pageindex  )  const [inline]

Get page ID.

Parameters:
pageindex Page index as returned by AddPage()
LAYOUT_PANE& MGUI::FORM_BOOK::GetPagePane ( int  pageindex  )  [inline]

Get reference to pane for specified page index.

Do not do SetVisible() on returned LAYOUT_PANE, visibility must be changed via SetActivePage().

Parameters:
pageindex Page index as returned by AddPage()
void MGUI::FORM_BOOK::SetActivePage ( int  pageindex  ) 

Set active page by index.

Parameters:
pageindex Page index as returned by AddPage()
void MGUI::FORM_BOOK::SetActivePageID ( MGUI::ID  id  ) 

Set active page by ID.

void MGUI::FORM_BOOK::SetPageID ( int  pageindex,
MGUI::ID  id 
)

Set page ID.

Parameters:
pageindex Page index as returned by AddPage()

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

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