3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
Loading...
Searching...
No Matches
Engine3DRadSpace.Native.Window Class Reference

Represents an application window and provides access to input devices. More...

#include <Window.hpp>

Inheritance diagram for Engine3DRadSpace.Native.Window:
Collaboration diagram for Engine3DRadSpace.Native.Window:

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

Detailed Description

Represents an application window and provides access to input devices.

Constructor & Destructor Documentation

◆ Window() [1/5]

Engine3DRadSpace.Native.Window.Window ( string title,
uint width,
uint height )
inline

◆ Window() [2/5]

Window::Window ( const std::string & title,
size_t width = 800,
size_t height = 600 )

Constructs an Window with the specified title and size.

Parameters
titleTitle of the window
widthWidth of the window and backbuffer
heightHeight of the window and backbuffer

◆ Window() [3/5]

Window::Window ( void * hInstance,
void * parentWindow )

Constructs an window from the specified window handles.

Parameters
hInstanceWindows: HINSTANCE, Linux: unused, TODO
parentWindowWindows: HWND, Linux: GLFWwindow*, TODO

Used for the Windows editor frontend.

◆ Window() [4/5]

◆ Window() [5/5]

Window::Window ( Window && wnd)
noexcept

Move constructor. Transfers ownership of the window to this instance.

Parameters
wndThe window to move.

◆ ~Window()

Window::~Window ( )

Member Function Documentation

◆ GetKeyboardState()

Input::Keyboard & Window::GetKeyboardState ( )

Gets the last recorded keyboard state of this window.

Returns
The last recorded keyboard state.

◆ GetMouseState()

Input::Mouse & Window::GetMouseState ( )

Gets the last recorded mouse state of this window.

Returns
The last recorded mouse state.

◆ IsFocused()

bool Window::IsFocused ( ) const
noexcept

Is this window currently focused?

Returns
Whether the window is currently focused

◆ IsMouseVisible()

bool Window::IsMouseVisible ( )

Is the mouse visible?

Returns
True if the mouse is visible

◆ NativeHandle()

void * Window::NativeHandle ( ) const
noexcept

Returns the HWND of this window.

Returns
The native handle of the window.

◆ operator=() [1/2]

Window & Window::operator= ( Window && wnd)
noexcept

Move assigment operator. Transfers ownership of the window to this instance.

Parameters
wndThe window to move.
Returns
The window instance with transferred ownership.

◆ operator=() [2/2]

Window & Engine3DRadSpace.Native.Window.operator= ( Window & wnd)
delete

◆ ProcessMessages() [1/2]

void Window.ProcessMessages ( )
inline

◆ ProcessMessages() [2/2]

Processes all pending window messages.

◆ Rectangle()

Math::Rectangle Window::Rectangle ( ) const
noexcept

Returns the rectangle (PosX, PosY, Width, Height) of this Window.

Returns
The rectangle of the window.

◆ RectangleF()

RectangleF Window::RectangleF ( ) const
noexcept

Returns the rectangle (PosX, PosY, Width, Height) of this Window.

Returns
The rectangle of the window.

◆ SetMousePosition() [1/2]

void Engine3DRadSpace.Native.Window.SetMousePosition ( Point p)
inline

◆ SetMousePosition() [2/2]

Sets the mouse position in desktop space coordinates. The position is relative to the top-left corner of the primary monitor.

Parameters
pThe position to set the mouse to.

◆ SetMouseVisibility()

void Window::SetMouseVisibility ( bool visible)

Sets the mouse visibility.

Parameters
visibleWhether the mouse should be visible

◆ SetTitle() [1/2]

void Engine3DRadSpace.Native.Window.SetTitle ( string title)
inline

◆ SetTitle() [2/2]

void Window::SetTitle ( const std::string & title)

Sets the window title.

Parameters
titleTitle string.

◆ Size()

Point Window::Size ( ) const
noexcept

Retrieves the size of this Window.

Returns
The size of the window.

Property Documentation

◆ IsFocused

bool Engine3DRadSpace.Native.Window.IsFocused
get

◆ KeyboardState

Keyboard Engine3DRadSpace.Native.Window.KeyboardState
get

◆ MouseState

Mouse Engine3DRadSpace.Native.Window.MouseState
get

◆ NativeHandle

IntPtr Engine3DRadSpace.Native.Window.NativeHandle
get

◆ Rectangle

RectangleF Engine3DRadSpace.Native.Window.Rectangle
get

◆ RectangleF

Rectangle Engine3DRadSpace.Native.Window.RectangleF
get

◆ Size

Point Engine3DRadSpace.Native.Window.Size
get

The documentation for this class was generated from the following files:
  • E:/3DRadSpace/3DRadSpace_CSharp/Native/Window.cs
  • E:/3DRadSpace/Engine3DRadSpace/Native/Window.hpp
  • E:/3DRadSpace/Engine3DRadSpace/Native/Window.cpp