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#
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#
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#
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#
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 and adds it to the specified GUI.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.
static WidgetScrollBox ( int x = 0, int y = 0 ) #
Constructor. Creates a box with scrolling based on given parameters and adds it to the Engine GUI.Arguments
- 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.
Last update:
2020-07-31
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)