This page has been translated automatically.
Video Tutorials
Interface
Essentials
Advanced
How To
Professional (SIM)
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Lighting
Sandworm
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Built-in Node Types
Nodes
Objects
Effects
Decals
Light Sources
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
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
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

Unigine::WindowManager Class

Header: #include <UnigineWindowManager.h>

The class to manage windows.

WindowManager Class

Enums

CALLBACKS#

NameDescription
CALLBACKS_WINDOW_CREATED = 0Callback after the window has been created.
CALLBACKS_WINDOW_REMOVED = 1Callback after the window has been removed.
CALLBACKS_WINDOWS_STACKED = 2Callback after the window has been stacked.
CALLBACKS_WINDOW_UNSTACKED = 3Callback after the window has been unstacked.
CALLBACKS_NUM = 4Callback counter.

Members


Ptr<EngineWindow> getMainWindow ( ) const#

Returns the window that is set as the main window by default.

Notice
There may be several windows that are set as main, or no main windows at all.

Return value

Engine window.

Ptr<EngineWindow> createWindow ( const char * title, int width, int height ) #

Creates a new engine window with the specified title and of the defined size.

Arguments

  • const char * title - The title of the window, in UTF-8 encoding.
  • int width - Window width, in screen coordinates.
  • int height - Window height, in screen coordinates.

Return value

Engine window.

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

Removes the specified window.

Arguments

int getNumWindows ( ) const#

Returns the number of windows.

Return value

Number of windows.

Ptr<EngineWindow> getWindow ( int index ) #

Returns the window by its index.

Arguments

  • int index - Index of the window.

Return value

Engine window.

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

Returns the index of the specified window.

Arguments

Return value

Index of the window.

Ptr<EngineWindow> stack ( const Ptr<EngineWindow> & first, const Ptr<EngineWindow> & second, int index = -1, EngineWindow::GROUP_TYPE group_type = Enum.EngineWindow.GROUP_TYPE.TAB, bool decompose_second = false ) #

Returns the group of windows. If the first argument is a window, a new group is always created. If the first argument is a group, the second element is added to this group. To combine two groups into a new one, use the stackGroups() method.

Arguments

  • const Ptr<EngineWindow> & first - The first window or group for merging.
  • const Ptr<EngineWindow> & second - The second window for merging.
  • int index - A place where a window or a group should be placed in a group.
  • EngineWindow::GROUP_TYPE group_type - Type of a group to be created, if the first argument is a window and not a group.
  • bool decompose_second - Flag to decompose the second argument of the merge, if it is a group, and combine with the first window or a group.

Return value

Group of windows.

Ptr<EngineWindow> stackToParentGroup ( const Ptr<EngineWindow> & destination, const Ptr<EngineWindow> & window, int index = -1, bool decompose_second = false ) #

Returns the group of windows with the first group of windows as a parent.

Arguments

  • const Ptr<EngineWindow> & destination - The parent group to which another window is stacked.
  • const Ptr<EngineWindow> & window - The window to be stacked.
  • int index - A place where a window or a group should be placed in a group.
  • bool decompose_second - Flag to decompose the second argument of the merge, if it is a group, and combine with the first window or a group.

Return value

Group of windows.

Ptr<EngineWindow> stackWindows ( const Ptr<EngineWindow> & first, const Ptr<EngineWindow> & second, EngineWindow::GROUP_TYPE group_type = Enum.EngineWindow.GROUP_TYPE.TAB ) #

Returns a newly created group of windows.

Arguments

Return value

Group of windows.

Ptr<EngineWindow> stackGroups ( const Ptr<EngineWindow> & first, const Ptr<EngineWindow> & second, EngineWindow::GROUP_TYPE group_type = Enum.EngineWindow.GROUP_TYPE.TAB, bool decompose_second = false ) #

Returns the group of window groups. The second group is added to the first group. To combine two windows or a group and a window, use the stack() method.

Arguments

  • const Ptr<EngineWindow> & first - The first window group for merging.
  • const Ptr<EngineWindow> & second - The second window group for merging.
  • EngineWindow::GROUP_TYPE group_type - Type of a group to be created.
  • bool decompose_second - Flag to decompose the second argument of the merge, if it is a group, and combine with the first group.

Return value

Group of windows.

Ptr<EngineWindow> stackToWindow ( const Ptr<EngineWindow> & destination_window, const Ptr<EngineWindow> & window, EngineWindow::GROUP_TYPE group_type = Enum.EngineWindow.GROUP_TYPE.TAB, bool decompose_second = false ) #

Returns a group of windows.

Arguments

  • const Ptr<EngineWindow> & destination_window - The parent window to which another window is stacked.
  • const Ptr<EngineWindow> & window - The window to be stacked.
  • EngineWindow::GROUP_TYPE group_type - Type of a group to be created.
  • bool decompose_second - Flag to decompose the second argument of the merge, if it is a group, and combine with the first group.

Return value

Group of stacked windows.

Ptr<EngineWindow> stackToGroup ( const Ptr<EngineWindow> & destination_group, const Ptr<EngineWindow> & group, int index = -1, bool decompose_second = false ) #

Returns a group of windows. The second group is added to the first group.

Arguments

  • const Ptr<EngineWindow> & destination_group - The parent group to which another group is stacked.
  • const Ptr<EngineWindow> & group - The group to be stacked.
  • int index - A place where a window or a group should be placed in a group.
  • bool decompose_second - Flag to decompose the second argument of the merge and combine with the first group.

Return value

Group of stacked windows.

void unstack ( const Ptr<EngineWindow> & unstacked ) #

Removes a window or a group from a parent group. If there is only one window left, the group is automatically deleted after removing the window from it.

Arguments

  • const Ptr<EngineWindow> & unstacked - A window or a group to be removed from a parent group.
Last update: 2022-07-19
Build: ()