This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Режимы вывода изображения
Физика
Браузер SDK 2
Лицензирование и типы лицензий
Дополнения (Add-Ons)
Демонстрационные проекты
API Samples
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
Унифицированный язык шейдеров UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
API
Animations-Related Classes
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
VR-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

Unigine::WidgetScroll Class

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

This class creates a scrollbar: horizontal or vertical one.

The object of this class may look as follows:

Horizontal scroll

Horizontal scroll

Vertical scroll

Vertical scroll

See Also#

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 and adds it to the specified GUI.

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.

static WidgetScrollPtr create ( int object = 100, int frame = 10, int step = 1, int value = 0 ) #

Constructor. Creates a scroller with the given parameters and adds it to the Engine GUI.

Arguments

  • 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.

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 ( ) const#

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 ( ) const#

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 ( ) const#

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

Return value

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

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 ( ) const#

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 ( ) const#

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

Return value

Position of the scroller.

void setScrollColor ( const Math::vec4 & color ) #

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

Arguments

  • const Math::vec4 & color - Four-component vector specifying the color in the RGBA format.

Math::vec4 getScrollColor ( ) const#

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

Return value

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

void setSliderButton ( bool button ) #

Sets the display of slider buttons.

Arguments

  • bool button - true to display slider buttons, otherwise, false.

bool isSliderButton ( ) const#

Returns a value indicating if slider buttons are displayed.

Return value

true if slider buttons are displayed, otherwise, false.

void setMouseWheelOrientation ( int orientation ) #

Sets orientation of the mouse wheel scroll: horizontal or vertical (by default).

Arguments

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

int getMouseWheelOrientation ( ) const#

Returns orientation of the mouse wheel scroll: horizontal or vertical.

Return value

1 if the orientation is horizontal; 0 if it is vertical.
Last update: 13.12.2024
Build: ()