Class for window.
More...
#include <Window.hpp>
|
GamePadEvent | _gamePadState {{0.0f, 0.0f}, {0.0f, 0.0f}} |
|
TouchScreenEvent | _touchScreenState {{{0, 0}, {0, 0}}, lug::Window::TouchScreenEvent::GestureState::None, false, false, false} |
|
Class for window.
Definition at line 59 of file Window.hpp.
◆ Window() [1/3]
lug::Window::Window::Window |
( |
const Window & |
| ) |
|
|
delete |
◆ Window() [2/3]
lug::Window::Window::Window |
( |
Window && |
| ) |
|
|
delete |
◆ ~Window()
lug::Window::Window::~Window |
( |
| ) |
|
|
virtual |
◆ Window() [3/3]
lug::Window::Window::Window |
( |
| ) |
|
|
protected |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ create()
std::unique_ptr< Window > lug::Window::Window::create |
( |
const InitInfo & |
initInfo | ) |
|
|
static |
Utility to create a window.
- Parameters
-
[in] | initInfo | See #InitInfo |
- Returns
- A pointer to the created window handle. The ownership is transfered to the caller.
Definition at line 26 of file Window.cpp.
◆ isOpen()
bool lug::Window::Window::isOpen |
( |
| ) |
const |
Determines if the window is open.
- Returns
- True if open, False otherwise.
Definition at line 193 of file Window.cpp.
◆ pollEvent()
Checks if an event is available from the window implementation, and fill it in the event
parameter.
- Parameters
-
- Returns
- True if an event was polled, false otherwise.
Reimplemented in lug::Graphics::Vulkan::Render::Window.
Definition at line 197 of file Window.cpp.
◆ close()
void lug::Window::Window::close |
( |
| ) |
|
Close the window gracefully.
Definition at line 255 of file Window.cpp.
◆ setKeyRepeat()
void lug::Window::Window::setKeyRepeat |
( |
bool |
state | ) |
|
Enables or disables key repeat.
The key repeat is set to false by default (i.e. the default, unpressed, behavior)
- Parameters
-
Definition at line 243 of file Window.cpp.
◆ isKeyPressed()
bool lug::Window::Window::isKeyPressed |
( |
Keyboard::Key |
key | ) |
const |
Determines if a key pressed.
- Parameters
-
- Returns
- True if the key is pressed, False otherwise.
Definition at line 263 of file Window.cpp.
◆ isMousePressed()
bool lug::Window::Window::isMousePressed |
( |
Mouse::Button |
button | ) |
const |
Determines if a mouse button pressed.
- Parameters
-
[in] | button | The button to check. |
- Returns
- True if the button is pressed, False otherwise.
Definition at line 267 of file Window.cpp.
◆ getMousePos()
const Math::Vec2i & lug::Window::Window::getMousePos |
( |
| ) |
const |
Retrieves the mouses position.
- Returns
- Position of the cursor (relative to the window).
Definition at line 271 of file Window.cpp.
◆ setMousePos()
void lug::Window::Window::setMousePos |
( |
const Math::Vec2i & |
mousePosition | ) |
|
Sets the mouse position.
- Parameters
-
[in] | mousePosition | The position of the cursor (relative to the window) |
Definition at line 275 of file Window.cpp.
◆ getWindowSize()
Math::Vec2i lug::Window::Window::getWindowSize |
( |
| ) |
const |
Gets the window size.
- Returns
- The window size.
Definition at line 282 of file Window.cpp.
◆ setMouseCursorVisible()
void lug::Window::Window::setMouseCursorVisible |
( |
bool |
visible | ) |
|
Sets the visibility of the mouse cursor (hide/show)
- Parameters
-
Definition at line 249 of file Window.cpp.
◆ init()
bool lug::Window::Window::init |
( |
const InitInfo & |
initInfo | ) |
|
|
protected |
◆ initKeyState()
void lug::Window::Window::initKeyState |
( |
| ) |
|
|
protected |
Inits every key in _keyState
to false.
Definition at line 49 of file Window.cpp.
◆ initMouseState()
void lug::Window::Window::initMouseState |
( |
| ) |
|
|
protected |
Inits every button in _mouseState
to false.
Definition at line 185 of file Window.cpp.
◆ _gamePadState
GamePadEvent lug::Window::Window::_gamePadState {{0.0f, 0.0f}, {0.0f, 0.0f}} |
◆ _touchScreenState
◆ _impl
Internal representation of the platform specific implementation.
Definition at line 180 of file Window.hpp.
◆ _mode
VideoMode lug::Window::Window::_mode {800, 600, 8, 8, 8, 60} |
|
protected |
◆ _keyState
std::unordered_map<Keyboard::Key, bool> lug::Window::Window::_keyState |
|
protected |
◆ _mouseState
std::unordered_map<Mouse::Button, bool> lug::Window::Window::_mouseState |
|
protected |
◆ _mousePosition
Math::Vec2i lug::Window::Window::_mousePosition {0, 0} |
|
protected |
The documentation for this class was generated from the following files: