This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
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
Учебные материалы
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Unigine::EngineWindowGroup Class

Header: #include <UnigineWindowManager.h>
Inherits from: EngineWindow

The class to create and manage window groups: arrangement of multiple windows of a group into tabs, defining the parameters of such elements as tabs and window separators, detecting intersections with nested windows.

Window group elements

EngineWindowGroup Class

Enums

GROUP_TYPE#

ИмяОписание
GROUP_TYPE_NONE = 0A separate window inside the group.
GROUP_TYPE_TAB = 1Windows are arranged into a group of tabs with a selected window displayed atop the others in the group.
GROUP_TYPE_HORIZONTAL = 2Windows are arranged into a horizontally displayed group.
GROUP_TYPE_VERTICAL = 3Windows are arranged into a vertically displayed group.

AUTO_DELETE_MODE#

ИмяОписание
AUTO_DELETE_MODE_NONE = 0Automatic deletion of the window is disabled.
AUTO_DELETE_MODE_EMPTY = 1A window group is deleted automatically if it doesn't contain any nested windows.
AUTO_DELETE_MODE_SINGLE_WINDOW = 2A group is deleted automatically, if only one window is left. If this was a child group, it is automatically transformed to a child window.

Members


EngineWindowGroup ( EngineWindowGroup::GROUP_TYPE group_type, const Math::ivec2 & size, int flags = 0 ) #

Constructor. Creates the window group of the specified type and size with the specified flags.

Arguments

EngineWindowGroup ( EngineWindowGroup::GROUP_TYPE group_type, int width, int height, int flags = 0 ) #

Constructor. Creates the window group of the specified type and size with the specified flags.

Arguments

EngineWindowGroup ( EngineWindowGroup::GROUP_TYPE group_type, const char * window_title, int width, int height, int flags = 0 ) #

Constructor. Creates the window group of the specified type and size with the specified title and flags.

Arguments

  • EngineWindowGroup::GROUP_TYPE group_type - The type of the group.
  • const char * window_title - The title of the window, in UTF-8 encoding.
  • int width - Window width.
  • int height - Window height.
  • int flags - Mask containing window flags.

EngineWindowGroup::GROUP_TYPE getGroupType ( ) const#

Returns the window group type set in the constructor — vertical, horizontal, tab arrangement of windows, or an independent window inside a group.

Return value

The window group type.

void setFixed ( bool fixed ) #

Sets a value specifying if windows can be added to this group or removed from it.

Arguments

  • bool fixed - true to disable adding or removing windows from this group, otherwise false.

bool isFixed ( ) const#

Returns a value specifying if windows can be added to this group or removed from it.

Return value

true if adding or removing windows from this group is disabled, otherwise false.

void setAutoDeleteMode ( EngineWindowGroup::AUTO_DELETE_MODE mode ) #

Sets the automatic window deletion mode.

Arguments

EngineWindowGroup::AUTO_DELETE_MODE getAutoDeleteMode ( ) const#

Returns the automatic window deletion mode.

Return value

The automatic window deletion mode.

void add ( const Ptr<EngineWindow> & window, int target_index = -1 ) #

Adds a window at a specified index. The window becomes nested (i.e. its borders, style, title bar, etc. are disabled).
Notice
If the group is fixed, a window won't be added to the group and the console will display a corresponding warning.

Arguments

  • const Ptr<EngineWindow> & window - Window to be added.
  • int target_index - The window order. If no index is set, the window is added as the last one.

void remove ( const Ptr<EngineWindow> & window ) #

Removes the specified window from the group. The window's settings are the same as before adding it to the group.
Notice
If the group is fixed, a window won't be removed from the group and the console will display a corresponding warning.

Arguments

void removeByIndex ( int index ) #

Removes the window at a specified index from the group. The window's settings are the same as before adding it to the group.
Notice
If the group is fixed, a window won't be removed from the group and the console will display a corresponding warning.

Arguments

  • int index - The index of the window to be removed.

int getNumNestedWindows ( ) const#

Returns the total number of nested windows in the group.

Return value

The total number of nested windows in the group.

Ptr<EngineWindow> getNestedWindow ( int index ) const#

Returns the nested engine window by its index.

Arguments

  • int index - Index of the nested window.

Return value

Nested engine window.

int getNestedWindowIndex ( const Ptr<EngineWindow> & window ) #

Returns the index of the specified nested engine window.

Arguments

Return value

Index of the nested window.

bool containsNestedWindow ( const Ptr<EngineWindow> & window ) const#

Returns the value indicating if the specified window is a direct child of the current group.

Arguments

Return value

true if the specified window is a direct child of the current one, otherwise false.

bool containsNestedWindowInHierarchy ( const Ptr<EngineWindow> & window ) const#

Returns the value indicating if the specified window is a child of the current group or any of its children.

Arguments

Return value

true if the specified window is a child of the current one, otherwise false.

void setTabTitle ( int index, const char * title ) #

Adds the title to the specified tab and the window itself.

Arguments

  • int index - Index of the tab.
  • const char * title - Title to be added.

void setTabIcon ( int index, const Ptr<Image> & image ) #

Adds the image to the specified tab and the window itself.

Arguments

  • int index - Index of the tab.
  • const Ptr<Image> & image - Image to be added.

int getCurrentTab ( ) const#

Returns the index of the currently active tab in a tab group.

Return value

The index of the currently active tab.

int getTabWidth ( int index ) const#

Returns the width of the tab. Available for horizontal groups only.

Arguments

  • int index - The index of the tab.

Return value

The width of the the tab.

int getTabHeight ( int index ) const#

Returns the height of the tab. Available for vertical groups only.

Arguments

  • int index - The index of the tab.

Return value

The height of the tab.

int getTabBarWidth ( int index ) const#

Returns the width of the tab bar.

Arguments

  • int index - The index of the tab.

Return value

The width of the tab bar.

int getTabBarHeight ( int index ) const#

Returns the height of the tab bar.

Arguments

  • int index - The index of the tab.

Return value

The height of the tab bar.

Math::ivec2 getTabLocalPosition ( int index ) const#

Returns the screen position of the tab relatively to the parent group (global window). The coordinates represent the displacement from the top left corner of the parent group (global window).

Arguments

  • int index - The index of the tab.

Return value

The screen position of the tab relatively to the parent group (global window).

Math::ivec2 getTabBarLocalPosition ( int index ) const#

Returns the screen position of the tab bar relatively to the parent group (global window). The coordinates represent the displacement from the top left corner of the parent group (global window).

Arguments

  • int index - The index of the tab.

Return value

The screen position of the tab bar relatively to the parent group (global window).

void setHorizontalTabWidth ( int index, int width ) #

Sets the width of the tab in the group of tabs arranged horizontally.

Arguments

  • int index - The index of the tab.
  • int width - The width of the tab in the group of tabs arranged horizontally.

void setVerticalTabHeight ( int index, int height ) #

Sets the height of the tab in the group of tabs arranged vertically.

Arguments

  • int index - The index of the tab.
  • int height - The height of the tab in the group of tabs arranged vertically.

int getSeparatorWidth ( ) const#

Returns the width of the vertical line separating a tab group from the rest of the area.

Return value

The width of the separation line, in pixels.

int getSeparatorHeight ( ) const#

Returns the height of the horizontal line separating a tab group from the rest of the area.

Return value

The height of the separation line, in pixels.

void setSeparatorPosition ( int index, int pos ) #

Sets the position of the line separating a tab group from the rest of the area. The separator line can be horizontal or vertical depending on the group type.

Arguments

  • int index - Index of the tab.
  • int pos - Position of the separation line, in pixels, from the top-left corner of the window.

int getSeparatorPosition ( int index ) const#

Returns the position of the line separating a tab group from the rest of the area. The separator line can be horizontal or vertical depending on the group type.

Arguments

  • int index - Index of the tab.

Return value

Position of the separation line, in pixels, from the top-left corner of the window.

void setSeparatorValue ( int index, float value ) #

Sets the relative position of the tab separator.

Arguments

  • int index - Index of the tab.
  • float value - Position of the tab separator, the value from 0 to 1 that is recalculated to pixels.

float getSeparatorValue ( int index ) const#

Returns the relative position of the tab separator.

Arguments

  • int index - Index of the tab.

Return value

Position of the tab separator, the value from 0 to 1.

void swapTabs ( int first, int second ) #

Swaps the specified tabs.
Notice
If the group is fixed, tabs won't be swapped and the console will display a corresponding warning.

Arguments

  • int first - Index of the first tab.
  • int second - Index of the second tab.

int getIntersectionTabBar ( const Math::ivec2 & global_mouse_pos ) #

Returns the value indicating if the mouse is hovering over the window tab bar.

Arguments

  • const Math::ivec2 & global_mouse_pos - Global screen coordinates of the mouse relative to the main display.

Return value

1 if the mouse hovers over the window tab bar, otherwise 0.

int getIntersectionTabBarArea ( const Math::ivec2 & global_mouse_pos ) #

Returns the value indicating if the mouse is hovering over the window tab bar area.

Arguments

  • const Math::ivec2 & global_mouse_pos - Global screen coordinates of the mouse relative to the main display.

Return value

1 if the mouse hovers over the window tab bar area, otherwise 0.

Math::ivec2 getIntersectedItemPosition ( ) const#

Returns the position of the left top corner of the intersected group item in the screen coordinates. In case of several displays, the position is relative to the main display.

Return value

The screen position of the intersected item — coordinates of the left top corner.

Math::ivec2 getIntersectedItemSize ( ) const#

Returns the size of the intersected item.

Return value

The size of the intersected item, in pixels.
Last update: 23.06.2023
Build: ()