SimpleGL
1.1.0
A framework for platform independent rendering
|
This class wraps a GLFW mouse button callback. More...
#include <glfw_callback.hpp>
Public Member Functions | |
MouseButtonCallback (void) | |
Creates a mouse button callback. More... | |
~MouseButtonCallback (void) | |
Creates a mouse button callback. More... | |
virtual void | invoke (GLFWwindow *window, MouseButton button, Action action, Modifier mods) |
This function gets called whenever a mouse button is pressed or released. More... | |
Static Public Member Functions | |
static MouseButtonCallback * | getCurrent () |
Returns the current mouse button callback. More... | |
static void | setCurrent (MouseButtonCallback *callback) |
Sets the current mouse button callback. More... | |
static void | dispatch (GLFWwindow *window, int button, int action, int mods) |
Dispatches the member function. More... | |
Static Protected Attributes | |
static MouseButtonCallback * | current = nullptr |
Stores the current instance of the mouse button callback. More... | |
This class wraps a GLFW mouse button callback.
Definition at line 130 of file glfw_callback.hpp.
sgl::MouseButtonCallback::MouseButtonCallback | ( | void | ) |
Creates a mouse button callback.
Definition at line 109 of file glfw_callback.cpp.
sgl::MouseButtonCallback::~MouseButtonCallback | ( | void | ) |
Creates a mouse button callback.
Definition at line 113 of file glfw_callback.cpp.
|
static |
Dispatches the member function.
window | The window which received the event. |
button | The button of the event. |
action | The action of the event. |
mods | A bit field that describes which modifier keys were active. |
Definition at line 102 of file glfw_callback.cpp.
|
static |
Returns the current mouse button callback.
Definition at line 91 of file glfw_callback.cpp.
|
virtual |
This function gets called whenever a mouse button is pressed or released.
Default implementation of the mouse button callback.
window | The window which received the event. |
button | The button of the event. |
action | The action of the event. |
mods | A bit field that describes which modifier keys were active. |
Definition at line 121 of file glfw_callback.cpp.
|
static |
Sets the current mouse button callback.
callback | The mouse button callback to set. |
Definition at line 95 of file glfw_callback.cpp.
|
staticprotected |
Stores the current instance of the mouse button callback.
Definition at line 134 of file glfw_callback.hpp.