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
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
Content Creation
Content Optimization
Materials
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials

Unigine::CustomSystemProxy Class

Warning
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to Engineering / Sim SDK edition to use it.
Header: #include <UnigineCustomSystemProxy.h>

This class is used for integration with Qt, SDL, WPF, WinForms.

CustomSystemProxy Class

Members


CustomSystemProxy * get ( ) #

Returns the CustomSystemProxy instance.

Return value

CustomSystemProxy instance.

int getFeatures ( ) const#

Returns the set of features CustomSystemProxy can perform.

Return value

Mask specifying the set of SYSTEM_PROXY_* features CustomSystemProxy can perform.

int isWindowsSupported ( ) const#

Returns the value specifying if CustomSystemProxy supports windows creation.

Return value

1 if CustomSystemProxy supports windows creation, otherwise 0.

int isMouseSupported ( ) const#

Returns the value specifying if CustomSystemProxy supports work with the mouse.

Return value

1 if CustomSystemProxy supports work with the mouse, otherwise 0.

int isKeyboardSupported ( ) const#

Returns the value specifying if CustomSystemProxy supports work with the keyboard.

Return value

1 if CustomSystemProxy supports work with the keyboard, otherwise 0.

int isTouchesSupported ( ) const#

Returns the value specifying if CustomSystemProxy supports work with the sensor input.

Return value

1 if CustomSystemProxy supports work with the sensor input, otherwise 0.

int isDisplaysSupported ( ) const#

Returns the value specifying if CustomSystemProxy can provide information on displays.

Return value

1 if CustomSystemProxy can provide information on displays, otherwise 0.

int getVideoAdapterNumber ( ) const#

Returns the index number of the video adapter used for rendering.

Return value

Index number of the video adapter used for rendering.

const char * getVideoAppName ( ) const#

Returns the name of the graphics API in use.

Return value

Graphics API name: DirectX 11, DirectX 12, or Vulcan.

int initExternalWindowBuffers ( WIN_HANDLE win, const ivec2& size ) #

Initialization of the resources for rendering to the external window.

Arguments

  • WIN_HANDLE win - Window handle.
  • const ivec2& size - Window size.

Return value

1 if the operation is successful, otherwise 0.

int resizeExternalWindowBuffers ( WIN_HANDLE win, const ivec2& size ) #

Resizing of the external window in order to update the internal textures.

Arguments

  • WIN_HANDLE win - Window handle.
  • const ivec2& size - Window size.

Return value

1 if the operation is successful, otherwise 0.

int shutdownExternalWindowBuffers ( WIN_HANDLE win ) #

Shutdown of all resources required for rendering to the external window upon closing the window.

Arguments

  • WIN_HANDLE win - Window handle.

Return value

1 if the operation is successful, otherwise 0.

void onExternalWindowRender ( WIN_HANDLE win ) #

Rendering into the specified external window.

Arguments

  • WIN_HANDLE win - Handle of the window into which the image is rendered.

void invokeWindowEvent ( WindowEventPtr e ) #

Conveys the window event to Window Manager.

Arguments

void invokeInputEvent ( InputEventPtr e ) #

Conveys the input event to Window Manager.

Arguments

void mainUpdate ( ) #

Callback from the main thread before the update.

WIN_HANDLE createWindow ( int width, int height ) #

Returns the engine handle of the created window.

Arguments

  • int width - Window width.
  • int height - Window height.

Return value

Engine window handle.

void removeWindow ( WIN_HANDLE win_handle ) #

Destroys the window using its handle.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.

void setWindowTitle ( WIN_HANDLE win_handle, const char* title ) #

Sets the window title.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.
  • const char* title - Window title.

void setWindowIcon ( WIN_HANDLE win_handle, const ImagePtr& image ) #

Sets the window icon.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.
  • const ImagePtr& image - Image to be used as the icon.

void setWindowSize ( WIN_HANDLE win_handle, const ivec2& size ) #

Sets the window size.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.
  • const ivec2& size - Window size (width and height).

void setWindowMinSize ( WIN_HANDLE win_handle, const ivec2& size ) #

Sets the minimum possible size of the window.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.
  • const ivec2& size - Window size (width and height).

void setWindowMaxSize ( WIN_HANDLE win_handle, const ivec2& size ) #

Sets the maximum possible size of the window.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.
  • const ivec2& size - Window size (width and height).

void setWindowPosition ( WIN_HANDLE win_handle, const ivec2& pos ) #

Sets the window position (top left corner) in screen coordinates.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.
  • const ivec2& pos - Window position.

void showWindow ( WIN_HANDLE win_handle ) #

Renders the window.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.

void hideWindow ( WIN_HANDLE win_handle ) #

Hides the window.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.

void setWindowFocus ( WIN_HANDLE win_handle ) #

Sets the focus to the engine window.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.

void setWindowMouseGrab ( WIN_HANDLE win_handle, int state ) #

Sets a value indicating if the mouse pointer is bound to the window.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.
  • int state - 1 if the mouse cannot leave the window; otherwise, 0.

void setWindowResizable ( WIN_HANDLE win_handle, int state ) #

Sets a value indicating if the window can be resized.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.
  • int state - 1 if the window can be resized; otherwise, 0.

void setWindowBordered ( WIN_HANDLE win_handle, int state ) #

Sets a value indicating if the window has borders.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.
  • int state - 1 if the window has borders; otherwise, 0.

void setWindowFullscreen ( WIN_HANDLE win_handle, int state ) #

Sets a value indicating if the window is maximized to the full screen.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.
  • int state - 1 if the window is maximized to the full screen; otherwise, 0.

void setWindowFullscreenDisplayMode ( WIN_HANDLE win_handle, int display, int mode ) #

Sets the display mode for the window in the fullscreen mode.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.
  • int display - Display index.
  • int mode - Mode index.

void minimizeWindow ( WIN_HANDLE win_handle ) #

Minimizes the window to tray.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.

void maximizeWindow ( WIN_HANDLE win_handle ) #

Maximizes the window to the whole screen.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.

void restoreWindow ( WIN_HANDLE win_handle ) #

Restores the window from the minimized or maximized state.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.

void setWindowOpacity ( WIN_HANDLE win_handle, float opacity ) #

Sets the window opacity.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.
  • float opacity - Window opacity.

int getWindowZOrder ( WIN_HANDLE win_handle ) const#

Returns the window Z-order.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.

Return value

Window order (a lower value means that the window is closer to the viewer).

int getWindowDisplayIndex ( WIN_HANDLE win_handle ) const#

Returns the index of the display in which the window is rendered.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.

Return value

Display index.

void insertWindowAfter ( WIN_HANDLE win_handle, WIN_HANDLE after_win_handle ) #

Places one the window behind the other window.

Arguments

  • WIN_HANDLE win_handle - Window to insert.
  • WIN_HANDLE after_win_handle - Window behind which the first window will be placed.

int getWindowHitTestResult ( WIN_HANDLE win_handle ) #

Returns a value indicating in which area of the engine window the mouse is located.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.

Return value

Value indicating the window area, one of the HITTEST_* values.

ivec4 getWindowSystemBorderSize ( WIN_HANDLE win_handle ) #

Returns the size of the system window borders.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.

Return value

Size of the system window borders.

void setWindowResizeBorderSize ( WIN_HANDLE win_handle, int size ) #

Sets the size of the border that is manipulated to resize the window.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.
  • int size - Size of the border resize area.

void setWindowDraggableArea ( WIN_HANDLE win_handle, const ivec2& p0, const ivec2& p1 ) #

Sets the size of the area that is manipulated to drag the window by the mouse.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.
  • const ivec2& p0 - Top-left corner of the draggable area.
  • const ivec2& p1 - Bottom-right corner of the draggable area.

void setWindowDefaultStyle ( WIN_HANDLE win_handle, int state ) #

Sets the style for the engine window. The default style is as set by the operating system, the engine style is as set by the engine.

Arguments

  • WIN_HANDLE win_handle - Engine window handle.
  • int state - 1 to set the default system style for the engine window, 0 to set the engine-style window.

void setGlobalMousePosition ( const ivec2& pos ) #

Sets the mouse position in global coordinates relative to the main system display.

Arguments

  • const ivec2& pos - Mouse position in global coordinates.

ivec2 getGlobalMousePosition ( ) const#

Returns the mouse position in global coordinates relative to the main system display.

Return value

Mouse position in global coordinates.

void showCursor ( int state ) #

Sets a value indicating if the cursor is shown.

Arguments

  • int state - 1 to show the cursor, 0 to hide it.

void showMouseCursorSystemArrow ( ) #

Sets the system arrow as the mouse cursor.

void setMouseCursorSkinCustom ( const ImagePtr& mouse_skin ) #

Sets the specified skin image as the mouse cursor.

Arguments

  • const ImagePtr& mouse_skin - Image containing pointer shapes to be set for the mouse cursor (e.g., select, move, resize, etc.).

void setMouseCursorSkinSystem ( ) #

Sets the current OS cursor skin (pointer shapes like select, move, resize, etc.).

void setMouseCursorCustom ( const ImagePtr& image, int x, int y ) #

Sets a custom image for the OS mouse cursor. The image must be of the square size and RGBA8 format. This method of setting cursor has the priority over other cursor setting methods. The image set by this method can be cleared only using the clearMouseCursorCustom() method.

Arguments

  • const ImagePtr& image - Image containing pointer shapes to be set for the mouse cursor (e.g., select, move, resize, etc.).
  • int x - X coordinate of the cursor's hot spot.
  • int y - Y coordinate of the cursor's hot spot.

void clearMouseCursorCustom ( ) #

Clears the custom mouse cursor set via the setMouseCursorCustom() method.

void changeMouseCursorSkinNumber ( int number ) #

Changes the cursor skin using the skin number.

Arguments

  • int number - Cursor skin number, one of the CURSOR_* pre-defined variables.

int getDisplayDefaultSystemDPI ( ) const#

Returns the default system dots/pixels-per-inch value.

Return value

Dots/pixels-per-inch value.

int getNumDisplays ( ) const#

Returns the total number of displays.

Return value

Number of displays.

ivec2 getDisplayPosition ( int display_index ) const#

Returns the position of the specified display.

Arguments

  • int display_index - Display index.

Return value

Display position.

ivec2 getDisplayResolution ( int display_index ) const#

Returns the resolution of the specified display.

Arguments

  • int display_index - Display index.

Return value

Display resolution.

int getDisplayDPI ( int display_index ) const#

Returns the DPI of the specified display.

Arguments

  • int display_index - Display index.

Return value

Display DPI.

int getMainDisplay ( ) const#

Returns the index of the main display.

Return value

Display index.

ivec2 getDisplayCurrentModeResolution ( int display_index ) const#

Returns the resolution of the current display mode.

Arguments

  • int display_index - Display index.

Return value

Display mode resolution.

int getDisplayCurrentRefreshRate ( int display_index ) const#

Returns the current refresh rate of the specified display mode.

Arguments

  • int display_index - Display index.

Return value

Current refresh rate of the specified display.

int getDisplayNumModes ( int display_index ) const#

Returns the total number of available display modes.

Arguments

  • int display_index - Display index.

Return value

Number of available display modes.

ivec2 getDisplayModeResolution ( int display_index, int mode_index ) const#

Returns the DPI of the specified mode for the selected display.

Arguments

  • int display_index - Display index.
  • int mode_index - Index of the display mode.

Return value

Display DPI.

int getDisplayModeRefreshRate ( int display_index, int mode_index ) const#

Returns the refresh rate of the specified display mode.

Arguments

  • int display_index - Display index.
  • int mode_index - Index of the display mode.

Return value

Refresh rate of the specified display mode.

const char * getDisplayName ( int display_index ) const#

Returns the system name of the specified display.

Arguments

  • int display_index - Display index.

Return value

Display name.

int hasClipboardText ( ) const#

Returns the value showing if the clipboard contains anything.

Return value

1 if there is text in the clipboard, otherwise 0.

void setClipboardText ( const char* str ) #

Updates the contents of the system clipboard.

Arguments

  • const char* str - Contents to set.

const char * getClipboardText ( ) #

Retrieves the contents of the system clipboard.

Return value

Contents of the system clipboard.

int showDialogMessage ( const char* title, const char* message, WIN_HANDLE parent_widnow_id ) #

Displays a message dialog with the specified title and text.

Arguments

  • const char* title - Title of the message window.
  • const char* message - Text of the message.
  • WIN_HANDLE parent_widnow_id - Handle of the parent window.

Return value

1 if the dialog message is displayed successfully, otherwise 0.

int showDialogWarning ( const char* title, const char* warning, WIN_HANDLE parent_widnow_id ) #

Displays a warning dialog with the specified title and text.

Arguments

  • const char* title - Title of the warning window.
  • const char* warning - Text of the warning.
  • WIN_HANDLE parent_widnow_id - Handle of the parent window.

Return value

1 if the dialog warning is displayed successfully, otherwise 0.

int showDialogError ( const char* title, const char* error, WIN_HANDLE parent_widnow_id ) #

Displays an error dialog with the specified title and text.

Arguments

  • const char* title - Title of the error window.
  • const char* error - Text of the error.
  • WIN_HANDLE parent_widnow_id - Handle of the parent window.

Return value

1 if the dialog error is displayed successfully, otherwise 0.
Last update: 2022-08-08
Build: ()