PagePanel Class Reference

A container widget that scrolls by page. More...

Inheritance diagram for PagePanel:
Widget

List of all members.

Public Member Functions

 PagePanel ()
 Constructor.
int AddPage ()
 Adds an end page.
int AddPage (Panel panel)
 Adds an end page.
int InsertPage (int index, Panel panel)
 Inserts a panel at the position of the specified page number.
void InsertPage (int index)
 Inserts a page at the position of the specified page number.
bool RemovePage (Panel panel)
 Deletes the specified page.
void RemovePageAt (int index)
 Deletes the page of the specified page number.
Panel GetPage (int index)
 Obtains the panel of a specified page.
void ScrollTo (int index, bool withAnimation)
 Scrolls to the specified page position.

Protected Member Functions

override void DisposeSelf ()
 Frees used resources.
override void OnUpdate (float elapsedTime)
 Update processing.
internal override void OnTouchEvent (TouchEventCollection touchEvents)
 Touch event handler.
internal override void OnResetState ()
 Status reset handler.
internal override void OnPreviewKeyEvent (KeyEvent keyEvent)
 Advance key event handler.

Properties

int PageCount [get]
 Obtains the number of pages.
int CurrentPageIndex [get, set]
 Obtains and sets the current page number.
override float Width [get, set]
 Obtains and sets the width.
override float Height [get, set]
 Obtains and sets the height.
override bool Focusable [get, set]
 Obtains and sets whether to set the focus.

Detailed Description

A container widget that scrolls by page.

Made up of multiple panels.


Member Function Documentation

int AddPage ( Panel  panel)

Adds an end page.

Parameters:
panelPanel object to be added
Panel GetPage ( int  index)

Obtains the panel of a specified page.

Parameters:
indexIndex of page to be obtained
Returns:
Panel
int InsertPage ( int  index,
Panel  panel 
)

Inserts a panel at the position of the specified page number.

Parameters:
indexPosition for inserting a page (0 - )
panelPanel object of page to be inserted
Exceptions:
ArgumentOutOfRangeExceptionIndex is less than 0 or greater than PageCount
ArgumentNullExceptionPanel is null
void InsertPage ( int  index)

Inserts a page at the position of the specified page number.

Parameters:
indexPosition for inserting a page (0 - )
Exceptions:
ArgumentOutOfRangeExceptionIndex is less than 0 or greater than PageCount
internal override void OnPreviewKeyEvent ( KeyEvent  keyEvent) [protected, virtual]

Advance key event handler.

Parameters:
keyEventKey event

Reimplemented from Widget.

internal override void OnTouchEvent ( TouchEventCollection  touchEvents) [protected, virtual]

Touch event handler.

Parameters:
touchEventsTouch event

Reimplemented from Widget.

override void OnUpdate ( float  elapsedTime) [protected, virtual]

Update processing.

Parameters:
elapsedTimeElapsed time from previous update (ms)

Reimplemented from Widget.

bool RemovePage ( Panel  panel)

Deletes the specified page.

Parameters:
panelPage to be deleted
Returns:
If panel is deleted correctly, then true. Otherwise, false. If panel cannot be found, returns false.
void RemovePageAt ( int  index)

Deletes the page of the specified page number.

Parameters:
indexPage number to be deleted (0 - )
Exceptions:
ArgumentOutOfRangeExceptionIndex is less than 0 or equal to or greater than PageCount
void ScrollTo ( int  index,
bool  withAnimation 
)

Scrolls to the specified page position.

Parameters:
indexIndex of page
withAnimationWhether to execute the animation