Class Window
public class Window : IDisposable
- Inheritance
-
Window
- Implements
- Derived
- Extension Methods
Constructors
Window(string)
Initializes a new instance of the Window class with title
as the title of the Window.
public Window(string title)
Parameters
title
stringTitle of the window, see Text property.
Fields
SDL
public static Sdl SDL
Field Value
- Sdl
Properties
ClientRectangle
Size of client area expressed as a rectangle.
public Rectangle ClientRectangle { get; set; }
Property Value
ClientSize
Size of the client area of a window.
public Size2 ClientSize { get; set; }
Property Value
Display
Display of current Window (valid only for Unix for X11).
public IntPtr Display { get; }
Property Value
Exists
Is the Window still alive?
public bool Exists { get; }
Property Value
Focused
Is current window focused?
public bool Focused { get; }
Property Value
FormBorderStyle
Style of border. Currently can only be Sizable or FixedSingle.
public FormBorderStyle FormBorderStyle { get; set; }
Property Value
FullscreenIsBorderlessWindow
Gets or sets a value indicating whether fullscreen mode should be a borderless window matching the desktop size. Decides whether to set the SDL_WINDOW_FULLSCREEN_DESKTOP (fake fullscreen) or SDL_WINDOW_FULLSCREEN (real fullscreen) flag.
public bool FullscreenIsBorderlessWindow { get; set; }
Property Value
Handle
Platform specific handle for Window.
public IntPtr Handle { get; }
Property Value
Remarks
- On Windows: the HWND of the window
- On Unix: the Window ID (XID). Note that on Unix, the value is 32-bit (See X11/X.h for the typedef of XID).
IsDisposed
Have we already disposed of the current object?
public bool IsDisposed { get; }
Property Value
IsFullScreen
Are we showing the window in full screen mode?
public bool IsFullScreen { get; set; }
Property Value
Location
Coordinates of the top-left corner of the window in screen coordinate.
public Point Location { get; set; }
Property Value
MaximizeBox
Does current window offer a maximize button?
public bool MaximizeBox { get; set; }
Property Value
Remarks
Setter is not implemented on SDL, since we do have callers, for the time being, the code does nothing instead of throwing an exception.
MinimizeOnFocusLoss
Minimize the window when focus is lost in fullscreen, default is false.
public bool MinimizeOnFocusLoss { get; set; }
Property Value
MousePosition
Get the mouse position on screen.
public static Point MousePosition { get; }
Property Value
RelativeCursorPosition
Get the coordinate of the mouse in Window coordinates
public Point RelativeCursorPosition { get; set; }
Property Value
SdlHandle
The SDL window handle.
public IntPtr SdlHandle { get; }
Property Value
Size
Size of window.
public Size2 Size { get; set; }
Property Value
Surface
Surface of current Window (valid only for Android).
public IntPtr Surface { get; }
Property Value
Text
Text of the title of the Window.
public string Text { get; set; }
Property Value
TopMost
Make the window topmost
public bool TopMost { get; set; }
Property Value
Visible
Is current window visible?
public bool Visible { get; set; }
Property Value
WindowState
State of the window which can be either of Normal, Maximized or Minimized.
public FormWindowState WindowState { get; set; }
Property Value
Methods
BringToFront()
Move window to front.
public virtual void BringToFront()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
Dispose of current Window.
protected virtual void Dispose(bool disposing)
Parameters
disposing
boolIf
false
we are being called from the Finalizer.
~Window()
protected ~Window()
ProcessEvent(Event)
Process events for the current window
public virtual void ProcessEvent(Event e)
Parameters
e
Event
SendToBack()
Move window to back.
public virtual void SendToBack()
SetRelativeMouseMode(bool)
public void SetRelativeMouseMode(bool enabled)
Parameters
enabled
bool
Show()
Show window. The first time a window is shown we execute any actions from HandleCreated.
public void Show()
Events
ActivateActions
public event Window.WindowEventDelegate ActivateActions
Event Type
CloseActions
public event Window.NotificationDelegate CloseActions
Event Type
DeActivateActions
public event Window.WindowEventDelegate DeActivateActions
Event Type
Disposed
Actions to be called when we dispose of current.
public event EventHandler Disposed
Event Type
DropFileActions
public event Window.DropEventDelegate DropFileActions
Event Type
FingerMoveActions
public event Window.TouchFingerDelegate FingerMoveActions
Event Type
FingerPressActions
public event Window.TouchFingerDelegate FingerPressActions
Event Type
FingerReleaseActions
public event Window.TouchFingerDelegate FingerReleaseActions
Event Type
FocusGainedActions
public event Window.WindowEventDelegate FocusGainedActions
Event Type
FocusLostActions
public event Window.WindowEventDelegate FocusLostActions
Event Type
JoystickDeviceAdded
public event Window.JoystickDeviceChangedDelegate JoystickDeviceAdded
Event Type
JoystickDeviceRemoved
public event Window.JoystickDeviceChangedDelegate JoystickDeviceRemoved
Event Type
KeyDownActions
public event Window.KeyDelegate KeyDownActions
Event Type
KeyUpActions
public event Window.KeyDelegate KeyUpActions
Event Type
MaximizedActions
public event Window.WindowEventDelegate MaximizedActions
Event Type
MinimizedActions
public event Window.WindowEventDelegate MinimizedActions
Event Type
MouseEnterActions
public event Window.WindowEventDelegate MouseEnterActions
Event Type
MouseLeaveActions
public event Window.WindowEventDelegate MouseLeaveActions
Event Type
MouseMoveActions
public event Window.MouseMoveDelegate MouseMoveActions
Event Type
MouseWheelActions
public event Window.MouseWheelDelegate MouseWheelActions
Event Type
PointerButtonPressActions
public event Window.MouseButtonDelegate PointerButtonPressActions
Event Type
PointerButtonReleaseActions
public event Window.MouseButtonDelegate PointerButtonReleaseActions
Event Type
ResizeBeginActions
public event Window.WindowEventDelegate ResizeBeginActions
Event Type
ResizeEndActions
public event Window.WindowEventDelegate ResizeEndActions
Event Type
RestoredActions
public event Window.WindowEventDelegate RestoredActions
Event Type
TextEditingActions
public event Window.TextEditingDelegate TextEditingActions
Event Type
TextInputActions
public event Window.TextInputDelegate TextInputActions