This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
FAQ
编程
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::WidgetScroll Class

Header:#include <UnigineWidgets.h>
Inherits:Widget

This class creates a scrollbar: horizontal or vertical one.

WidgetScroll Class

Members


static WidgetScrollPtr create(const Ptr<Gui> & gui, int object = 100, int frame = 10, int step = 1, int value = 0)

Constructor. Creates a scroller with the given parameters.

Arguments

  • const Ptr<Gui> & gui - GUI, to which the scroll bar will belong.
  • int object - Width of the object to scroll in pixels. This is an optional argument.
  • int frame - Width of the visible area in pixels. This is an optional argument.
  • int step - Step of the scroller in pixels. This is an optional argument.
  • int value - Initial position of the scroller. This is an optional argument.

Ptr<WidgetScroll> cast(const Ptr<Widget> & widget)

Casts a WidgetScroll out of the Widget instance.

Arguments

  • const Ptr<Widget> & widget - Pointer to Widget.

Return value

Pointer to WidgetScroll.

void setFrameSize(int size)

Sets the size of the currently visible area.

Arguments

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

int getFrameSize()

Returns the size of the currently visible area.

Return value

Size of the visible area in pixels.

void setObjectSize(int size)

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.

int getObjectSize()

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

Return value

Size of the object being scrolled in pixels.

void setOrientation(int orientation)

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

Arguments

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

int getOrientation()

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

Return value

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

void setStepSize(int size)

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.

int getStepSize()

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

Return value

Step of the scroller in pixels.

void setValue(int value)

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.

int getValue()

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

Return value

Position of the scroller.

int type()

WidgetScroll type.

Return value

WidgetScroll type identifier.
Last update: 2018-06-04
Build: ()