|
static Window | create (const char *windowTitle, int width=-1, int height=-1, bool resizable=false) |
|
static void | pollEvents () |
|
|
static void | onMouseMoveEvent (GLFWwindow *window, double x, double y) |
|
static void | onMouseButtonEvent (GLFWwindow *callbackWindow, int button, int action, int mods) |
|
static void | onMouseScrollEvent (GLFWwindow *callbackWindow, double xoffset, double yoffset) |
| A callback function for handling mouse scrolling events. More...
|
|
static void | onResize (GLFWwindow *callbackWindow, int width, int height) |
|
static void | onKeyEvent (GLFWwindow *callbackWindow, int key, int scancode, int action, int mods) |
|
static void | onCharEvent (GLFWwindow *callbackWindow, unsigned int c) |
|
static void | onGamepadEvent (int gamepadIndex) |
| A callback function for gamepad input events. More...
|
|
◆ Window()
vkcv::Window::Window |
( |
GLFWwindow * |
window | ) |
|
|
explicitprotected |
◆ ~Window()
vkcv::Window::~Window |
( |
| ) |
|
|
virtual |
◆ create()
Window vkcv::Window::create |
( |
const char * |
windowTitle, |
|
|
int |
width = -1 , |
|
|
int |
height = -1 , |
|
|
bool |
resizable = false |
|
) |
| |
|
static |
creates a GLFWwindow with the parameters in the function
- Parameters
-
[in] | windowTitle | of the window |
[in] | width | of the window (optional) |
[in] | height | of the window (optional) |
[in] | resizable | resize ability of the window (optional) |
- Returns
- Window class
◆ getFramebufferSize()
void vkcv::Window::getFramebufferSize |
( |
int & |
width, |
|
|
int & |
height |
|
) |
| const |
gets the windows framebuffer size
- Parameters
-
◆ getHeight()
int vkcv::Window::getHeight |
( |
| ) |
const |
◆ getWidth()
int vkcv::Window::getWidth |
( |
| ) |
const |
◆ getWindow()
GLFWwindow * vkcv::Window::getWindow |
( |
| ) |
const |
◆ isWindowOpen()
bool vkcv::Window::isWindowOpen |
( |
| ) |
const |
checks if the window is still open, or the close event was called This function should be changed/removed later on
- Returns
- bool if the window is still open
◆ onCharEvent()
void vkcv::Window::onCharEvent |
( |
GLFWwindow * |
callbackWindow, |
|
|
unsigned int |
c |
|
) |
| |
|
staticprivate |
char callback for any typed character
- Parameters
-
[in] | window | The window that received the event |
[in] | c | The character that got typed |
Referenced by Window().
◆ onGamepadEvent()
void vkcv::Window::onGamepadEvent |
( |
int |
gamepadIndex | ) |
|
|
staticprivate |
A callback function for gamepad input events.
- Parameters
-
gamepadIndex | The gamepad index. |
◆ onKeyEvent()
void vkcv::Window::onKeyEvent |
( |
GLFWwindow * |
callbackWindow, |
|
|
int |
key, |
|
|
int |
scancode, |
|
|
int |
action, |
|
|
int |
mods |
|
) |
| |
|
staticprivate |
key callback for the pressed key
- Parameters
-
[in] | window | The window that received the event. |
[in] | key | The keyboard key that was pressed or released. |
[in] | scancode | The system-specific scancode of the key. |
[in] | action | GLFW_PRESS , GLFW_RELEASE or GLFW_REPEAT . |
[in] | mods | Bit field describing which modifier keys were held down. |
Referenced by Window().
◆ onMouseButtonEvent()
void vkcv::Window::onMouseButtonEvent |
( |
GLFWwindow * |
callbackWindow, |
|
|
int |
button, |
|
|
int |
action, |
|
|
int |
mods |
|
) |
| |
|
staticprivate |
mouseButton callback for mouse buttons
- Parameters
-
[in] | button | The mouse button that was pressed or released. |
[in] | action | One of GLFW_PRESS or GLFW_RELEASE . Future releases may add more actions. |
[in] | mods | Bit field describing which modifier keys were held down. |
References e_mouseButton.
Referenced by Window().
◆ onMouseMoveEvent()
void vkcv::Window::onMouseMoveEvent |
( |
GLFWwindow * |
window, |
|
|
double |
x, |
|
|
double |
y |
|
) |
| |
|
staticprivate |
mouse callback for moving the mouse on the screen
- Parameters
-
[in] | window | The window that received the event. |
[in] | xpos | The new cursor x-coordinate, relative to the left edge of the content area. |
[in] | ypos | The new cursor y-coordinate, relative to the top edge of the content area. |
Referenced by Window().
◆ onMouseScrollEvent()
void vkcv::Window::onMouseScrollEvent |
( |
GLFWwindow * |
callbackWindow, |
|
|
double |
xoffset, |
|
|
double |
yoffset |
|
) |
| |
|
staticprivate |
A callback function for handling mouse scrolling events.
- Parameters
-
[in] | callbackWindow | The window that received the event. |
[in] | xoffset | The extent of horizontal scrolling. |
[in] | yoffset | The extent of vertical scrolling. |
Referenced by Window().
◆ onResize()
void vkcv::Window::onResize |
( |
GLFWwindow * |
callbackWindow, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
|
staticprivate |
resize callback for the resize option of the window
- Parameters
-
[in] | window | The window that was resized. |
[in] | width | The new width, in screen coordinates, of the window. |
[in] | height | The new height, in screen coordinates, of the window. |
Referenced by Window().
◆ operator=() [1/2]
Copy-operator of Window is deleted!
- Parameters
-
- Returns
- Reference to itself
◆ operator=() [2/2]
Move-operator of Window uses default behavior!
- Parameters
-
- Returns
- Reference to itself
◆ pollEvents()
void vkcv::Window::pollEvents |
( |
| ) |
|
|
static |
polls all events on the GLFWwindow
◆ e_mouseButton
event< int, int, int> vkcv::Window::e_mouseButton |
The documentation for this class was generated from the following files: