IApplicationControl

Description

interface Tinman.Engine.Application.IApplicationControl

Derived from

IDisposable
IRequestClose

Extended by

ApplicationControlBase abstract

Base interface for classes that host an IApplication object inside a 3rd-party windowing system, such as WinForms, WPF, MFC, or Qt.

The following built-in helper classes exist:

  • Tinman.AddOns.WinForms.ApplicationControl (C#)

  • Tinman.AddOns.WPF.ApplicationControlWpf (C#)

  • Tinman::AddOns::MFC::ApplicationControlMfc (C++)

  • Tinman::AddOns::Qt::ApplicationControlQt (C++)

The above classes do not implement the IApplicationControl interface directly. Instead, they provide a getter named ApplicationHost, which returns the IApplicationControl object to use. Also, they provide an event named ApplicationError, which is fired when the embedded IApplication throws an exception.

Public / Methods

Check​Context​Factory


[Constant]
public method CheckContextFactory → (1)

factory in : IGraphicsContextFactory

The graphics context factory to check.

returns → bool

true if factory in is accepted,
false if it is rejected and treated as null.

Does this application control accept the given graphics context factory in?

Reset​Application


public method ResetApplication → ()

Resets this application control by disposing the application and the running loop (if present).

Reset​Graphics​Context


public method ResetGraphicsContext → ()

Resets the graphics context.

Public / Attributes

Application


[OwnerValue]
public attribute Application → (get,set)

value : IApplication

The application to run.

Gets or sets the application that is run in this application control.

Context​Factory


public attribute ContextFactory → (get,set)

value : IGraphicsContextFactory

The graphics context factory.

The graphics context factory to use.

Setting the context factory to null will reset the application control (see ResetApplication).

Changing the context factory while an application is running will change the graphics context of the application (see IApplication.GraphicsContextDetach and IApplication.GraphicsContextAttach).

An implementing class may choose to accept only certain implementations of IGraphicsContextFactory. When it rejects an implementation, it must act as if null had been passed. See CheckContextFactory.

Extensions

Check​Context​Factories


public static method CheckContextFactories → (1)

factories in : IEnumerable<IGraphicsContextFactory>

The factories to check or null.

returns → IGraphicsContextFactory

The found factory or null.

Enumerates the given factories in and returns the first IGraphicsContextFactory for which IApplicationControl.CheckContextFactory returns true.