WidgetApplication

Description

class Tinman.Engine.Widgets.WidgetApplication

Derived from

ApplicationBase abstract

Extended by

DemoApplication sealed
Example_Application sealed

An IApplication implementation that wraps one or more IWidget instances.

The default implementation of IRenderable.Render performs the following actions:

  1. Call the base IRenderable.Render method.

  2. Call the IRenderable.Render methods of each IWidget.

  3. Setup 2D rendering with IGraphicsContext.Graphics, then call IRenderable2D.Render2D of each IWidget, followed by the one of IWidgetGui.

Public / Constructors

Widget​Application


public constructor WidgetApplication → (1)

frameRateLimit opt : int32 = 100

[>=0]
The frame rate limit (see IApplicationInfo.FrameRateLimit). Defaults to 100.

Creates a new instance of WidgetApplication.

Public / Methods

Widget​Add


public method WidgetAdd → (1)

widget in : IWidget own

[not-null]
The widget to add, in state LifecycleState.Initialized.

Adds the given widget.

The following callbacks will be made on the given widget in, if applicable:

RenderException

If a graphics subsystem error has occurred.

Widget​Remove


public method WidgetRemove → (1)

widget in : IWidget

[not-null]
The widget to remove.

Removes the given widget.

Widget​To​Back


public method WidgetToBack → (1)

widget in : IWidget

[not-null]
The widget.

Puts the given widget into the background.

Widgets are rendered back-to-front. Input is consumed front-to-back until a widget has consumed the input event.

Widget​To​Front


public method WidgetToFront → (1)

widget in : IWidget

[not-null]
The widget.

Puts the given widget into the foreground.

Widgets are rendered back-to-front. Input is consumed front-to-back until a widget has consumed the input event.

Public / Attributes

Auto​Settings


public attribute AutoSettings → (get,set)

value : bool

true for load / save settings on startup / shutdown of each widget,
false to not load settings automatically.

Automatically load and save settings for widgets?

Defaults to false.

Runner


public attribute Runner → (get)

value : IApplicationRunner

The IApplicationRunner instance or null if none.

Returns the IApplicationRunner instance of the application.

Widget​Gui


public attribute WidgetGui → (get)

value : IWidgetGui

[not-null]
The IWidgetGui instance.

Returns the IWidgetGui instance of the application.

Logging

Logger


public static readonly attribute Logger → (ILogger)

The logger object of this class.