|
CeresEngine 0.2.0
A game development framework
|
#include <CeresEngine/Platform/PlatformWindow.hpp>
Public Member Functions | |
| PlatformWindow (const PlatformWindowProperties &properties) | |
| virtual | ~PlatformWindow ()=default |
| virtual void | activate ()=0 |
| Activates the window. | |
| virtual void | deactivate ()=0 |
| Deactivates the window. | |
| virtual String | getTitle () const =0 |
| Gets the window title. | |
| virtual void | setTitle (const String &title)=0 |
| Sets the window title. | |
| virtual Vector2 | getSize () const =0 |
| Gets the window size. | |
| virtual void | resize (double width, double height)=0 |
| Resizes the window. | |
| void | resize (const Vector2 size) |
| Resizes the window. | |
| virtual void | close ()=0 |
| Closes the window. | |
| virtual bool | isFullscreen () const =0 |
| Gets the window full screen state. | |
| virtual void | setFullscreen (bool fullscreen)=0 |
| Sets the window to full screen. | |
| virtual double | getScalingFactor () const =0 |
| Gets the DPI scaling factor for this window. | |
| void | sendEvent (const AnyInputEvent &event) |
| Sends a new event through the window. | |
Public Attributes | |
| const PlatformWindowProperties & | properties |
| Generates a hash for the provided type. | |
| Event< void(PlatformWindow &, Vector2)> | didResize |
| A signal that gets dispatched whenever the window gets resized. | |
| Event< void(PlatformWindow &)> | didClose |
| A signal that gets dispatched whenever the window gets closed. | |
| Event< void(const AnyInputEvent &)> | onEvent |
| An event fired when any input event is received on the window. | |
| Event< void(const KeyEvent &)> | onKeyDown |
| An event fired when a key down event is received. | |
| Event< void(const KeyEvent &)> | onKeyUp |
| An event fired when a key up event is received. | |
| Event< void(const MouseEvent &)> | onMouseDown |
| An event fired when a mouse down event is received. | |
| Event< void(const MouseEvent &)> | onMouseUp |
| An event fired when a mouse up event is received. | |
| Event< void(const MouseEvent &)> | onMouseMove |
| An event fired when a mouse move event is received. | |
| Event< void(const MouseEvent &)> | onMouseDrag |
| An event fired when a mouse drag eent is received. | |
| Event< void(const MouseEvent &)> | onMouseScroll |
| An event fired when a mouse scroll event is received. | |
| Event< void(const TextEvent &)> | onTextInput |
| An event fired when a text input event is received. | |
| Event< void(const Rect2 &newRect, const Rect2 &oldRect)> | didChangeFrame |
| Event< bool()> | windowShouldClose |
|
inlineexplicit |
|
virtualdefault |
Activates the window.
Implemented in CeresEngine::GLFWWindow, CeresEngine::iOSWindow, CeresEngine::LinuxWindow, CeresEngine::MacOSWindow, and CeresEngine::Win32Window.
Closes the window.
Implemented in CeresEngine::GLFWWindow, CeresEngine::iOSWindow, CeresEngine::LinuxWindow, CeresEngine::MacOSWindow, and CeresEngine::Win32Window.
Deactivates the window.
Implemented in CeresEngine::GLFWWindow, CeresEngine::iOSWindow, CeresEngine::LinuxWindow, CeresEngine::MacOSWindow, and CeresEngine::Win32Window.
Gets the DPI scaling factor for this window.
Implemented in CeresEngine::GLFWWindow, CeresEngine::iOSWindow, CeresEngine::MacOSWindow, and CeresEngine::Win32Window.
Gets the window size.
Implemented in CeresEngine::GLFWWindow, CeresEngine::iOSWindow, CeresEngine::LinuxWindow, CeresEngine::MacOSWindow, and CeresEngine::Win32Window.
Gets the window title.
Implemented in CeresEngine::GLFWWindow, CeresEngine::iOSWindow, CeresEngine::LinuxWindow, CeresEngine::MacOSWindow, and CeresEngine::Win32Window.
Gets the window full screen state.
Implemented in CeresEngine::GLFWWindow, CeresEngine::iOSWindow, CeresEngine::LinuxWindow, CeresEngine::MacOSWindow, and CeresEngine::Win32Window.
Resizes the window.
| size | The window size |
Resizes the window.
| width | The window's width |
| height | The window's height |
Implemented in CeresEngine::GLFWWindow, CeresEngine::iOSWindow, CeresEngine::LinuxWindow, CeresEngine::MacOSWindow, and CeresEngine::Win32Window.
| void CeresEngine::PlatformWindow::sendEvent | ( | const AnyInputEvent & | event | ) |
Sends a new event through the window.
| event | The event to be send through the window. |
Sets the window to full screen.
| fullscreen | True to make the window fullscreen, false otherwise |
Implemented in CeresEngine::GLFWWindow, CeresEngine::iOSWindow, CeresEngine::LinuxWindow, CeresEngine::MacOSWindow, and CeresEngine::Win32Window.
Sets the window title.
| title | The window title |
Implemented in CeresEngine::GLFWWindow, CeresEngine::iOSWindow, CeresEngine::LinuxWindow, CeresEngine::MacOSWindow, and CeresEngine::Win32Window.
| Event<void(PlatformWindow&)> CeresEngine::PlatformWindow::didClose |
A signal that gets dispatched whenever the window gets closed.
| Event<void(PlatformWindow&, Vector2)> CeresEngine::PlatformWindow::didResize |
A signal that gets dispatched whenever the window gets resized.
| Event<void(const AnyInputEvent&)> CeresEngine::PlatformWindow::onEvent |
An event fired when any input event is received on the window.
An event fired when a key down event is received.
An event fired when a key up event is received.
| Event<void(const MouseEvent&)> CeresEngine::PlatformWindow::onMouseDown |
An event fired when a mouse down event is received.
| Event<void(const MouseEvent&)> CeresEngine::PlatformWindow::onMouseDrag |
An event fired when a mouse drag eent is received.
| Event<void(const MouseEvent&)> CeresEngine::PlatformWindow::onMouseMove |
An event fired when a mouse move event is received.
| Event<void(const MouseEvent&)> CeresEngine::PlatformWindow::onMouseScroll |
An event fired when a mouse scroll event is received.
| Event<void(const MouseEvent&)> CeresEngine::PlatformWindow::onMouseUp |
An event fired when a mouse up event is received.
An event fired when a text input event is received.
| const PlatformWindowProperties& CeresEngine::PlatformWindow::properties |
Generates a hash for the provided type.
Type must have a std::hash specialization.
| T | the type to be hashed |
| v | The value to be hashed |