Table of Contents

Class Window

Namespace
Lime
Assembly
Lime.dll
public class Window : CommonWindow, IWindow
Inheritance
Window
Implements
Inherited Members

Constructors

Window()

public Window()

Window(WindowOptions)

public Window(WindowOptions options)

Parameters

options WindowOptions

Properties

Active

Indicates whether the window is active. For PC, Mac it means that the window has the input focus. On mobile platforms it indicates that the application is on screen and running.

public bool Active { get; }

Property Value

bool

AllowDropFiles

Gets or sets a value indicating whether this IWindow allow files drop.

public bool AllowDropFiles { get; set; }

Property Value

bool

AsyncRendering

public bool AsyncRendering { get; }

Property Value

bool

ClientPosition

Gets or sets an upper-left corner of the client area on the desktop.

public Vector2 ClientPosition { get; set; }

Property Value

Vector2

ClientSize

Gets or sets a client size of this window.

public Vector2 ClientSize { get; set; }

Property Value

Vector2

Current

public static IWindow Current { get; }

Property Value

IWindow

Cursor

Gets or sets the cursor for this window.

public MouseCursor Cursor { get; set; }

Property Value

MouseCursor

DecoratedPosition

Gets or sets a position of this window on the desktop.

public Vector2 DecoratedPosition { get; set; }

Property Value

Vector2

DecoratedSize

Gets or sets an decorated size (including title and border) of this window.

public Vector2 DecoratedSize { get; set; }

Property Value

Vector2

Display

Gets the display device containing the largest portion of this window.

public IDisplay Display { get; }

Property Value

IDisplay

FPS

Gets current FPS for the window.

public float FPS { get; }

Property Value

float

FixedSize

Gets or sets the window behavior to be resizable or not.

public bool FixedSize { get; set; }

Property Value

bool

Form

public Form Form { get; }

Property Value

Form

Fullscreen

Gets or sets the fullscreen window state.

public bool Fullscreen { get; set; }

Property Value

bool

Input

Gets WindowInput for this window.

public WindowInput Input { get; }

Property Value

WindowInput

MaximumDecoratedSize

public Vector2 MaximumDecoratedSize { get; set; }

Property Value

Vector2

MinimumDecoratedSize

public Vector2 MinimumDecoratedSize { get; set; }

Property Value

Vector2

PixelScale

Gets the scale factor which translates virtual units to the physical pixels.

public float PixelScale { get; }

Property Value

float

State

Gets or sets the window state.

public WindowState State { get; set; }

Property Value

WindowState

Title

Gets or sets the title of the window.

public string Title { get; set; }

Property Value

string

UnclampedDelta

Milliseconds since last update.

public float UnclampedDelta { get; }

Property Value

float

UpdateMinimized

public bool UpdateMinimized { get; set; }

Property Value

bool

VSync

Keeps refresh rate the same as monitor's refresh rate. Setting to false allows to render as much frames as possible. Works only on Windows with disabled Timer.

public override bool VSync { get; set; }

Property Value

bool

Visible

Gets or sets a value indicates whether the window is displayed.

public bool Visible { get; set; }

Property Value

bool

Methods

Activate()

Activates this window.

public void Activate()

CalcFPS()

[Obsolete("Use FPS property instead", true)]
public float CalcFPS()

Returns

float

Center()

Centers the game window on the current display.

public void Center()

Close()

Closes this window.

public void Close()

DesktopToLocal(Vector2)

Converts desktop coordinates into local window coordinates.

public Vector2 DesktopToLocal(Vector2 desktopPosition)

Parameters

desktopPosition Vector2

Returns

Vector2

DragFiles(string[])

Initiate dragging of files supported by native controls

public void DragFiles(string[] filenames)

Parameters

filenames string[]

list of paths to files

Invalidate()

Sets a flag indicating whether the current frame should be rendered.

public void Invalidate()

LocalToDesktop(Vector2)

Converts local window coordinates into desktop coordinates.

public Vector2 LocalToDesktop(Vector2 localPosition)

Parameters

localPosition Vector2

Returns

Vector2

ShowModal()

You can use this method to display a modal dialog box in your application. When this method is called, the code following it is not executed until after the dialog box is closed. The window must be hidden before calling this method.

public void ShowModal()

WaitForRendering()

public void WaitForRendering()

Events

FilesDropped

Occurs when files are dropped.

public event Action<IEnumerable<string>> FilesDropped

Event Type

Action<IEnumerable<string>>