This page has been translated automatically.
Видеоуроки
Interface
Essentials
Advanced
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Landscape Tool
Sandworm
Использование инструментов редактора для конкретных задач
Extending Editor Functionality
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World Nodes
Звуковые объекты
Объекты поиска пути
Players
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
Унифицированный язык шейдеров UUSL
Плагины
File Formats
Rebuilding the Engine Tools
GUI
Двойная точность координат
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
Работа с контентом
Оптимизация контента
Материалы
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine::WidgetTabBox Class

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

This class creates a box with several tabs.

WidgetTabBox Class

Members


static WidgetTabBoxPtr create ( const Ptr<Gui> & gui, int x = 0, int y = 0 ) #

Constructor. Creates a tabbed box with given parameters and adds it to the specified GUI.

Arguments

  • const Ptr<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 WidgetTabBoxPtr create ( int x = 0, int y = 0 ) #

Constructor. Creates a tabbed box with 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 setCurrentTab ( int tab ) #

Makes a given tab current.

Arguments

  • int tab - Tab number in range from 0 to the total number of tabs.

int getCurrentTab ( ) const#

Returns the number of the current tab.

Return value

Tab number.

const char * getCurrentTabData ( ) const#

Returns the data of the current tab. The data can be used as a text identifier of the item (instead of using the number of the item).

Return value

Tab data.

const char * getCurrentTabText ( ) const#

Returns the title of the current tab.

Return value

Tab title.

void setImage ( const Ptr<Image> & image ) #

Sets a tab icons atlas image. This atlas is a vertical strip of square icons.

Arguments

Ptr<Image> getImage ( ) const#

Returns the tab icons atlas image. This atlas is a vertical strip of square icons.

Return value

Tabs atlas.

int getNumTabs ( ) const#

Returns the total number of tabs in the box.

Return value

Number of tabs.

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.

int getPaddingBottom ( ) const#

Returns the current bottom padding for the widget content.

Return value

Bottom padding in pixels.

int getPaddingLeft ( ) const#

Returns the current left-side padding for the widget content.

Return value

Left-side padding in pixels.

int getPaddingRight ( ) const#

Returns the current right-side padding for the widget content.

Return value

Right-side padding in pixels.

int getPaddingTop ( ) const#

Returns the current top padding for the widget content.

Return value

Top 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 provided, 0 will be used instead.
  • int y - Vertical space. If a negative value is provided, 0 will be used instead.

int getSpaceX ( ) const#

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

Return value

Horizontal space.

int getSpaceY ( ) const#

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

Return value

Vertical space.

void setTabData ( int num, const char * str ) #

Sets the data for the given tab. The data can be used as a text identifier of the item (instead of using the number of the item).

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.
  • const char * str - Data to set.

const char * getTabData ( int num ) const#

Returns the data of a given tab. The data can be used as a text identifier of the item (instead of using the number of the item).

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.

Return value

Tab data.

void setTabHidden ( int num, bool hidden ) #

Sets a value indicating that a specified tab should not be rendered visible. By default all widget tabs are visible.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.
  • bool hidden - 1 for the tab to be invisible; otherwise, 0.

bool isTabHidden ( int num ) const#

Returns a value indicating if the specified tab is invisible.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.

Return value

1 if the specified tab is invisible; otherwise, 0.

void setTabText ( int num, const char * str ) #

Sets a title for the current tab.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.
  • const char * str - Tab title.

const char * getTabText ( int num ) const#

Returns the title of a given tab.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.

Return value

Tab title.

void setTabTexture ( int num, int texture ) #

Sets an icon for the specified tab.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.
  • int texture - Zero-based ID of the icon (icon number in the atlas column). -1 specifies that a tab has no icon.

int getTabTexture ( int num ) const#

Returns the icon of the specified tab.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.

Return value

Zero-based ID of the icon (icon number in the atlas column). -1 specifies that a tab has no icon.

void setTabToolTip ( int num, const char * str ) #

Sets a tooltip for the specified tab.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.
  • const char * str - Tooltip to display.

const char * getTabToolTip ( int num ) const#

Returns the tooltip of the given tab.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.

Return value

Displayed tooltip.

void setTexture ( const char * texture ) #

Sets a texture to be used as tab icons atlas. This atlas is a vertical strip of square icons.

Arguments

  • const char * texture - Path to the atlas texture.

const char * getTexture ( ) const#

Returns the path to the tab icons atlas texture. This atlas is a vertical strip of square icons.

Return value

Path to the atlas texture.

int addTab ( const char * str, int texture = -1 ) #

Adds a new tab with a given title and icon to the box.

Arguments

  • const char * str - Tab title.
  • int texture - Zero-based ID of the icon (icon number in the atlas column). -1 means that a tab has no icon.

Return value

Number of the added tab.

void clear ( ) #

Removes all tabs from the box.

void removeTab ( int num ) #

Removes a given tab from the box.

Arguments

  • int num - Tab number in range from 0 to the total number of tabs.

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

Sets the color for the widget's button.

Arguments

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

Math::vec4 getButtonColor ( ) const#

Returns the current color for the widget's button.

Return value

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

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

Sets the border color for the widget.

Arguments

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

Math::vec4 getBorderColor ( ) const#

Returns the current border color for the widget.

Return value

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