|
3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
|
Represents an application window and provides access to input devices. More...
#include <Window.hpp>


Public Member Functions | |
| Window (string title, uint width, uint height) | |
| void | ProcessMessages () |
| void | SetMousePosition (Point p) |
| void | SetTitle (string title) |
| Window (const std::string &title, size_t width=800, size_t height=600) | |
| Constructs an Window with the specified title and size. | |
| Window (void *hInstance, void *parentWindow) | |
| Constructs an window from the specified window handles. | |
| Window (Window &)=delete | |
| Window (Window &&wnd) noexcept | |
| Move constructor. Transfers ownership of the window to this instance. | |
| Window & | operator= (Window &wnd)=delete |
| Window & | operator= (Window &&wnd) noexcept |
| Move assigment operator. Transfers ownership of the window to this instance. | |
| void * | NativeHandle () const noexcept |
| Returns the HWND of this window. | |
| void | ProcessMessages () |
| Processes all pending window messages. | |
| Input::Mouse & | GetMouseState () |
| Gets the last recorded mouse state of this window. | |
| Input::Keyboard & | GetKeyboardState () |
| Gets the last recorded keyboard state of this window. | |
| Math::Point | Size () const noexcept |
| Retrieves the size of this Window. | |
| Math::RectangleF | RectangleF () const noexcept |
| Returns the rectangle (PosX, PosY, Width, Height) of this Window. | |
| Math::Rectangle | Rectangle () const noexcept |
| Returns the rectangle (PosX, PosY, Width, Height) of this Window. | |
| bool | IsFocused () const noexcept |
| Is this window currently focused? | |
| void | SetMousePosition (const Math::Point &p) |
| Sets the mouse position in desktop space coordinates. The position is relative to the top-left corner of the primary monitor. | |
| void | SetTitle (const std::string &title) |
| Sets the window title. | |
| bool | IsMouseVisible () |
| Is the mouse visible? | |
| void | SetMouseVisibility (bool visible) |
| Sets the mouse visibility. | |
| ~Window () | |
| Public Member Functions inherited from Engine3DRadSpace.NatPtrWrapper | |
| virtual void | Dispose () |
Properties | |
| IntPtr | NativeHandle [get] |
| Mouse | MouseState [get] |
| Keyboard | KeyboardState [get] |
| Point | Size [get] |
| Rectangle | RectangleF [get] |
| RectangleF | Rectangle [get] |
| bool | IsFocused [get] |
| Properties inherited from Engine3DRadSpace.NatPtrWrapper | |
| IntPtr | Handle [get] |
Additional Inherited Members | |
| Protected Member Functions inherited from Engine3DRadSpace.NatPtrWrapper | |
| NatPtrWrapper (IntPtr handle, Action< IntPtr > fnDestroy) | |
| NatPtrWrapper (Action< IntPtr > fnDestroy) | |
| void | Reset (IntPtr newObj) |
| void | Dispose (bool disposing) |
| Protected Attributes inherited from Engine3DRadSpace.NatPtrWrapper | |
| IntPtr | _handle |
| bool | _disposed |
Represents an application window and provides access to input devices.
|
inline |
| Window::Window | ( | const std::string & | title, |
| size_t | width = 800, | ||
| size_t | height = 600 ) |
Constructs an Window with the specified title and size.
| title | Title of the window |
| width | Width of the window and backbuffer |
| height | Height of the window and backbuffer |
| Window::Window | ( | void * | hInstance, |
| void * | parentWindow ) |
Constructs an window from the specified window handles.
| hInstance | Windows: HINSTANCE, Linux: unused, TODO |
| parentWindow | Windows: HWND, Linux: GLFWwindow*, TODO |
Used for the Windows editor frontend.
|
delete |
|
noexcept |
Move constructor. Transfers ownership of the window to this instance.
| wnd | The window to move. |
| Window::~Window | ( | ) |
| Input::Keyboard & Window::GetKeyboardState | ( | ) |
Gets the last recorded keyboard state of this window.
| Input::Mouse & Window::GetMouseState | ( | ) |
Gets the last recorded mouse state of this window.
|
noexcept |
Is this window currently focused?
| bool Window::IsMouseVisible | ( | ) |
Is the mouse visible?
|
noexcept |
Returns the HWND of this window.
Move assigment operator. Transfers ownership of the window to this instance.
| wnd | The window to move. |
|
inline |
Processes all pending window messages.
|
noexcept |
Returns the rectangle (PosX, PosY, Width, Height) of this Window.
|
noexcept |
Returns the rectangle (PosX, PosY, Width, Height) of this Window.
|
inline |
| void Engine3DRadSpace.Native.Window.SetMousePosition | ( | const Math::Point & | p | ) |
Sets the mouse position in desktop space coordinates. The position is relative to the top-left corner of the primary monitor.
| p | The position to set the mouse to. |
| void Window::SetMouseVisibility | ( | bool | visible | ) |
Sets the mouse visibility.
| visible | Whether the mouse should be visible |
|
inline |
| void Window::SetTitle | ( | const std::string & | title | ) |
Sets the window title.
| title | Title string. |
|
noexcept |
Retrieves the size of this Window.
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |