This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Unigine.WidgetScrollBox Class

Inherits: Widget

This class creates a scroll box.

See Also#

  • UnigineScript API sample <UnigineSDK>/data/samples/widgets/scroll_00

WidgetScrollBox Class

Properties

int HScrollValue#

The current position (and also automatically the size) of the horizontal scroller. that is, it returns the width of the currently invisible area that determines the size of the slider.
set
Sets a position (and also the size) of the horizontal scroller. That is, it sets the width of the currently invisible area that determines the size of the slider.
set 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 HScrollStepSize#

The step of the horizontal scroller. this step is used to increment the scroll position.

int HScrollFrameSize#

The width of the currently visible area.

int HScrollObjectSize#

The width of the whole object that should be scrolled.

bool IsHScrollHidden#

A flag indicating if a horizontal scroll bar is hidden, disabled or always rendered.
set
Sets a flag indicating if a horizontal scroll bar is hidden, disabled or always rendered.
set value - Hide mode:
  • 0 to always render a scroll bar.
  • 1 to automatically hide a scroll bar, if necessary. If the container area is big enough to show all elements, the scroll bar is not rendered. And vice versa, if not all elements can be shown at once, a scroll bar is rendered.
  • 2 to always hide a scroll bar. In this mode, scroll bar bounds, though a bar itself is not rendered, are still taken into account when the widget bounds are calculated.
  • 3 to always hide a scroll bar and not to add scroll bar size when calculating widget bounds.

bool IsHScrollEnabled#

A value indicating if horizontal scrolling is enabled.
set
Sets a value indicating if horizontal scrolling is enabled.
set value - Positive number to enable horizontal scrolling, 0 to disable it.

int VScrollValue#

The current position (and also the size) of the vertical scroller. that is, it returns the height of the currently invisible area that determines the size of the slider.
set
Sets the position (and also the size) of the vertical scroller. That is, it sets the height of the currently invisible area that determines the size of the slider.
set value - Position of the scroller. The minimum value is 0, the maximum value is the difference between the object height and the frame height.

int VScrollStepSize#

The step of the vertical scroller. this step is used to increment the scroll position.

int VScrollFrameSize#

The height of the currently visible area.

int VScrollObjectSize#

The height of the whole object that should be scrolled.

bool IsVScrollHidden#

A flag indicating if a vertical scroll bar is hidden, disabled or always rendered.
set
Sets a flag indicating if a vertical scroll bar is hidden, disabled or always rendered.
set value - Hide mode:
  • 0 to always render a scroll bar.
  • 1 to automatically hide a scroll bar, if necessary. If the container area is big enough to show all elements, the scroll bar is not rendered. And vice versa, if not all elements can be shown at once, a scroll bar is rendered.
  • 2 to always hide a scroll bar. In this mode, scroll bar bounds, though a bar itself is not rendered, are still taken into account when the widget bounds are calculated.
  • 3 to always hide a scroll bar and not to add scroll bar size when calculating widget bounds.

bool IsVScrollEnabled#

A value indicating if vertical scrolling is enabled.
set
Sets a value indicating if vertical scrolling is enabled.
set value - Positive number to enable vertical scrolling, 0 to disable it.

int ScrollScale#

The divisor used to convert integer values into floating point values.

int Border#

A flag indicating if a one-pixel border is rendered around the widget content (in a shape of a box). the default is 1 (use a border).
set
Sets a flag indicating if a one-pixel border is rendered around the widget content (in a shape of a box). The default is 1 (use a border).
set value - Positive number to enable a border, 0 to disable it.

int PaddingBottom#

The current bottom padding for the widget content.

int PaddingTop#

The current top padding for the widget content.

int PaddingRight#

The current right-side padding for the widget content.

int PaddingLeft#

The current left-side padding for the widget content.

int SpaceY#

The vertical space between the widgets in the box and between them and the box border.

int SpaceX#

The horizontal space between the widgets in the box and between them and the box border.

vec4 VscrollColor#

Returns the current color used for the widget's vertical scroll.
set
Sets the color to be used for the widget's vertical scroll.
set value - Four-component vector specifying the color in the RGBA format.

vec4 HscrollColor#

Returns the current color used for the widget's horizontal scroll.
set
Sets the color to be used for the widget's horizontal scroll.
set value - Four-component vector specifying the color in the RGBA format.

vec4 BackgroundColor#

Returns the current background color used for the widget.
set
Sets the background color to be used for the widget.
set value - Four-component vector specifying the color in the RGBA format.

vec4 BorderColor#

Returns the current border color for the widget.
set
Sets the border color for the widget.
set value - Four-component vector specifying the color in the RGBA format.

Members


static WidgetScrollBox ( Gui gui, int x = 0, int y = 0 ) #

Constructor. Creates a box with scrolling based on given parameters.

Arguments

  • Gui gui - GUI, to which the new box will belong.
  • int x - Horizontal space between the widgets in the box and between them and the box border. This is an optional parameter.
  • int y - Vertical space between the widgets in the box and between them and the box border. This is an optional parameter.

void SetPadding ( int l, int r, int t, int b ) #

Sets widget paddings for all sides. Padding clears an area around the content of a widget (inside of it).

Arguments

  • int l - Left-side padding in pixels.
  • int r - Right-side padding in pixels.
  • int t - Top padding in pixels.
  • int b - Bottom padding in pixels.

void SetSpace ( int x, int y ) #

Sets a space between the widgets in the box and between them and the box border.

Arguments

  • int x - Horizontal space. If a negative value is specified, 0 will be used instead.
  • int y - Vertical space. If a negative value is specified, 0 will be used instead.

void SetBorderColor ( vec4 color ) #

Sets the border color for the widget.

Arguments

  • vec4 color - Four-component vector specifying the color in the RGBA format.

vec4 GetBorderColor ( ) #

Returns the current border color for the widget.

Return value

Four-component vector specifying the color in the RGBA format.

void SetBackgroundColor ( vec4 color ) #

Sets the background color to be used for the widget.

Arguments

  • vec4 color - Four-component vector specifying the color in the RGBA format.

vec4 GetBackgroundColor ( ) #

Returns the current background color used for the widget.

Return value

Four-component vector specifying the color in the RGBA format.

void SetHscrollColor ( vec4 color ) #

Sets the color to be used for the widget's horizontal scroll.

Arguments

  • vec4 color - Four-component vector specifying the color in the RGBA format.

vec4 GetHscrollColor ( ) #

Returns the current color used for the widget's horizontal scroll.

Return value

Four-component vector specifying the color in the RGBA format.

void SetVscrollColor ( vec4 color ) #

Sets the color to be used for the widget's vertical scroll.

Arguments

  • vec4 color - Four-component vector specifying the color in the RGBA format.

vec4 GetVscrollColor ( ) #

Returns the current color used for the widget's vertical scroll.

Return value

Four-component vector specifying the color in the RGBA format.
Last update: 2020-04-10
Build: ()