This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
专业(SIM)
UnigineEditor
界面概述
资产工作流程
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Landscape Tool
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
World Nodes
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
Materials and Shaders
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
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
创建内容
内容优化
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::Plugins::InterfaceWindow Class

Header: #include <plugins/UnigineInterface.h>
Warning
Interface plugin is deprecated and no longer supported. We can't guarantee the stable work of the plugin.

InterfaceWindow is an external window container for the Gui class. Functions of this class can be used when the Interface plugin is loaded.

InterfaceWindow Class

Enums

WINDOW_FLAG#

Flag defining window's behavior and appearance.
NameDescription
TITLE = 1 << 0An Interface window has a title bar.
FRAME = 1 << 1An Interface window has only a frame (no title bar).
MINIMIZE = 1 << 2An Interface window has a minimize button.
MAXIMIZE = 1 << 3An Interface window has a maximize button.
CLOSE = 1 << 4An Interface window has a close button.
DROP = 1 << 5The interface window supports drag-and-drop.

Members


Ptr<Gui> getGui ( ) const#

Returns Gui instance for the interface window.

Return value

Gui instance for the interface window.

void setCenterPosition ( ) #

Sets the interface window in the center of the screen.

const char * getDropFileName ( int num ) #

Returns the name of the drop file by its number.

Arguments

  • int num - Number of the drop file.

Return value

Name of the drop file.

void setFocus ( ) #

Sets the interface window in focus.

bool isFocused ( ) const#

Returns a value, indicating if the interface window is in focus.

Return value

true if the window is in focus, otherwise - false.

void setHeight ( int height ) #

Sets the window height.

Arguments

  • int height - Window height.

int getHeight ( ) #

Returns a height of the interface window.

Return value

Window height.

void setHidden ( bool hidden ) #

Sets a value, indicating if the interface window is hidden.

Arguments

  • bool hidden - Hidden flag.

bool isHidden ( ) #

Returns a value, indicating if the interface window is hidden.

Return value

1 if the window is hidden, otherwise - 0.

void setMouse ( int x, int y ) #

Sets the mouse position.

Arguments

  • int x - Mouse X-coordinate position.
  • int y - Mouse Y-coordinate position.

int getMouseX ( ) #

Returns the mouse position along the X axis.

Return value

Mouse X-coordinate position.

int getMouseY ( ) #

Returns the mouse position along the Y axis.

Return value

Mouse Y-coordinate position.

void setMoveable ( bool mode ) #

Sets a value indicating if the window is movable.

Arguments

  • bool mode - Movable flag:
    • 1 - Movable.
    • 0 - Immovable.

bool isMoveable ( ) #

Returns a value indicating if the window is movable.

Return value

true if the window is movable; otherwise, false.

int getNumDropFiles ( ) #

Returns the number of drop files.

Return value

Number of drop files.

void setParent ( int parent ) #

Sets the parent flag for the interface window. If the window is marked as non-parent (the parent flag is set to 0), this window will be ignored when calling the engine.interface.getCenterPositionX() and engine.interface.getCenterPositionY() functions.

Arguments

  • int parent - The parent flag: 1 to mark the interface window as a parent window; otherwise, 0.

int isParent ( ) #

Returns the parent flag set for the interface window. If the window is marked as non-parent (the parent flag is set to 0), this window will be ignored when calling the engine.interface.getCenterPositionX() and engine.interface.getCenterPositionY() functions.

Return value

The parent flag: 1 if the window is a parent window; otherwise, 0.

void setPermanentFocus ( ) #

Sets the permanent focus on the interface window. The window is permanently focused if it remains in focus even when its child window is in focus.

bool isPermanentlyFocused ( ) const#

Returns a value indicating if the window is in permanent focus The window is permanently focused if it remains in focus even when its child window is in focus.

Return value

true if the window is in permanent focus, otherwise - false.

void setPosition ( int x, int y ) #

Sets the window position.

Arguments

  • int x - Window X-coordinate position.
  • int y - Window Y-coordinate position.

int getPositionX ( ) #

Returns the window position along X axis.

Return value

Window X-coordinate position.

int getPositionY ( ) #

Returns the window position along Y axis.

Return value

Window Y-coordinate position.

void setTitle ( const char * title ) #

Sets the title for the interface window.

Arguments

  • const char * title - Window title to be set.

const char * getTitle ( ) #

Returns the title of the interface window.

Return value

Current window title.

void setWidget ( const Ptr<Widget> & widget ) #

Synchronizes the size and position of the interface window with a given widget.

Arguments

  • const Ptr<Widget> & widget - Widget to be set.

Ptr<Widget> getWidget ( ) #

Returns the interface window widget.

void setWidth ( int width ) #

Sets the window width.

Arguments

  • int width - Window width.

int getWidth ( ) #

Returns a width of the interface window.

Return value

Window width.

void clearDropFiles ( ) #

Clear all the files that are dragged and dropped to the interface window.

void removeFocus ( ) #

Removes the focus from the interface window.
Last update: 2022-04-26
Build: ()