This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::WidgetScroll Class

Interface for widget scroll handling. See also UnigineScript analog.

To use this class, include the UnigineWidgetScroll.h file.

Unigine::WidgetScroll Class

Members


static int type ()

WidgetScroll type.

Return value

WidgetScroll type identifier.

static Ptr< WidgetScroll > create (const WidgetPtr & widget)

WidgetScroll constructor.

Arguments

  • const WidgetPtr & widget - Widget smart pointer.

static Ptr< WidgetScroll > create (const Ptr< Gui > & gui, int object, int frame, int step, int value)

WidgetScroll constructor.

Arguments

  • const Ptr< Gui > & gui - Gui pointer.
  • int object - Width of the object to scroll in pixels. This is an optional argument. The default is 100.
  • int frame - Width of the visible area in pixels. This is an optional argument. The default is 100.
  • int step - Step of the scroller in pixels. This is an optional argument. The default is 1.
  • int value - Initial position of the scroller. This is an optional argument.

virtual void setOrientation (int orientation) const =0

Sets orientation of the scroller: horizontal (by default) or vertical one.

Arguments

  • int orientation - 1 to set horizontal orientation; 0 to set vertical one.

virtual int getOrientation () const =0

Returns the current orientation of the scroller: horizontal or vertical one.

Return value

1 if the orientation is vertical; 0 if it is horizontal.

virtual void setObjectSize (int size) const =0

Sets the size of the whole area to be scrolled through.

Arguments

  • int size - Size of the object being scrolled in pixels. The minimum is 1 pixel.

virtual int getObjectSize () const =0

Returns the size of the whole area that is scrolled through.

Return value

Size of the object being scrolled in pixels.

virtual void setFrameSize (int size) const =0

Sets the size of the currently visible area.

Arguments

  • int size - Size of the visible area in pixels. The minimum is 1 pixel.

virtual int getFrameSize () const =0

Returns the size of the currently visible area.

Return value

Size of the visible area in pixels.

virtual void setStepSize (int size) const =0

Sets the step of the scroller. This step is used to increment the scroll position.

Arguments

  • int size - Step of the scroller in pixels. The minimum is 1 pixel.

virtual int getStepSize () const =0

Returns the step of the scroller. This step is used to increment the scroll position.

Return value

Step of the scroller in pixels.

virtual void setValue (int value) const =0

Sets a value of the scroller, i.e. its position.

Arguments

  • int value - Position of the scroller. The minimum value is 0, the maximum value is the difference between the object width and the frame width.

virtual int getValue () const =0

Returns the value of the scroller, i.e. its position.

Return value

Position of the scroller.
Last update: 2017-07-03
Build: ()