The Open Toolkit library
1.0
|
Instances of this class implement the OpenTK.INativeWindow interface on the current platform. More...
Public Member Functions | |
NativeWindow () | |
Constructs a new NativeWindow with default attributes without enabling events. More... | |
NativeWindow (int width, int height, string title, GameWindowFlags options, GraphicsMode mode, DisplayDevice device) | |
Constructs a new centered NativeWindow with the specified attributes. More... | |
NativeWindow (int x, int y, int width, int height, string title, GameWindowFlags options, GraphicsMode mode, DisplayDevice device) | |
Constructs a new NativeWindow with the specified attributes. More... | |
void | Close () |
Closes the NativeWindow. More... | |
Point | PointToClient (Point point) |
Transforms the specified point from screen to client coordinates. More... | |
Point | PointToScreen (Point point) |
Transforms the specified point from client to screen coordinates. More... | |
void | ProcessEvents () |
Processes operating system events until the NativeWindow becomes idle. More... | |
virtual void | Dispose () |
Releases all non-managed resources belonging to this NativeWindow. More... | |
Protected Member Functions | |
void | EnsureUndisposed () |
Ensures that this NativeWindow has not been disposed. More... | |
virtual void | OnClosed (EventArgs e) |
Called when the NativeWindow has closed. More... | |
virtual void | OnClosing (CancelEventArgs e) |
Called when the NativeWindow is about to close. More... | |
virtual void | OnDisposed (EventArgs e) |
Called when the NativeWindow is disposed. More... | |
virtual void | OnFocusedChanged (EventArgs e) |
Called when the OpenTK.INativeWindow.Focused property of the NativeWindow has changed. More... | |
virtual void | OnIconChanged (EventArgs e) |
Called when the OpenTK.INativeWindow.Icon property of the NativeWindow has changed. More... | |
virtual void | OnKeyDown (KeyboardKeyEventArgs e) |
Occurs whenever a keybord key is pressed. More... | |
virtual void | OnKeyPress (KeyPressEventArgs e) |
Called when a character is typed. More... | |
virtual void | OnKeyUp (KeyboardKeyEventArgs e) |
Called when a keybord key is released. More... | |
virtual void | OnMove (EventArgs e) |
Called when the NativeWindow is moved. More... | |
virtual void | OnMouseEnter (EventArgs e) |
Called whenever the mouse cursor reenters the window Bounds. More... | |
virtual void | OnMouseLeave (EventArgs e) |
Called whenever the mouse cursor leaves the window Bounds. More... | |
virtual void | OnResize (EventArgs e) |
Called when the NativeWindow is resized. More... | |
virtual void | OnTitleChanged (EventArgs e) |
Called when the OpenTK.INativeWindow.Title property of the NativeWindow has changed. More... | |
virtual void | OnVisibleChanged (EventArgs e) |
Called when the OpenTK.INativeWindow.Visible property of the NativeWindow has changed. More... | |
virtual void | OnWindowBorderChanged (EventArgs e) |
Called when the WindowBorder of this NativeWindow has changed. More... | |
virtual void | OnWindowStateChanged (EventArgs e) |
Called when the WindowState of this NativeWindow has changed. More... | |
void | ProcessEvents (bool retainEvents) |
Processes operating system events until the NativeWindow becomes idle. More... | |
Properties | |
Rectangle | Bounds [get, set] |
Gets or sets a System.Drawing.Rectangle structure that contains the external bounds of this window, in screen coordinates. External bounds include the title bar, borders and drawing area of the window. More... | |
Rectangle | ClientRectangle [get, set] |
Gets or sets a System.Drawing.Rectangle structure that contains the internal bounds of this window, in client coordinates. The internal bounds include the drawing area of the window, but exclude the titlebar and window borders. More... | |
Size | ClientSize [get, set] |
Gets or sets a System.Drawing.Size structure that contains the internal size this window. More... | |
bool | Exists [get] |
Gets a value indicating whether a render window exists. More... | |
bool | Focused [get] |
Gets a System.Boolean that indicates whether this NativeWindow has input focus. More... | |
int | Height [get, set] |
Gets or sets the external height of this window. More... | |
Icon | Icon [get, set] |
Gets or sets the System.Drawing.Icon for this GameWindow. More... | |
IInputDriver | InputDriver [get] |
This property is deprecated. More... | |
Point | Location [get, set] |
Gets or sets a System.Drawing.Point structure that contains the location of this window on the desktop. More... | |
Size | Size [get, set] |
Gets or sets a System.Drawing.Size structure that contains the external size of this window. More... | |
string | Title [get, set] |
Gets or sets the NativeWindow title. More... | |
bool | Visible [get, set] |
Gets or sets a System.Boolean that indicates whether this NativeWindow is visible. More... | |
int | Width [get, set] |
Gets or sets the external width of this window. More... | |
WindowBorder | WindowBorder [get, set] |
Gets or states the border of the NativeWindow. More... | |
IWindowInfo | WindowInfo [get] |
Gets the OpenTK.Platform.IWindowInfo of this window. More... | |
virtual WindowState | WindowState [get, set] |
Gets or states the state of the NativeWindow. More... | |
int | X [get, set] |
Gets or sets the horizontal location of this window on the desktop. More... | |
int | Y [get, set] |
Gets or sets the vertical location of this window on the desktop. More... | |
bool | CursorVisible [get, set] |
Gets or sets a value indicating whether the mouse cursor is visible. More... | |
bool | IsDisposed [get, set] |
Gets or sets a System.Boolean, which indicates whether this instance has been disposed. More... | |
Properties inherited from OpenTK.INativeWindow | |
Icon | Icon [get, set] |
Gets or sets the System.Drawing.Icon of the window. More... | |
string | Title [get, set] |
Gets or sets the title of the window. More... | |
bool | Focused [get] |
Gets a System.Boolean that indicates whether this window has input focus. More... | |
bool | Visible [get, set] |
Gets or sets a System.Boolean that indicates whether the window is visible. More... | |
bool | Exists [get] |
Gets a System.Boolean that indicates whether the window has been created and has not been destroyed. More... | |
IWindowInfo | WindowInfo [get] |
Gets the OpenTK.Platform.IWindowInfo for this window. More... | |
WindowState | WindowState [get, set] |
Gets or sets the OpenTK.WindowState for this window. More... | |
WindowBorder | WindowBorder [get, set] |
Gets or sets the OpenTK.WindowBorder for this window. More... | |
Rectangle | Bounds [get, set] |
Gets or sets a System.Drawing.Rectangle structure the contains the external bounds of this window, in screen coordinates. External bounds include the title bar, borders and drawing area of the window. More... | |
Point | Location [get, set] |
Gets or sets a System.Drawing.Point structure that contains the location of this window on the desktop. More... | |
Size | Size [get, set] |
Gets or sets a System.Drawing.Size structure that contains the external size of this window. More... | |
int | X [get, set] |
Gets or sets the horizontal location of this window on the desktop. More... | |
int | Y [get, set] |
Gets or sets the vertical location of this window on the desktop. More... | |
int | Width [get, set] |
Gets or sets the external width of this window. More... | |
int | Height [get, set] |
Gets or sets the external height of this window. More... | |
Rectangle | ClientRectangle [get, set] |
Gets or sets a System.Drawing.Rectangle structure that contains the internal bounds of this window, in client coordinates. The internal bounds include the drawing area of the window, but exclude the titlebar and window borders. More... | |
Size | ClientSize [get, set] |
Gets or sets a System.Drawing.Size structure that contains the internal size this window. More... | |
OpenTK.Input.IInputDriver | InputDriver [get] |
This property is deprecated and should not be used. More... | |
bool | CursorVisible [get, set] |
Gets or sets a value, indicating whether the mouse cursor is visible. More... | |
Events | |
EventHandler< EventArgs > | Closed = delegate { } |
Occurs after the window has closed. More... | |
EventHandler< CancelEventArgs > | Closing = delegate { } |
Occurs when the window is about to close. More... | |
EventHandler< EventArgs > | Disposed = delegate { } |
Occurs when the window is disposed. More... | |
EventHandler< EventArgs > | FocusedChanged = delegate { } |
Occurs when the Focused property of the window changes. More... | |
EventHandler< EventArgs > | IconChanged = delegate { } |
Occurs when the Icon property of the window changes. More... | |
EventHandler < OpenTK.Input.KeyboardKeyEventArgs > | KeyDown = delegate { } |
Occurs whenever a keybord key is pressed. More... | |
EventHandler< KeyPressEventArgs > | KeyPress = delegate { } |
Occurs whenever a character is typed. More... | |
EventHandler < OpenTK.Input.KeyboardKeyEventArgs > | KeyUp = delegate { } |
Occurs whenever a keyboard key is released. More... | |
EventHandler< EventArgs > | Move = delegate { } |
Occurs whenever the window is moved. More... | |
EventHandler< EventArgs > | MouseEnter = delegate { } |
Occurs whenever the mouse cursor enters the window Bounds. More... | |
EventHandler< EventArgs > | MouseLeave = delegate { } |
Occurs whenever the mouse cursor leaves the window Bounds. More... | |
EventHandler< EventArgs > | Resize = delegate { } |
Occurs whenever the window is resized. More... | |
EventHandler< EventArgs > | TitleChanged = delegate { } |
Occurs when the Title property of the window changes. More... | |
EventHandler< EventArgs > | VisibleChanged = delegate { } |
Occurs when the Visible property of the window changes. More... | |
EventHandler< EventArgs > | WindowBorderChanged = delegate { } |
Occurs when the WindowBorder property of the window changes. More... | |
EventHandler< EventArgs > | WindowStateChanged = delegate { } |
Occurs when the WindowState property of the window changes. More... | |
Events inherited from OpenTK.INativeWindow | |
EventHandler< EventArgs > | Move |
Occurs whenever the window is moved. More... | |
EventHandler< EventArgs > | Resize |
Occurs whenever the window is resized. More... | |
EventHandler< CancelEventArgs > | Closing |
Occurs when the window is about to close. More... | |
EventHandler< EventArgs > | Closed |
Occurs after the window has closed. More... | |
EventHandler< EventArgs > | Disposed |
Occurs when the window is disposed. More... | |
EventHandler< EventArgs > | IconChanged |
Occurs when the Icon property of the window changes. More... | |
EventHandler< EventArgs > | TitleChanged |
Occurs when the Title property of the window changes. More... | |
EventHandler< EventArgs > | VisibleChanged |
Occurs when the Visible property of the window changes. More... | |
EventHandler< EventArgs > | FocusedChanged |
Occurs when the Focused property of the window changes. More... | |
EventHandler< EventArgs > | WindowBorderChanged |
Occurs when the WindowBorder property of the window changes. More... | |
EventHandler< EventArgs > | WindowStateChanged |
Occurs when the WindowState property of the window changes. More... | |
EventHandler < OpenTK.Input.KeyboardKeyEventArgs > | KeyDown |
Occurs whenever a keybord key is pressed. More... | |
EventHandler< KeyPressEventArgs > | KeyPress |
Occurs whenever a character is typed. More... | |
EventHandler < OpenTK.Input.KeyboardKeyEventArgs > | KeyUp |
Occurs whenever a keyboard key is released. More... | |
EventHandler< EventArgs > | MouseLeave |
Occurs whenever the mouse cursor leaves the window Bounds. More... | |
EventHandler< EventArgs > | MouseEnter |
Occurs whenever the mouse cursor enters the window Bounds. More... | |
Instances of this class implement the OpenTK.INativeWindow interface on the current platform.
OpenTK.NativeWindow.NativeWindow | ( | ) |
Constructs a new NativeWindow with default attributes without enabling events.
OpenTK.NativeWindow.NativeWindow | ( | int | width, |
int | height, | ||
string | title, | ||
GameWindowFlags | options, | ||
GraphicsMode | mode, | ||
DisplayDevice | device | ||
) |
Constructs a new centered NativeWindow with the specified attributes.
width | The width of the NativeWindow in pixels. |
height | The height of the NativeWindow in pixels. |
title | The title of the NativeWindow. |
options | GameWindow options specifying window appearance and behavior. |
mode | The OpenTK.Graphics.GraphicsMode of the NativeWindow. |
device | The OpenTK.Graphics.DisplayDevice to construct the NativeWindow in. |
System.ArgumentOutOfRangeException | If width or height is less than 1. |
System.ArgumentNullException | If mode or device is null. |
OpenTK.NativeWindow.NativeWindow | ( | int | x, |
int | y, | ||
int | width, | ||
int | height, | ||
string | title, | ||
GameWindowFlags | options, | ||
GraphicsMode | mode, | ||
DisplayDevice | device | ||
) |
Constructs a new NativeWindow with the specified attributes.
x | Horizontal screen space coordinate of the NativeWindow's origin. |
y | Vertical screen space coordinate of the NativeWindow's origin. |
width | The width of the NativeWindow in pixels. |
height | The height of the NativeWindow in pixels. |
title | The title of the NativeWindow. |
options | GameWindow options specifying window appearance and behavior. |
mode | The OpenTK.Graphics.GraphicsMode of the NativeWindow. |
device | The OpenTK.Graphics.DisplayDevice to construct the NativeWindow in. |
System.ArgumentOutOfRangeException | If width or height is less than 1. |
System.ArgumentNullException | If mode or device is null. |
void OpenTK.NativeWindow.Close | ( | ) |
Closes the NativeWindow.
Implements OpenTK.INativeWindow.
|
virtual |
Releases all non-managed resources belonging to this NativeWindow.
Reimplemented in OpenTK.GameWindow.
|
protected |
Ensures that this NativeWindow has not been disposed.
System.ObjectDisposedException | If this NativeWindow has been disposed. |
|
protectedvirtual |
Called when the NativeWindow has closed.
e | Not used. |
|
protectedvirtual |
Called when the NativeWindow is about to close.
e | The System.ComponentModel.CancelEventArgs for this event. Set e.Cancel to true in order to stop the NativeWindow from closing. |
|
protectedvirtual |
Called when the NativeWindow is disposed.
e | Not used. |
|
protectedvirtual |
Called when the OpenTK.INativeWindow.Focused property of the NativeWindow has changed.
e | Not used. |
|
protectedvirtual |
Called when the OpenTK.INativeWindow.Icon property of the NativeWindow has changed.
e | Not used. |
|
protectedvirtual |
Occurs whenever a keybord key is pressed.
|
protectedvirtual |
Called when a character is typed.
e | The OpenTK.KeyPressEventArgs for this event. |
|
protectedvirtual |
Called when a keybord key is released.
e | The OpenTK.Input.KeyboardKeyEventArgs for this event. |
|
protectedvirtual |
Called whenever the mouse cursor reenters the window Bounds.
e | Not used. |
|
protectedvirtual |
Called whenever the mouse cursor leaves the window Bounds.
e | Not used. |
|
protectedvirtual |
Called when the NativeWindow is moved.
e | Not used. |
|
protectedvirtual |
|
protectedvirtual |
Called when the OpenTK.INativeWindow.Title property of the NativeWindow has changed.
e | Not used. |
|
protectedvirtual |
Called when the OpenTK.INativeWindow.Visible property of the NativeWindow has changed.
e | Not used. |
|
protectedvirtual |
Called when the WindowBorder of this NativeWindow has changed.
e | Not used. |
|
protectedvirtual |
Called when the WindowState of this NativeWindow has changed.
e | Not used. |
Point OpenTK.NativeWindow.PointToClient | ( | Point | point | ) |
Transforms the specified point from screen to client coordinates.
point | A System.Drawing.Point to transform. |
Implements OpenTK.INativeWindow.
Point OpenTK.NativeWindow.PointToScreen | ( | Point | point | ) |
Transforms the specified point from client to screen coordinates.
point | A System.Drawing.Point to transform. |
Implements OpenTK.INativeWindow.
void OpenTK.NativeWindow.ProcessEvents | ( | ) |
Processes operating system events until the NativeWindow becomes idle.
Implements OpenTK.INativeWindow.
|
protected |
Processes operating system events until the NativeWindow becomes idle.
retainEvents | If true, the state of underlying system event propagation will be preserved, otherwise event propagation will be enabled if it has not been already. |
|
getset |
Gets or sets a System.Drawing.Rectangle structure that contains the external bounds of this window, in screen coordinates. External bounds include the title bar, borders and drawing area of the window.
|
getset |
Gets or sets a System.Drawing.Rectangle structure that contains the internal bounds of this window, in client coordinates. The internal bounds include the drawing area of the window, but exclude the titlebar and window borders.
|
getset |
Gets or sets a System.Drawing.Size structure that contains the internal size this window.
|
getset |
Gets or sets a value indicating whether the mouse cursor is visible.
|
get |
Gets a value indicating whether a render window exists.
|
get |
Gets a System.Boolean that indicates whether this NativeWindow has input focus.
|
getset |
Gets or sets the external height of this window.
|
getset |
Gets or sets the System.Drawing.Icon for this GameWindow.
|
get |
This property is deprecated.
|
getsetprotected |
Gets or sets a System.Boolean, which indicates whether this instance has been disposed.
|
getset |
Gets or sets a System.Drawing.Point structure that contains the location of this window on the desktop.
|
getset |
Gets or sets a System.Drawing.Size structure that contains the external size of this window.
|
getset |
Gets or sets the NativeWindow title.
|
getset |
Gets or sets a System.Boolean that indicates whether this NativeWindow is visible.
|
getset |
Gets or sets the external width of this window.
|
getset |
Gets or states the border of the NativeWindow.
|
get |
Gets the OpenTK.Platform.IWindowInfo of this window.
|
getset |
Gets or states the state of the NativeWindow.
|
getset |
Gets or sets the horizontal location of this window on the desktop.
|
getset |
Gets or sets the vertical location of this window on the desktop.
EventHandler<EventArgs> OpenTK.NativeWindow.Closed = delegate { } |
Occurs after the window has closed.
EventHandler<CancelEventArgs> OpenTK.NativeWindow.Closing = delegate { } |
Occurs when the window is about to close.
EventHandler<EventArgs> OpenTK.NativeWindow.Disposed = delegate { } |
Occurs when the window is disposed.
EventHandler<EventArgs> OpenTK.NativeWindow.FocusedChanged = delegate { } |
Occurs when the Focused property of the window changes.
EventHandler<EventArgs> OpenTK.NativeWindow.IconChanged = delegate { } |
Occurs when the Icon property of the window changes.
EventHandler<OpenTK.Input.KeyboardKeyEventArgs> OpenTK.NativeWindow.KeyDown = delegate { } |
Occurs whenever a keybord key is pressed.
EventHandler<KeyPressEventArgs> OpenTK.NativeWindow.KeyPress = delegate { } |
Occurs whenever a character is typed.
EventHandler<OpenTK.Input.KeyboardKeyEventArgs> OpenTK.NativeWindow.KeyUp = delegate { } |
Occurs whenever a keyboard key is released.
EventHandler<EventArgs> OpenTK.NativeWindow.MouseEnter = delegate { } |
Occurs whenever the mouse cursor enters the window Bounds.
EventHandler<EventArgs> OpenTK.NativeWindow.MouseLeave = delegate { } |
Occurs whenever the mouse cursor leaves the window Bounds.
EventHandler<EventArgs> OpenTK.NativeWindow.Move = delegate { } |
Occurs whenever the window is moved.
EventHandler<EventArgs> OpenTK.NativeWindow.Resize = delegate { } |
Occurs whenever the window is resized.
EventHandler<EventArgs> OpenTK.NativeWindow.TitleChanged = delegate { } |
Occurs when the Title property of the window changes.
EventHandler<EventArgs> OpenTK.NativeWindow.VisibleChanged = delegate { } |
Occurs when the Visible property of the window changes.
EventHandler<EventArgs> OpenTK.NativeWindow.WindowBorderChanged = delegate { } |
Occurs when the WindowBorder property of the window changes.
EventHandler<EventArgs> OpenTK.NativeWindow.WindowStateChanged = delegate { } |
Occurs when the WindowState property of the window changes.