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
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
AutoSceneRendering
Gets or sets a value indicating whether or not the scenes should be automatically rendered.
bool AutoSceneRendering { get; set; }
Property Value
AutoSceneUnloading
Gets or sets a value indicating whether or not the scenes should be automatically unloaded.
bool AutoSceneUnloading { get; set; }
Property Value
AutoSceneUpdating
Gets or sets a value indicating whether or not the scenes should be automatically updated.
bool AutoSceneUpdating { get; set; }
Property Value
Draw
Gets or sets the System.Action delegate that is invoked per frame for rendering.
System.Action<Velaptor.FrameTime>? Draw { get; set; }
Property Value
Fps
Gets the frames per second that the main loop is running at.
float Fps { get; }
Property Value
Height
Gets or sets the height of the window.
uint Height { get; set; }
Property Value
Initialize
Gets or sets the System.Action delegate to be invoked one time to initialize the window.
System.Action? Initialize { get; set; }
Property Value
Initialized
Gets a value indicating whether or not the window has been initialized.
bool Initialized { get; }
Property Value
MouseCursorVisible
Gets or sets a value indicating whether or not the mouse cursor is visible.
bool MouseCursorVisible { get; set; }
Property Value
Position
Gets or sets the position of the window.
System.Numerics.Vector2 Position { get; set; }
Property Value
SceneManager
Gets the scene manager.
Velaptor.Scene.ISceneManager SceneManager { get; }
Property Value
Title
Gets or sets the title of the window.
string Title { get; set; }
Property Value
TypeOfBorder
Gets or sets the type of border that the IWindow will have.
Velaptor.WindowBorder TypeOfBorder { get; set; }
Property Value
Uninitialize
Gets or sets the System.Action delegate to be invoked one time to uninitialize the window.
System.Action? Uninitialize { get; set; }
Property Value
Update
Gets or sets the System.Action delegate that is invoked per frame for updating.
System.Action<Velaptor.FrameTime>? Update { get; set; }
Property Value
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
Width
Gets or sets the width of the window.
uint Width { get; set; }
Property Value
WindowState
Gets or sets the state of the window.
Velaptor.StateOfWindow WindowState { get; set; }
Property Value
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
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.