C# Class OpenTK.NativeWindow

Instances of this class implement the OpenTK.INativeWindow interface on the current platform.
Inheritance: INativeWindow
Mostrar archivo Open project: andykorth/opentk Class Usage Examples

Private Properties

Property Type Description
OnClosedInternal void
OnClosingInternal void
OnDisposedInternal void
OnFocusedChangedInternal void
OnIconChangedInternal void
OnKeyPressInternal void
OnMouseEnterInternal void
OnMouseLeaveInternal void
OnMoveInternal void
OnResizeInternal void
OnTitleChangedInternal void
OnVisibleChangedInternal void
OnWindowBorderChangedInternal void
OnWindowStateChangedInternal void

Public Methods

Method Description
Close ( ) : void

Closes the NativeWindow.

Dispose ( ) : void

Releases all non-managed resources belonging to this NativeWindow.

NativeWindow ( ) : System

Constructs a new NativeWindow with default attributes without enabling events.

NativeWindow ( int x, int y, int width, int height, string title, GameWindowFlags options, OpenTK.Graphics.GraphicsMode mode, DisplayDevice device ) : System

Constructs a new NativeWindow with the specified attributes.

NativeWindow ( int width, int height, string title, GameWindowFlags options, OpenTK.Graphics.GraphicsMode mode, DisplayDevice device ) : System

Constructs a new centered NativeWindow with the specified attributes.

PointToClient ( Point point ) : Point

Transforms the specified point from screen to client coordinates.

PointToScreen ( Point point ) : Point

Transforms the specified point from client to screen coordinates.

ProcessEvents ( ) : void

Processes operating system events until the NativeWindow becomes idle.

Protected Methods

Method Description
EnsureUndisposed ( ) : void

Ensures that this NativeWindow has not been disposed.

OnClosed ( EventArgs e ) : void

Called when the NativeWindow has closed.

OnClosing ( CancelEventArgs e ) : void

Called when the NativeWindow is about to close.

OnDisposed ( EventArgs e ) : void

Called when the NativeWindow is disposed.

OnFocusedChanged ( EventArgs e ) : void

Called when the OpenTK.INativeWindow.Focused property of the NativeWindow has changed.

OnIconChanged ( EventArgs e ) : void

Called when the OpenTK.INativeWindow.Icon property of the NativeWindow has changed.

OnKeyDown ( KeyboardKeyEventArgs e ) : void

Occurs whenever a keybord key is pressed.

OnKeyPress ( KeyPressEventArgs e ) : void

Called when a character is typed.

OnKeyUp ( KeyboardKeyEventArgs e ) : void

Called when a keybord key is released.

OnMouseEnter ( EventArgs e ) : void

Called whenever the mouse cursor reenters the window Bounds.

OnMouseLeave ( EventArgs e ) : void

Called whenever the mouse cursor leaves the window Bounds.

OnMove ( EventArgs e ) : void

Called when the NativeWindow is moved.

OnResize ( EventArgs e ) : void

Called when the NativeWindow is resized.

OnTitleChanged ( EventArgs e ) : void

Called when the OpenTK.INativeWindow.Title property of the NativeWindow has changed.

OnVisibleChanged ( EventArgs e ) : void

Called when the OpenTK.INativeWindow.Visible property of the NativeWindow has changed.

OnWindowBorderChanged ( EventArgs e ) : void

Called when the WindowBorder of this NativeWindow has changed.

OnWindowStateChanged ( EventArgs e ) : void

Called when the WindowState of this NativeWindow has changed.

ProcessEvents ( bool retainEvents ) : void

Processes operating system events until the NativeWindow becomes idle.

Private Methods

Method Description
OnClosedInternal ( object sender, EventArgs e ) : void
OnClosingInternal ( object sender, CancelEventArgs e ) : void
OnDisposedInternal ( object sender, EventArgs e ) : void
OnFocusedChangedInternal ( object sender, EventArgs e ) : void
OnIconChangedInternal ( object sender, EventArgs e ) : void
OnKeyPressInternal ( object sender, KeyPressEventArgs e ) : void
OnMouseEnterInternal ( object sender, EventArgs e ) : void
OnMouseLeaveInternal ( object sender, EventArgs e ) : void
OnMoveInternal ( object sender, EventArgs e ) : void
OnResizeInternal ( object sender, EventArgs e ) : void
OnTitleChangedInternal ( object sender, EventArgs e ) : void
OnVisibleChangedInternal ( object sender, EventArgs e ) : void
OnWindowBorderChangedInternal ( object sender, EventArgs e ) : void
OnWindowStateChangedInternal ( object sender, EventArgs e ) : void

Method Details

Close() public method

Closes the NativeWindow.
public Close ( ) : void
return void

Dispose() public method

Releases all non-managed resources belonging to this NativeWindow.
public Dispose ( ) : void
return void

EnsureUndisposed() protected method

Ensures that this NativeWindow has not been disposed.
/// If this NativeWindow has been disposed. ///
protected EnsureUndisposed ( ) : void
return void

NativeWindow() public method

Constructs a new NativeWindow with default attributes without enabling events.
public NativeWindow ( ) : System
return System

NativeWindow() public method

Constructs a new NativeWindow with the specified attributes.
If width or height is less than 1. If mode or device is null.
public NativeWindow ( int x, int y, int width, int height, string title, GameWindowFlags options, OpenTK.Graphics.GraphicsMode mode, DisplayDevice device ) : System
x int Horizontal screen space coordinate of the NativeWindow's origin.
y int Vertical screen space coordinate of the NativeWindow's origin.
width int The width of the NativeWindow in pixels.
height int The height of the NativeWindow in pixels.
title string The title of the NativeWindow.
options GameWindowFlags GameWindow options specifying window appearance and behavior.
mode OpenTK.Graphics.GraphicsMode The OpenTK.Graphics.GraphicsMode of the NativeWindow.
device DisplayDevice The OpenTK.Graphics.DisplayDevice to construct the NativeWindow in.
return System

NativeWindow() public method

Constructs a new centered NativeWindow with the specified attributes.
If width or height is less than 1. If mode or device is null.
public NativeWindow ( int width, int height, string title, GameWindowFlags options, OpenTK.Graphics.GraphicsMode mode, DisplayDevice device ) : System
width int The width of the NativeWindow in pixels.
height int The height of the NativeWindow in pixels.
title string The title of the NativeWindow.
options GameWindowFlags GameWindow options specifying window appearance and behavior.
mode OpenTK.Graphics.GraphicsMode The OpenTK.Graphics.GraphicsMode of the NativeWindow.
device DisplayDevice The OpenTK.Graphics.DisplayDevice to construct the NativeWindow in.
return System

OnClosed() protected method

Called when the NativeWindow has closed.
protected OnClosed ( EventArgs e ) : void
e System.EventArgs Not used.
return void

OnClosing() protected method

Called when the NativeWindow is about to close.
protected OnClosing ( CancelEventArgs e ) : void
e CancelEventArgs /// The for this event. /// Set e.Cancel to true in order to stop the NativeWindow from closing.
return void

OnDisposed() protected method

Called when the NativeWindow is disposed.
protected OnDisposed ( EventArgs e ) : void
e System.EventArgs Not used.
return void

OnFocusedChanged() protected method

Called when the OpenTK.INativeWindow.Focused property of the NativeWindow has changed.
protected OnFocusedChanged ( EventArgs e ) : void
e System.EventArgs Not used.
return void

OnIconChanged() protected method

Called when the OpenTK.INativeWindow.Icon property of the NativeWindow has changed.
protected OnIconChanged ( EventArgs e ) : void
e System.EventArgs Not used.
return void

OnKeyDown() protected method

Occurs whenever a keybord key is pressed.
protected OnKeyDown ( KeyboardKeyEventArgs e ) : void
e OpenTK.Input.KeyboardKeyEventArgs
return void

OnKeyPress() protected method

Called when a character is typed.
protected OnKeyPress ( KeyPressEventArgs e ) : void
e KeyPressEventArgs The for this event.
return void

OnKeyUp() protected method

Called when a keybord key is released.
protected OnKeyUp ( KeyboardKeyEventArgs e ) : void
e OpenTK.Input.KeyboardKeyEventArgs The for this event.
return void

OnMouseEnter() protected method

Called whenever the mouse cursor reenters the window Bounds.
protected OnMouseEnter ( EventArgs e ) : void
e System.EventArgs Not used.
return void

OnMouseLeave() protected method

Called whenever the mouse cursor leaves the window Bounds.
protected OnMouseLeave ( EventArgs e ) : void
e System.EventArgs Not used.
return void

OnMove() protected method

Called when the NativeWindow is moved.
protected OnMove ( EventArgs e ) : void
e System.EventArgs Not used.
return void

OnResize() protected method

Called when the NativeWindow is resized.
protected OnResize ( EventArgs e ) : void
e System.EventArgs Not used.
return void

OnTitleChanged() protected method

Called when the OpenTK.INativeWindow.Title property of the NativeWindow has changed.
protected OnTitleChanged ( EventArgs e ) : void
e System.EventArgs Not used.
return void

OnVisibleChanged() protected method

Called when the OpenTK.INativeWindow.Visible property of the NativeWindow has changed.
protected OnVisibleChanged ( EventArgs e ) : void
e EventArgs Not used.
return void

OnWindowBorderChanged() protected method

Called when the WindowBorder of this NativeWindow has changed.
protected OnWindowBorderChanged ( EventArgs e ) : void
e EventArgs Not used.
return void

OnWindowStateChanged() protected method

Called when the WindowState of this NativeWindow has changed.
protected OnWindowStateChanged ( EventArgs e ) : void
e EventArgs Not used.
return void

PointToClient() public method

Transforms the specified point from screen to client coordinates.
public PointToClient ( Point point ) : Point
point Point /// A to transform. ///
return Point

PointToScreen() public method

Transforms the specified point from client to screen coordinates.
public PointToScreen ( Point point ) : Point
point Point /// A to transform. ///
return Point

ProcessEvents() public method

Processes operating system events until the NativeWindow becomes idle.
public ProcessEvents ( ) : void
return void

ProcessEvents() protected method

Processes operating system events until the NativeWindow becomes idle.
protected ProcessEvents ( bool retainEvents ) : void
retainEvents bool If true, the state of underlying system event propagation will be preserved, otherwise event propagation will be enabled if it has not been already.
return void