ScrollPanel Class Reference

A container widget which has the area where scrolling is enabled. More...

Inheritance diagram for ScrollPanel:
ContainerWidget Widget

List of all members.

Public Member Functions

 ScrollPanel ()
 Constructor.
override void AddChildFirst (Widget child)
 Adds the child widget to the beginning.
override void AddChildLast (Widget child)
 Adds the child widget to the end.
override void InsertChildBefore (Widget child, Widget nextChild)
 Inserts it immediately in front of the specified child widget.
override void InsertChildAfter (Widget child, Widget prevChild)
 Inserts it immediately after the specified child widget.
override void RemoveChild (Widget child)
 Deletes the specified child widget.
void ScrollTo (float x, float y, bool withAnimation)
 Scrolls to the specified position.

Protected Member Functions

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

Properties

override float Width [get, set]
 Obtains and sets the width.
override float Height [get, set]
 Obtains and sets the height.
float PanelX [get, set]
 Obtains and sets the X coordinate of the panel in the parent coordinate system.
float PanelY [get, set]
 Obtains and sets the Y coordinate of the panel in the parent coordinate system.
float PanelWidth [get, set]
 Obtains and sets the width of the panel.
float PanelHeight [get, set]
 Obtains and sets the height of the panel.
UIColor PanelColor [get, set]
 Obtains and sets the color of the panel.
ScrollBarVisibility ScrollBarVisibility [get, set]
 Obtains and sets the scroll bar view.
bool HorizontalScroll [get, set]
 Obtains and sets whether to perform horizontal scrolling.
bool VerticalScroll [get, set]
 Obtains and sets whether to perform vertical scrolling.
override IEnumerable< WidgetChildren [get]
 Obtains the child widget.
override bool Focusable [get, set]
 Obtains and sets whether to set the focus.

Detailed Description

A container widget which has the area where scrolling is enabled.


Member Function Documentation

override void AddChildFirst ( Widget  child) [virtual]

Adds the child widget to the beginning.

Parameters:
childChild widget to be added

Moves it to the beginning if it has already been added.

Reimplemented from ContainerWidget.

override void AddChildLast ( Widget  child) [virtual]

Adds the child widget to the end.

Parameters:
childChild widget to be added

Moves it to the end if it has already been added.

Reimplemented from ContainerWidget.

override void InsertChildAfter ( Widget  child,
Widget  prevChild 
) [virtual]

Inserts it immediately after the specified child widget.

Parameters:
childChild widget to be inserted
prevChildChild widget immediately in front of the inserted child widget

Moves it immediately after the specified child widget if it has already been added.

Reimplemented from ContainerWidget.

override void InsertChildBefore ( Widget  child,
Widget  nextChild 
) [virtual]

Inserts it immediately in front of the specified child widget.

Parameters:
childChild widget to be inserted
nextChildChild widget immediately after the inserted child widget

Moves it immediately in front of the specified child widget if it has already been added.

Reimplemented from ContainerWidget.

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.

override void RemoveChild ( Widget  child) [virtual]

Deletes the specified child widget.

Parameters:
childChild widget to be deleted

Reimplemented from ContainerWidget.

void ScrollTo ( float  x,
float  y,
bool  withAnimation 
)

Scrolls to the specified position.

Directions in which scrolling cannot be performed are ignored.

Parameters:
xX coordinate of inside panel at top right. This is the value in which PanelX and positive and negative are inverted.
yY coordinate of inside panel at top right. This is the value in which PanelY and positive and negative are inverted.
withAnimationWhether to execute the animation

Property Documentation

override IEnumerable<Widget> Children [get]

Obtains the child widget.

Returns the enumerator that repetitively handles the collection.

Reimplemented from ContainerWidget.