GridListPanel Class Reference

List widget with multiple rows and columns. More...

Inheritance diagram for GridListPanel:
ContainerWidget Widget

List of all members.

Public Member Functions

 GridListPanel (GridListScrollOrientation scrollOrientation)
 Constructor.
void StartItemRequest ()
 Starts the request of an item.
ListPanelItem GetListItem (int index)
 Obtains the specified index item.
void ScrollTo (int itemIndex, float pixelOffset, bool withAnimation)
 Scrolls to the specified item position.
void ScrollTo (int itemIndex, bool withAnimation)
 Scrolls to the specified item position.
void SetListItemCreator (ListItemCreator creator)
 Registers the method of creating items.
void SetListItemUpdater (ListItemUpdater updater)
 Registers the method of updating items.

Protected Member Functions

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

Properties

override float Width [get, set]
 Obtains and sets the width.
override float Height [get, set]
 Obtains and sets the height.
GridListScrollOrientation ScrollOrientation [get, set]
 Obtains the scroll direction.
UIColor BackgroundColor [get, set]
 Obtains and sets the background color.
float ItemWidth [get, set]
 Obtains and sets the width of an item.
float ItemHeight [get, set]
 Obtains and sets the height of an item.
float ItemVerticalGap [get, set]
 Obtains and sets the height of an item.
float ItemHorizontalGap [get, set]
 Obtains and sets the column spacing of an item.
ScrollBarVisibility ScrollBarVisibility [get, set]
 Obtains and sets the scroll bar view.
bool SnapScroll [get, set]
 Obtains and sets whether to stop for each item.
int ItemIndex [get]
 Obtains the index of the top left item in the display area.
float ItemPixelOffset [get]
 Obtains the deviation of the top left item in the display area.
int ItemCount [get, set]
 Obtains and sets the total number of items.

Events

EventHandler
< ListPanelItemSelectChangedEventArgs
SelectItemChanged
 Event called when item is selected.
EventHandler< TouchEventArgsScrolling
 Handler called during scrolling.

Detailed Description

List widget with multiple rows and columns.


Constructor & Destructor Documentation

GridListPanel ( GridListScrollOrientation  scrollOrientation)

Constructor.

Parameters:
scrollOrientationScroll direction

Member Function Documentation

ListPanelItem GetListItem ( int  index)

Obtains the specified index item.

Parameters:
indexItem index
Returns:
Item (null may be returned)
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.

void ScrollTo ( int  itemIndex,
bool  withAnimation 
)

Scrolls to the specified item position.

Parameters:
itemIndexItem index
withAnimationWhether to execute the animation
void ScrollTo ( int  itemIndex,
float  pixelOffset,
bool  withAnimation 
)

Scrolls to the specified item position.

Parameters:
itemIndexItem index
pixelOffsetItem deviation (pixels)
withAnimationWhether to execute the animation
void SetListItemCreator ( ListItemCreator  creator)

Registers the method of creating items.

Parameters:
creatorMethod of creating items
void SetListItemUpdater ( ListItemUpdater  updater)

Registers the method of updating items.

Parameters:
updaterMethod of updating items

Property Documentation

float ItemHeight [get, set]

Obtains and sets the height of an item.

Exceptions:
ArgumentOutOfRangeExceptionThe total of the item height and item row spacing is larger than the list height.
float ItemHorizontalGap [get, set]

Obtains and sets the column spacing of an item.

Exceptions:
ArgumentOutOfRangeExceptionThe total of the item column spacing and item width is larger than the list width.
int ItemIndex [get]

Obtains the index of the top left item in the display area.

The item includes the row and column spacing.

float ItemPixelOffset [get]

Obtains the deviation of the top left item in the display area.

(pixels)

float ItemVerticalGap [get, set]

Obtains and sets the height of an item.

Exceptions:
ArgumentOutOfRangeExceptionThe total of the item row spacing and item height is larger than the list height.
float ItemWidth [get, set]

Obtains and sets the width of an item.

Exceptions:
ArgumentOutOfRangeExceptionThe total of the item width and item column spacing is larger than the list width.