Platform

Platform abstraction layer.

Represents application.

Members

Functions

closeWindow
void closeWindow(Window w)

close window

createWindow
Window createWindow(dstring windowCaption, Window parent, uint flags, uint width, uint height)

create window Args: windowCaption = window caption text parent = parent Window, or null if no parent flags = WindowFlag bit set, combination of Resizable, Modal, Fullscreen width = window width height = window height

enterMessageLoop
int enterMessageLoop()

Starts application message loop.

getClipboardText
dstring getClipboardText(bool mouseBuffer)

retrieves text from clipboard (when mouseBuffer == true, use mouse selection clipboard - under linux)

hasModalWindowsAbove
bool hasModalWindowsAbove(Window w)

returns true if there is some modal window opened above this window, and this window should not process mouse/key input and should not allow closing

onThemeChanged
void onThemeChanged()

handle theme change: e.g. reload some themed resources

openURL
bool openURL(string url)

open url in external browser

requestLayout
void requestLayout()

calls request layout for all windows

setClipboardText
void setClipboardText(dstring text, bool mouseBuffer)

sets text to clipboard (when mouseBuffer == true, use mouse selection clipboard - under linux)

setDefaultLanguageAndThemeIfNecessary
void setDefaultLanguageAndThemeIfNecessary()

to set uiLanguage and themeId to default (en, theme_default) if not set yet

showInFileManager
bool showInFileManager(string pathName)

show directory or file in OS file manager (explorer, finder, etc...)

Properties

instance
Platform instance [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
resourceDirs
string[] resourceDirs [@property getter]

returns list of resource directories

resourceDirs
string[] resourceDirs [@property setter]

set list of directories to load resources from

uiDialogDisplayMode
ulong uiDialogDisplayMode [@property getter]

returns how dialogs should be displayed - as popup or window

uiDialogDisplayMode
ulong uiDialogDisplayMode [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
uiLanguage
string uiLanguage [@property getter]

returns currently selected UI language code

uiLanguage
string uiLanguage [@property setter]

set UI language (e.g. "en", "fr", "ru") - will relayout content of all windows if language has been changed

uiTheme
string uiTheme [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
uiTheme
string uiTheme [@property setter]

sets application UI theme - will relayout content of all windows if theme has been changed

Static functions

setInstance
void setInstance(Platform instance)
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_instance
Platform _instance;
Undocumented in source.

Variables

GLVersionMajor
int GLVersionMajor;

OpenGL context major version. Note: if the version is invalid or not supported, this value will be set to supported one.

GLVersionMinor
int GLVersionMinor;

OpenGL context minor version. Note: if the version is invalid or not supported, this value will be set to supported one.

_resourceDirs
string[] _resourceDirs;
Undocumented in source.
_themeId
string _themeId;
Undocumented in source.
_uiDialogDisplayMode
ulong _uiDialogDisplayMode;
Undocumented in source.
_uiLanguage
string _uiLanguage;
Undocumented in source.

Meta