Skip to main content
Version: 1.0.0-preview.34

Velaptor.UI.IWindow

Velaptor

Velaptor.UI

IWindow Interface

Provides the core of an application window which facilitates how the
window behaves, its state and the ability to be used in various types
of applications.

public interface IWindow :
System.IDisposable

Derived
Window

Implements System.IDisposable

Properties

AutoClearBuffer

Gets or sets a value indicating whether or not the buffers should
be automatically cleared before rendering any textures.

bool AutoClearBuffer { get; set; }

Property Value

System.Boolean

Remarks

If this is set to true, it means you do not have to
use or invoke the Clear()() method.

Set to the value of false if you want more control when
the back buffers will be cleared.

WARNING!! - To prevent performance issues, do not manually clear the
buffer with the Clear()() method
and set this property to true. That would be a waste of resources.

AutoSceneLoading

Gets or sets a value indicating whether or not the scenes should be automatically loaded.

bool AutoSceneLoading { get; set; }

Property Value

System.Boolean

AutoSceneRendering

Gets or sets a value indicating whether or not the scenes should be automatically rendered.

bool AutoSceneRendering { get; set; }

Property Value

System.Boolean

AutoSceneUnloading

Gets or sets a value indicating whether or not the scenes should be automatically unloaded.

bool AutoSceneUnloading { get; set; }

Property Value

System.Boolean

AutoSceneUpdating

Gets or sets a value indicating whether or not the scenes should be automatically updated.

bool AutoSceneUpdating { get; set; }

Property Value

System.Boolean

Draw

Gets or sets the System.Action delegate that is invoked per frame for rendering.

System.Action<Velaptor.FrameTime>? Draw { get; set; }

Property Value

System.Action<FrameTime>

Fps

Gets the frames per second that the main loop is running at.

float Fps { get; }

Property Value

System.Single

Height

Gets or sets the height of the window.

uint Height { get; set; }

Property Value

System.UInt32

Initialize

Gets or sets the System.Action delegate to be invoked one time to initialize the window.

System.Action? Initialize { get; set; }

Property Value

System.Action

Initialized

Gets a value indicating whether or not the window has been initialized.

bool Initialized { get; }

Property Value

System.Boolean

MouseCursorVisible

Gets or sets a value indicating whether or not the mouse cursor is visible.

bool MouseCursorVisible { get; set; }

Property Value

System.Boolean

Position

Gets or sets the position of the window.

System.Numerics.Vector2 Position { get; set; }

Property Value

System.Numerics.Vector2

SceneManager

Gets the scene manager.

Velaptor.Scene.ISceneManager SceneManager { get; }

Property Value

ISceneManager

Title

Gets or sets the title of the window.

string Title { get; set; }

Property Value

System.String

TypeOfBorder

Gets or sets the type of border that the IWindow will have.

Velaptor.WindowBorder TypeOfBorder { get; set; }

Property Value

WindowBorder

Uninitialize

Gets or sets the System.Action delegate to be invoked one time to uninitialize the window.

System.Action? Uninitialize { get; set; }

Property Value

System.Action

Update

Gets or sets the System.Action delegate that is invoked per frame for updating.

System.Action<Velaptor.FrameTime>? Update { get; set; }

Property Value

System.Action<FrameTime>

UpdateFrequency

Gets or sets the value of how often the update and render calls are invoked in the value of hertz.

int UpdateFrequency { get; set; }

Property Value

System.Int32

Width

Gets or sets the width of the window.

uint Width { get; set; }

Property Value

System.UInt32

WindowState

Gets or sets the state of the window.

Velaptor.StateOfWindow WindowState { get; set; }

Property Value

StateOfWindow

WinResize

Gets or sets the System.Action delegate that is invoked every time the window is resized.

System.Action<Velaptor.SizeU>? WinResize { get; set; }

Property Value

System.Action<SizeU>

Methods

Close()

Closes the window.

void Close();

Show()

Shows the window.

void Show();

ShowAsync(Action, Action)

Shows the window asynchronously.

System.Threading.Tasks.Task ShowAsync(System.Action? afterStart=null, System.Action? afterUnload=null);

Parameters

afterStart System.Action

Executed after the application starts asynchronously.

afterUnload System.Action

Executed after the window has been unloaded.

Returns

System.Threading.Tasks.Task
A System.Threading.Tasks.Task representing the result of the asynchronous operation.