This class defines a Window.
More...
#include <Window.hpp>
This class defines a Window.
LUMS_EXPORTED lm::Window::Window |
( |
int |
w, |
|
|
int |
h, |
|
|
const char * |
name = "" , |
|
|
bool |
fullscreen = false |
|
) |
| |
Create a new window.
- Parameters
-
w | The width of the window. |
h | The height of the window. |
name | The name of the window. |
fullscreen | True to create the window in fullscreen mode |
LUMS_EXPORTED lm::Window::~Window |
( |
| ) |
|
LUMS_EXPORTED Vector2i lm::Window::maxSize |
( |
| ) |
const |
Get the maximal window size. This is usualy used to determine a resolution.
- Returns
- The maximum window size
void lm::Window::pollEvent |
( |
Event & |
event | ) |
|
|
inline |
Poll an event from the event stack. If the event stack is empty, the event type will be set to Event::Type::None
- Parameters
-
event | A reference to an event, which will be filled with data. |
LUMS_EXPORTED void lm::Window::pumpEvent |
( |
| ) |
|
Pump event from the underlying implementation to the event stack.
void lm::Window::pushEvent |
( |
Event & |
event | ) |
|
|
inline |
Push an event on the internal event stack.
- Parameters
-
event | The event to be pushed. |
LUMS_EXPORTED void lm::Window::resize |
( |
int |
w, |
|
|
int |
h, |
|
|
bool |
fullscreen = false |
|
) |
| |
Resize the window
- Parameters
-
w | The width |
h | The height |
fullscreen | Whether to be in fullscreen mode or not |
LUMS_EXPORTED void lm::Window::swap |
( |
| ) |
|
Swap the current buffer with the backbuffer.
LUMS_EXPORTED bool lm::Window::visible |
( |
| ) |
const |
Check if the window is visible. This may be unreliable under some operating systems, like Windows.
- Returns
- True if the window is visible, false otherwise
void lm::Window::waitEvent |
( |
Event & |
event | ) |
|
|
inline |
Wait for an event from the event stack. If the event stack is empty, this method will block and wait.
- Parameters
-
event | A reference to an event, which will be filled with data. |
The documentation for this class was generated from the following file: