C# Класс OpenTK.NativeWindow

Instances of this class implement the OpenTK.INativeWindow interface on the current platform.
Наследование: INativeWindow
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
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

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

Close() публичный Метод

Closes the NativeWindow.
public Close ( ) : void
Результат void

Dispose() публичный Метод

Releases all non-managed resources belonging to this NativeWindow.
public Dispose ( ) : void
Результат void

EnsureUndisposed() защищенный Метод

Ensures that this NativeWindow has not been disposed.
/// If this NativeWindow has been disposed. ///
protected EnsureUndisposed ( ) : void
Результат void

NativeWindow() публичный Метод

Constructs a new NativeWindow with default attributes without enabling events.
public NativeWindow ( ) : System
Результат System

NativeWindow() публичный Метод

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.
Результат System

NativeWindow() публичный Метод

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.
Результат System

OnClosed() защищенный Метод

Called when the NativeWindow has closed.
protected OnClosed ( EventArgs e ) : void
e System.EventArgs Not used.
Результат void

OnClosing() защищенный Метод

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.
Результат void

OnDisposed() защищенный Метод

Called when the NativeWindow is disposed.
protected OnDisposed ( EventArgs e ) : void
e System.EventArgs Not used.
Результат void

OnFocusedChanged() защищенный Метод

Called when the OpenTK.INativeWindow.Focused property of the NativeWindow has changed.
protected OnFocusedChanged ( EventArgs e ) : void
e System.EventArgs Not used.
Результат void

OnIconChanged() защищенный Метод

Called when the OpenTK.INativeWindow.Icon property of the NativeWindow has changed.
protected OnIconChanged ( EventArgs e ) : void
e System.EventArgs Not used.
Результат void

OnKeyDown() защищенный Метод

Occurs whenever a keybord key is pressed.
protected OnKeyDown ( KeyboardKeyEventArgs e ) : void
e OpenTK.Input.KeyboardKeyEventArgs
Результат void

OnKeyPress() защищенный Метод

Called when a character is typed.
protected OnKeyPress ( KeyPressEventArgs e ) : void
e KeyPressEventArgs The for this event.
Результат void

OnKeyUp() защищенный Метод

Called when a keybord key is released.
protected OnKeyUp ( KeyboardKeyEventArgs e ) : void
e OpenTK.Input.KeyboardKeyEventArgs The for this event.
Результат void

OnMouseEnter() защищенный Метод

Called whenever the mouse cursor reenters the window Bounds.
protected OnMouseEnter ( EventArgs e ) : void
e System.EventArgs Not used.
Результат void

OnMouseLeave() защищенный Метод

Called whenever the mouse cursor leaves the window Bounds.
protected OnMouseLeave ( EventArgs e ) : void
e System.EventArgs Not used.
Результат void

OnMove() защищенный Метод

Called when the NativeWindow is moved.
protected OnMove ( EventArgs e ) : void
e System.EventArgs Not used.
Результат void

OnResize() защищенный Метод

Called when the NativeWindow is resized.
protected OnResize ( EventArgs e ) : void
e System.EventArgs Not used.
Результат void

OnTitleChanged() защищенный Метод

Called when the OpenTK.INativeWindow.Title property of the NativeWindow has changed.
protected OnTitleChanged ( EventArgs e ) : void
e System.EventArgs Not used.
Результат void

OnVisibleChanged() защищенный Метод

Called when the OpenTK.INativeWindow.Visible property of the NativeWindow has changed.
protected OnVisibleChanged ( EventArgs e ) : void
e EventArgs Not used.
Результат void

OnWindowBorderChanged() защищенный Метод

Called when the WindowBorder of this NativeWindow has changed.
protected OnWindowBorderChanged ( EventArgs e ) : void
e EventArgs Not used.
Результат void

OnWindowStateChanged() защищенный Метод

Called when the WindowState of this NativeWindow has changed.
protected OnWindowStateChanged ( EventArgs e ) : void
e EventArgs Not used.
Результат void

PointToClient() публичный Метод

Transforms the specified point from screen to client coordinates.
public PointToClient ( Point point ) : Point
point Point /// A to transform. ///
Результат Point

PointToScreen() публичный Метод

Transforms the specified point from client to screen coordinates.
public PointToScreen ( Point point ) : Point
point Point /// A to transform. ///
Результат Point

ProcessEvents() публичный Метод

Processes operating system events until the NativeWindow becomes idle.
public ProcessEvents ( ) : void
Результат void

ProcessEvents() защищенный Метод

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.
Результат void