interface Tinman.Engine.Application.IApplicationWindow

Base interface for classes that define a window which can host an IApplication application.

Public / Methods


public method Focus → ()

returns → bool

true if the input focus has been acquired, false if not.

Tries to acquire input focus.


public method ProcessSystemMessages → ()

returns → bool

true if the window client area is dirty, false if not.

Processes all system messages for this window.


public method Resize → (1)

size in : Vec2I

The new size of the window client area (see WindowState.Normal.
If Vec2I.X or Vec2I.Y is negative, the window will be maximized, if possible (see WindowState.Maximized).
If Vec2I.X or Vec2I.Y is zero, the window will enter full-screen mode, if possible (see WindowState.Fullscreen).

Tries to change the current size of the application windows client area.

If the client size of an application window cannot be set by code (e.g. it is not a top-level window), the client size will remain unchanged and the State property will be WindowState.Normal.
If full-screen mode is not available, the window will be maximized instead, if possible.


public method Restore → ()

Restores the previous window state.

Depending on the current window state (see State), the Restore performs the following actions:

  • WindowState.Fullscreen:
    The window is restored to the state it had before entering full-screen mode, which may be normal or maximized mode.

  • WindowState.Maximized:
    The window is restored to the most recent size and position it had in normal mode.

  • WindowState.Hidden:
    The window is restored to the most recent size and position it had in normal mode.

  • WindowState.Normal:
    The method returns silently.

Public / Attributes


public attribute InputSettings → (get,set)

value : InputSettings

The input settings.

The current settings for processing raw input events.

Defaults to InputSettings.Default.


public attribute IsFocused → (get)

value : bool

true if the application has the input focus, false if not.

Does the application window currently have the input focus?


public attribute IsMouseInside → (get)

value : bool

true if the mouse cursor is inside the client area, false if it is outside.

Is the mouse cursor currently inside the windows client area?


public attribute IsTopLevel → (get)

value : bool

true if this is a top-level window,
false if not, for example a control embedded in some GUI form.

Is this a top-level window?

Top-level windows can be put into full-screen mode and can be maximized.


public attribute MouseCaptured → (get,set)

value : bool

true if the mouse is currently captured, false if not.

Is the mouse currently captured by the application window?

While the mouse cursor is captured, the application exhibits the following behaviour:

  • The mouse cursor is not visible and cannot leave the application window, therefore it is not possible to accidentally transfer input focus to another window.

  • The mouse cursor is locked at the center of the application window client area. This way unbounded relative mouse movement can be consumed.


public attribute MouseCursor → (get,set)

value : MouseCursor

The mouse cursor.

The mouse cursor to show inside the application window.

The default value is MouseCursor.Default.


public attribute OnInput → (get)

value : IEventGeneric<InputEvent>

The input event source.

Returns the source for input event.


public attribute Resolution → (get)

value : int32

The current resolution, in dots per inch (DPI).

Returns the current resolution of the application window.


public attribute State → (get)

value : WindowState

The current state.

Returns the current state of the application window.


public attribute Title → (get,set)

value : string

The window title or null.

The current window title.

If the title of an application window cannot be set by code (e.g. it is not a top-level window), the title will remain unchanged.