Class Surface
Represents a control/widget on a WindowsSystem.
Inheritance
Namespace: Evergine.Common.Graphics
Assembly: Evergine.Common.dll
Syntax
public abstract class Surface
Constructors
Surface(uint, uint)
Initializes a new instance of the Surface class.
Declaration
public Surface(uint width, uint height)
Parameters
Type | Name | Description |
---|---|---|
uint | width | Surface width. |
uint | height | Surface height. |
Fields
Height
Surface height.
Declaration
public uint Height
Field Value
Type | Description |
---|---|
uint |
SurfaceInfo
Surface information.
Declaration
public SurfaceInfo SurfaceInfo
Field Value
Type | Description |
---|---|
SurfaceInfo |
Width
Surface width.
Declaration
public uint Width
Field Value
Type | Description |
---|---|
uint |
Properties
DPIDensity
Gets or sets the surface DPI density.
Declaration
public float DPIDensity { get; protected set; }
Property Value
Type | Description |
---|---|
float |
KeyboardDispatcher
Gets the keyboard event dispatcher associated with this surface.
Declaration
public abstract KeyboardDispatcher KeyboardDispatcher { get; }
Property Value
Type | Description |
---|---|
KeyboardDispatcher |
MouseDispatcher
Gets the mouse event dispatcher associated with this surface.
Declaration
public abstract MouseDispatcher MouseDispatcher { get; }
Property Value
Type | Description |
---|---|
MouseDispatcher |
TouchDispatcher
Gets the touch events dispatcher associated with this surface.
Declaration
public abstract PointerDispatcher TouchDispatcher { get; }
Property Value
Type | Description |
---|---|
PointerDispatcher |
Methods
Destroy()
Removes managed resources.
Declaration
protected virtual void Destroy()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
OnClosing()
Raises the base window closing event.
Declaration
protected virtual void OnClosing()
OnGotFocus()
Raises the base got focus event.
Declaration
protected virtual void OnGotFocus()
OnInfoChanged()
Raises surface info changed event.
Declaration
protected virtual void OnInfoChanged()
OnLostFocus()
Raises the base lost focus event.
Declaration
protected virtual void OnLostFocus()
OnSizeChanged()
Raises the base size changed event.
Declaration
protected virtual void OnSizeChanged()
Events
Closing
Occurs when the surface is closing.
Declaration
public event EventHandler Closing
Event Type
Type | Description |
---|---|
EventHandler |
GotFocus
Occurs when the surface gets focus
Declaration
public event EventHandler GotFocus
Event Type
Type | Description |
---|---|
EventHandler |
LostFocus
Occurs when the surface loses focus
Declaration
public event EventHandler LostFocus
Event Type
Type | Description |
---|---|
EventHandler |
OnScreenSizeChanged
Occurs when the surface size is changed.
Declaration
public event EventHandler<SizeEventArgs> OnScreenSizeChanged
Event Type
Type | Description |
---|---|
EventHandler<SizeEventArgs> |
OnSurfaceInfoChanged
Occurs when the surface info changes.
Declaration
public event EventHandler<SurfaceInfo> OnSurfaceInfoChanged
Event Type
Type | Description |
---|---|
EventHandler<SurfaceInfo> |