This page has been translated automatically.
Programming
Fundamentials
Setting Up Development Environment
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Core Library
Containers
Engine Classes
Node-Related Classes
Rendering-Related Classes
Physics-Related Classes
Bounds-Related Classes
GUI-Related Classes
Controls-Related Classes
Pathfinding-Related Classes
Utility Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

InterfaceWindow Class

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

Members


InterfaceWindow (int flags, string name)

Creates an interface window with the specified parameters.

Arguments

  • int flags - Flags of the interface window.
  • string name - Name of the interface window.

void clearDropFiles ()

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

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

int getHeight ()

Returns a height of the interface window.

Return value

Window height.

int getIntersection (int x, int y)

Returns a value indicating if the mouse cursor with the given coordinates is positioned on the window.

Arguments

  • int x - X coordinate of the mouse cursor.
  • int y - Y coordinate of the mouse cursor.

Return value

1 if the cursor is positioned on the window; otherwise, 0.

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.

int getNumDropFiles ()

Returns the number of drop files.

Return value

Number of drop files.

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.

string getTitle ()

Returns the title of an interface window.

Return value

Title.

int getWidth ()

Returns a width of the interface window.

Return value

Window width.

int isFocused ()

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

Return value

1 if the window is in focus, otherwise - 0.

int isHidden ()

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

Return value

1 if the window is hidden, otherwise - 0.

int isMoveable ()

Returns a value indicating if the window is moveable.

Return value

1 if the window is moveable; 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.

int isPermanentlyFocused ()

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

1 if the window is in permanent focus; otherwise, 0.

void removeFocus ()

Removes the focus from the interface window.

void setCenterPosition ()

Sets the interface window in the center of the screen.

void setFocus ()

Sets the interface window in focus.

void setHeight (int height)

Sets the window height.

Arguments

  • int height - Window height.

void setHidden (int hidden)

Sets the interface window as hidden.

Arguments

  • int hidden - Hidden flag.

void setMouse (int x, int y)

Sets the mouse position.

Arguments

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

void setMoveable (int mode)

Sets a moveable flag.

Arguments

  • int mode - Moveable flag:
    • 1 - Moveable.
    • 0 - Immoveable.

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.

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.

void setPosition (int x, int y)

Sets the window position.

Arguments

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

void setTitle (string title)

Sets the title for the interface window.

Arguments

  • string title - Title.

void setWidget (Unigine::Ptr<Unigine::Widget> w)

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

Arguments

  • Unigine::Ptr<Unigine::Widget> w - Pointer to the widget.

void setWidth (int width)

Sets the window width.

Arguments

  • int width - Window width.
Last update: 2017-07-03
Build: ()