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
AllowDropFiles
Gets or sets a value indicating whether this IWindow allow files drop.
public bool AllowDropFiles { get; set; }
Property Value
AsyncRendering
public bool AsyncRendering { get; }
Property Value
ClientPosition
Gets or sets an upper-left corner of the client area on the desktop.
public Vector2 ClientPosition { get; set; }
Property Value
ClientSize
Gets or sets a client size of this window.
public Vector2 ClientSize { get; set; }
Property Value
Current
public static IWindow Current { get; }
Property Value
Cursor
Gets or sets the cursor for this window.
public MouseCursor Cursor { get; set; }
Property Value
DecoratedPosition
Gets or sets a position of this window on the desktop.
public Vector2 DecoratedPosition { get; set; }
Property Value
DecoratedSize
Gets or sets an decorated size (including title and border) of this window.
public Vector2 DecoratedSize { get; set; }
Property Value
Display
Gets the display device containing the largest portion of this window.
public IDisplay Display { get; }
Property Value
FPS
Gets current FPS for the window.
public float FPS { get; }
Property Value
FixedSize
Gets or sets the window behavior to be resizable or not.
public bool FixedSize { get; set; }
Property Value
Form
public Form Form { get; }
Property Value
Fullscreen
Gets or sets the fullscreen window state.
public bool Fullscreen { get; set; }
Property Value
Input
Gets WindowInput for this window.
public WindowInput Input { get; }
Property Value
MaximumDecoratedSize
public Vector2 MaximumDecoratedSize { get; set; }
Property Value
MinimumDecoratedSize
public Vector2 MinimumDecoratedSize { get; set; }
Property Value
PixelScale
Gets the scale factor which translates virtual units to the physical pixels.
public float PixelScale { get; }
Property Value
State
Gets or sets the window state.
public WindowState State { get; set; }
Property Value
Title
Gets or sets the title of the window.
public string Title { get; set; }
Property Value
UnclampedDelta
Milliseconds since last update.
public float UnclampedDelta { get; }
Property Value
UpdateMinimized
public bool UpdateMinimized { get; set; }
Property Value
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
Visible
Gets or sets a value indicates whether the window is displayed.
public bool Visible { get; set; }
Property Value
Methods
Activate()
Activates this window.
public void Activate()
CalcFPS()
[Obsolete("Use FPS property instead", true)]
public float CalcFPS()
Returns
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
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
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