This page has been translated automatically.
Programming
Fundamentials
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Bounds-Related Classes
Containers
Controls-Related Classes
Core Library
Engine-Related Classes
Node-Related Classes
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
Utility 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.

WidgetSlider Class

Interface for widget slider handling. See also UnigineScript analog.

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

WidgetSlider Class

Members


WidgetSlider (const Ptr<Gui> & gui, int min = 0, int max = 100, int value = 0)

Constructor. Creates a slider with given properties (horizontal one by default).

Arguments

  • const Ptr<Gui> & gui - GUI, to which the slider will belong.
  • int min - Minimum value.
  • int max - Maximum value.
  • int value - Initial value.

int getMaxValue ()

Returns the maximum value of the slider.

Return value

Maximum value.

void setButtonWidth (int width)

Sets the width of the slider handle in pixels (for a horizontal slider).

Arguments

  • int width - Width of the handle in pixels.

int type ()

WidgetSlider type.

Return value

WidgetSlider type identifier.

void setMaxExpand (int expand)

Sets the maximum value, up to which the upper limit of the range of the slider values can be expanded.

Arguments

  • int expand - Maximum value, up to which the slider's upper limit can be raised.

void setButtonHeight (int height)

Sets the height of the slider handle in pixels (for a vertical slider).

Arguments

  • int height - Height of the handle in pixels.

int getMinExpand ()

Returns the minimum value, up to which the lower limit of the range of the slider values can be expanded. The lower limit of the slider can be expanded only if the slider is attached to an editline with the Gui::ATTACH_MIN_EXPAND flag.

Return value

Minimum value, up to which the slider's lower limit can be dropped.

int getButtonHeight ()

Returns the height of the slider handle in pixels (for a vertical slider).

Return value

Height of the handle in pixels.

int getMinValue ()

Returns the minimum value of the slider.

Return value

Minimum value.

void setValue (int value)

Sets a new current value for the slider, i.e. its position.

Arguments

  • int value - Slider value.

int getButtonWidth ()

Returns the width of the slider handle in pixels (for a horizontal slider).

Return value

Width of the handle in pixels.

void setMinExpand (int expand)

Sets the minimum value, up to which the lower limit of the range of the slider values can be expanded.

Arguments

  • int expand - Minimum value, up to which the slider's lower limit can be dropped.

int getValue ()

Returns the current value of the slider, i.e. its position.

Return value

Current slider value.

void setMaxValue (int value)

Sets the maximum value for the slider.

Arguments

  • int value - Maximum value.

int getMaxExpand ()

Returns the current maximum value, up to which the upper limit of the range of the slider values can be expanded. The upper limit of the slider can be expanded only if the slider is attached to an editline with the Gui::ATTACH_MAX_EXPAND flag.

Return value

Maximum value, up to which the slider's upper limit can be raised.

void setMinValue (int value)

Sets the minimum value for the slider.

Arguments

  • int value - Minimum value.

Ptr<WidgetSlider> create (const Ptr<Widget> & widget)

WidgetSlider constructor.

Arguments

  • const Ptr<Widget> & widget - Widget smart pointer.

Return value

void setOrientation (int orientation)

Sets orientation of the slider: 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 slider: horizontal or vertical one.

Return value

1 if the orientation is vertical; 0 if it is horizontal.
Last update: 2017-07-03
Build: ()