IApplicationWindow
Description
- Derived from
-
INativeWindow
IInputState
IRequestClose
IDisposableGeneric<IApplicationWindow> - Extended by
-
ApplicationWindow abstract
Base interface for classes that define a window which can host an IApplication application.
The object.ToString method of a an implementation class should return a human-understandable identifier for the window type and the native window flags, see INativeWindow.NativeHandleTypes and ApplicationUtil.ToString.
Public / Methods
Resize
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.
Restore
Restores the previous window state.
-
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:
WindowState.Hidden:
The window is restored to the most recent size and position it had in normal mode. -
WindowState.Normal:
The method returns silently.
TextInputBegin
The application has started to consume text input via InputEventType.Character messages.
Calls to TextInputBegin and TextInputEnd must be balanced and may be nested.
- See also
TextInputEnd
The application has finished consuming text input via InputEventType.Character messages.
Calls to TextInputBegin and TextInputEnd must be balanced and may be nested.
Public / Attributes
InputSettings
The current settings for processing raw input events.
Defaults to InputSettings.Default.
IsTextInputActive
Returns whether the application window is generating text input via InputEventType.Character.
Even if this property returns false
, an implementation may choose to still provide text input events. But if this property returns true
, the implementation is required to provide text input events.
IsTopLevel
Is this a top-level window?
Top-level windows can be put into full-screen mode and can be maximized.
MouseCaptured
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.
MouseCursor
The mouse cursor to show inside the application window.
The default value is MouseCursor.Default.
Extensions
DefaultGraphicsContextFactory
Creates the default graphics context factory for this application window.
This method delegates to GraphicsContextFactory.Create, passing INativeWindow.NativeHandleType, using the default order for native window type and feature flags.
- TinmanException
-
If there is no factory available.