Velaptor.UI.Window
Velaptor
Velaptor.UI
Window Class
A system window where graphics can be rendered.
public abstract class Window :
Velaptor.UI.IWindow,
System.IDisposable
Inheritance System.Object → Window
Implements IWindow, System.IDisposable
Properties
AutoClearBuffer
Gets or sets a value indicating whether or not the buffers should
be automatically cleared before rendering any textures.
public bool AutoClearBuffer { get; set; }
Implements AutoClearBuffer
Property Value
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.
public bool AutoSceneLoading { get; set; }
Implements AutoSceneLoading
Property Value
AutoSceneRendering
Gets or sets a value indicating whether or not the scenes should be automatically rendered.
public bool AutoSceneRendering { get; set; }
Implements AutoSceneRendering
Property Value
AutoSceneUnloading
Gets or sets a value indicating whether or not the scenes should be automatically unloaded.
public bool AutoSceneUnloading { get; set; }
Implements AutoSceneUnloading
Property Value
AutoSceneUpdating
Gets or sets a value indicating whether or not the scenes should be automatically updated.
public bool AutoSceneUpdating { get; set; }
Implements AutoSceneUpdating
Property Value
Draw
Gets or sets the System.Action delegate that is invoked per frame for rendering.
public System.Action<Velaptor.FrameTime>? Draw { get; set; }
Implements Draw
Property Value
Fps
Gets the frames per second that the main loop is running at.
public float Fps { get; }
Implements Fps
Property Value
Height
Gets or sets the height of the window.
public uint Height { get; set; }
Implements Height
Property Value
Initialize
Gets or sets the System.Action delegate to be invoked one time to initialize the window.
public System.Action? Initialize { get; set; }
Implements Initialize
Property Value
Initialized
Gets a value indicating whether or not the window has been initialized.
public bool Initialized { get; }
Implements Initialized
Property Value
MouseCursorVisible
Gets or sets a value indicating whether or not the mouse cursor is visible.
public bool MouseCursorVisible { get; set; }
Implements MouseCursorVisible
Property Value
Position
Gets or sets the position of the window.
public System.Numerics.Vector2 Position { get; set; }
Implements Position
Property Value
SceneManager
Gets the scene manager.
public Velaptor.Scene.ISceneManager SceneManager { get; }
Implements SceneManager
Property Value
Title
Gets or sets the title of the window.
public string Title { get; set; }
Implements Title
Property Value
TypeOfBorder
Gets or sets the type of border that the IWindow will have.
public Velaptor.WindowBorder TypeOfBorder { get; set; }
Implements TypeOfBorder
Property Value
Uninitialize
Gets or sets the System.Action delegate to be invoked one time to uninitialize the window.
public System.Action? Uninitialize { get; set; }
Implements Uninitialize
Property Value
Update
Gets or sets the System.Action delegate that is invoked per frame for updating.
public System.Action<Velaptor.FrameTime>? Update { get; set; }
Implements Update
Property Value
UpdateFrequency
Gets or sets the value of how often the update and render calls are invoked in the value of hertz.
public int UpdateFrequency { get; set; }
Implements UpdateFrequency
Property Value
Width
Gets or sets the width of the window.
public uint Width { get; set; }
Implements Width
Property Value
WindowState
Gets or sets the state of the window.
public Velaptor.StateOfWindow WindowState { get; set; }
Implements WindowState
Property Value
WinResize
Gets or sets the System.Action delegate that is invoked every time the window is resized.
public System.Action<Velaptor.SizeU>? WinResize { get; set; }
Implements WinResize
Property Value
Methods
Close()
Closes the window.
public void Close();
Implements Close()
Dispose()
public void Dispose();
Implements Dispose()
Show()
Shows the window.
public void Show();
Implements Show()
ShowAsync(Action, Action)
Shows the window asynchronously.
public 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.
Implements ShowAsync(Action, Action)
Returns
System.Threading.Tasks.Task
A System.Threading.Tasks.Task representing the result of the asynchronous operation.
Remarks
This runs the window on another thread.