Class SimpleSDLWindow
A very basic SDL wrapper to handle creating a window and processing SDL events.
Implements
Inherited Members
Namespace: ImGuiScene
Assembly: ImGuiScene.dll
Syntax
public class SimpleSDLWindow : IDisposable
Properties
| Improve this Doc View SourceOnSDLEvent
Delegate for providing user event handler methods that want to respond to SDL_Events.
Declaration
public SimpleSDLWindow.ProcessEventDelegate OnSDLEvent { get; set; }
Property Value
| Type | Description |
|---|---|
| SimpleSDLWindow.ProcessEventDelegate |
WantsClose
Whether an event has closed this window.
Declaration
public bool WantsClose { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Window
The SDL_Window pointer for this window.
Declaration
public IntPtr Window { get; }
Property Value
| Type | Description |
|---|---|
| System.IntPtr |
Methods
| Improve this Doc View SourceCreateColorKey(Single, Single, Single)
Creates a color key for use as a mask for MakeTransparent(UInt32)
Declaration
public static uint CreateColorKey(float r, float g, float b)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | r | The red component of the mask color (0-1) |
| System.Single | g | The green component of the mask color (0-1) |
| System.Single | b | The blue component of the mask color (0-1) |
Returns
| Type | Description |
|---|---|
| System.UInt32 |
Dispose()
Declaration
public void Dispose()
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing |
Finalize()
Declaration
protected void Finalize()
GetHWnd()
Gets the HWND of this window for interop with Windows methods.
Declaration
public IntPtr GetHWnd()
Returns
| Type | Description |
|---|---|
| System.IntPtr | This window's HWND |
InitForRenderer(IRenderer)
Declaration
protected virtual void InitForRenderer(IRenderer renderer)
Parameters
| Type | Name | Description |
|---|---|---|
| IRenderer | renderer |
MakeTransparent(UInt32)
Converts this to a layered window and makes any region that matches transparentColorKey fully transparent.
Transparent regions behave as if they are not present, and can be clicked through etc.
Declaration
protected void MakeTransparent(uint transparentColorKey)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32 | transparentColorKey |
See Also
| Improve this Doc View SourceProcessEvents()
Basic SDL event loop to consume all events and handle window closure. User handlers from OnSDLEvent are invoked for every event.
Declaration
public void ProcessEvents()
WindowCreationFlags(WindowCreateInfo)
Return the set of window flags necessary to create a window matching what is requested in createInfo
Declaration
protected virtual SDL.SDL_WindowFlags WindowCreationFlags(WindowCreateInfo createInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| WindowCreateInfo | createInfo | The requested creation parameters for the window. |
Returns
| Type | Description |
|---|---|
| SDL.SDL_WindowFlags | The full set of SDL_WindowFlags to use when creating this window. |