TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

interface IApplicationWindow in Tinman.AddOns.Application

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

interface IApplicationWindow extends IInputState
  INativeHandle
  base of ApplicationWindowBase

Remarks

The returned NativeHandle can be interpreted as follows:

Attributes

ClientSize

The current size of the application windows client area.

property ClientSize { get set }
type Vec2I
value The size of the window client area. Set to Zero to enable full-screen mode. Use any non-zero value to enter windowed mode.

Remarks:

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 Normal.

IsFocused

Does the application window currently have the input focus?

property IsFocused { get }
type bool
value true if the application has the input focus, false if not.

IsMouseInside

Is the mouse cursor currently inside the windows client area?

property IsMouseInside { get }
type bool
value true if the mouse cursor is inside the client area, false if it is outside.

LifecycleState

Returns the lifecycle state of this object.

property LifecycleState { get }
type LifecycleState
value The lifecycle state.
inherited ILifecycleState.LifecycleState

MouseCaptured

Is the mouse currently captured by the application window?

property MouseCaptured { get set }
type bool
value true if the mouse is currently captured, false if not.

Remarks:

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

MouseCursor

The mouse cursor to show inside the application window.

property MouseCursor { get set }
type MouseCursor
value The mouse cursor.

Remarks:

The default value is Default.

NativeHandle

Returns the raw handle value of the native resource that is contained in this object.

property NativeHandle { get }
type IntPtr
value The raw handle value.
inherited INativeHandle.NativeHandle

Remarks:

The documentation of the implementing class will contain information on how to interpret the raw handle value.

OnInput

Returns the source for input event.

property OnInput { get }
type IEventGeneric<InputEvent>
value [not-null] The input event source.

State

Returns the current state of the application window.

property State { get }
type WindowState
value The current state.

Title

The current window title.

property Title { get set }
type string
value The window title or null.

Remarks:

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.

Methods

AcquireTry

Acquires a strong reference to this disposable object.

[OwnerReturn, ThreadSafe]
method AcquireTry ()
type IDisposable
returns this if a new strong reference has been acquired, null if this object is already being disposed.
inherited IDisposable.AcquireTry

Remarks:

The object will not be actually disposed by calls to Dispose when there is at least one strong reference left. Code that calls the AcquireTry method is responsible for calling the Dispose method accordingly.

This method is not intended to be used in performance-critical code. It should only be used to high-level resource management.

Closing

Dispatches a Closing event to all listeners, which should initiate a graceful shutdown of the application.

method Closing ()

Dispose

Releases all resources held by this object if there are no more strong references to it, decrements the reference counter by one otherwise.

[Dispose, OwnerThis, ThreadSafe]
method Dispose ()
inherited IDisposable.Dispose

Remarks:

The Dispose method silently returns if the object has already been disposed.

Focus

Tries to acquire input focus.

method Focus ()
type bool
returns true if the input focus has been acquired, false if not.

IsDown

Is the given keyboard key pressed down?

[Pure]
method IsDown (KeyboardKey key)
type bool
params key The keyboard key.
returns true if the key is pressed down, false if not.
inherited IInputState.IsDown

Is the given mouse button pressed down?

[Pure]
method IsDown (MouseButton button)
type bool
params button The mouse button.
returns true if the button is pressed down, false if not.
inherited IInputState.IsDown

ProcessSystemMessages

Processes all system messages for this window.

method ProcessSystemMessages ()
type bool
returns true if the window client area is dirty, false if not.