Class Platform
Platform abstraction layer.
class Platform;
Represents application.
Fields
| Name | Type | Description |
|---|---|---|
_instance
|
Platform | |
GLVersionMajor
|
int | OpenGL context major version. |
GLVersionMinor
|
int | OpenGL context minor version. |
multisamples
|
int | OpenGL multisamples amount. |
_resourceDirs
|
string[] | |
_themeId
|
string | |
_uiDialogDisplayMode
|
ulong | |
_uiLanguage
|
string |
Properties
| Name | Type | Description |
|---|---|---|
defaultWindowIcon[set]
|
string | sets default icon for new created windows |
defaultWindowIcon[get]
|
string | gets default icon for new created windows |
iconProvider[get]
|
IconProviderBase | |
iconProvider[set]
|
IconProviderBase | |
instance[get]
|
Platform | |
resourceDirs[get]
|
string[] | returns list of resource directories |
resourceDirs[set]
|
Platform | set list of directories to load resources from |
uiDialogDisplayMode[get]
|
ulong | returns how dialogs should be displayed - as popup or window |
uiDialogDisplayMode[set]
|
Platform | |
uiLanguage[get]
|
string | returns currently selected UI language code |
uiLanguage[set]
|
Platform | set UI language (e.g. "en", "fr", "ru") - will relayout content of all windows if language has been changed |
uiTheme[get]
|
string | |
uiTheme[set]
|
Platform | sets application UI theme - will relayout content of all windows if theme has been changed |
Methods
| Name | Description |
|---|---|
closeWindow
(w)
|
close window |
createWindow
(windowCaption, parent, flags, width, height)
|
create window |
enterMessageLoop
()
|
Starts application message loop. |
getClipboardText
(mouseBuffer)
|
retrieves text from clipboard (when mouseBuffer == true, use mouse selection clipboard - under linux) |
getMultisamples
()
|
Returns the amount of multisamples. Returns 0 if no OpenGL support |
hasClipboardText
(mouseBuffer)
|
check has clipboard text |
hasModalWindowsAbove
(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 |
onDpiChanged
()
|
Called when the device pixel ratio changes. Clears cached resources and triggers re-layout so pt-based sizes are recomputed at the new scale. |
onThemeChanged
()
|
handle theme change: e.g. reload some themed resources |
openURL
(url)
|
open url in external browser |
requestLayout
()
|
calls request layout for all windows |
setClipboardText
(text, mouseBuffer)
|
sets text to clipboard (when mouseBuffer == true, use mouse selection clipboard - under linux) |
setInstance
(instance)
|
|
showInFileManager
(pathName)
|
show directory or file in OS file manager (explorer, finder, etc...) |
setDefaultLanguageAndThemeIfNecessary
()
|
to set uiLanguage and themeId to default (en, theme_default) if not set yet |
Aliases
| Name | Description |
|---|---|
~this
|