Poison-ui

A cross-platform desktop/mobile UI engine written in D using dsfml

View project on GitHub

Dub version

poison.ui.window

Source

Module for window handling.

Authors:

  Jacob Jensen

License:

  https://github.com/PoisonEngine/poison-ui/blob/master/LICENSE

public:




public this(string name, dstring title, Size size, size_t layers = 1);


Creates a new window.

Parameters:

nameThe name of the window.
titleThe title of the window.
sizeThe size of the window.
layersThe layers of the window. (Defaults to 1)

public @property dstring title();


Gets the title of the window.


public @property void title(dstring newTitle);


Sets the title of the window.


public @property bool isOpen();


Gets a boolean determining whether the window is open or not.


public @property override Window parentWindow();


Gets the parent window.

Returns:

  Always returns "this" where "this" is the window itself.

public @property override void hidden(bool isHidden);


Gets or sets a boolean determining whether the window is hidden or not.


public @property uint fps();


Gets the fps of the window.


public @property void fps(uint newFps);


Sets the fps of the window.


public @property bool cursorVisible();


Gets a boolean determining whether the cursor is visible or not.


public @property void cursorVisible(bool isCursorVisible);


Sets a boolean determining whether the cursor is visible or not.


public override void show();


Shows the window.


public void close();


Closes the window.


public void sendKeyInput(Keyboard.Key key);


Sends a key input through memory.

Parameters:

keyThe key to send an input of.

public void sendMouseInput(Mouse.Button button, Point position);


Sends a mouse input through memory.

Parameters:

buttonThe button to send an input of.
positionThe position of the mouse input.

Note:

  This doesn't change the position of the cursor. Use Window.changeCursorPosition() instead.

public void changeCursorPosition(Point position);


Changes the cursor position.

Parameters:

positionThe position to set the cursor at.

Note:

  For virtual mouse presses do not use this. Use Window.sendMouseInput() instead.

Generated by venom - Poison Engine's Documentation Generator