26#ifndef TGUI_BACKEND_GUI_GLFW_HPP
27#define TGUI_BACKEND_GUI_GLFW_HPP
29#include <TGUI/Backend/Window/BackendGui.hpp>
30#include <TGUI/Optional.hpp>
34typedef struct GLFWwindow GLFWwindow;
83 void keyCallback(
int key,
int scancode,
int action,
int mods);
142 Optional<Event> convertWindowFocusEvent(
int focused);
152 Optional<Event> convertSizeEvent(
int width,
int height);
161 Optional<Event> convertCharEvent(
unsigned int codepoint);
173 Optional<Event> convertKeyEvent(
int key,
int scancode,
int action,
int mods);
183 Optional<Event> convertScrollEvent(
double xoffset,
double yoffset);
193 Optional<Event> convertCursorPosEvent(
double xpos,
double ypos);
204 Optional<Event> convertMouseButtonEvent(
int button,
int action,
int mods);
221 void updateContainerSize()
override;
227 GLFWwindow* m_window =
nullptr;
Definition: BackendGuiGLFW.hpp:43
void keyCallback(int key, int scancode, int action, int mods)
Inform the gui about a key event when a callback from glfwSetKeyCallback occurs.
void setGuiWindow(GLFWwindow *window)
Sets the window on which the gui should be drawn.
void windowFocusCallback(int focused)
Inform the gui about a focus event when a callback from glfwSetWindowFocusCallback occurs.
BackendGuiGLFW()=default
Default constructor.
void charCallback(unsigned int codepoint)
Inform the gui about a char event when a callback from glfwSetCharCallback occurs.
void sizeCallback(int width, int height)
Inform the gui about a framebuffer size event when a callback from glfwSetFramebufferSizeCallback occ...
void mainLoop(Color clearColor={240, 240, 240}) override
Give the gui control over the main loop.
void mouseButtonCallback(int button, int action, int mods)
Inform the gui about a mouse button event when a callback from glfwSetMouseButtonCallback occurs.
void cursorPosCallback(double xpos, double ypos)
Inform the gui about a cursor position event when a callback from glfwSetCursorPosCallback occurs.
void scrollCallback(double xoffset, double yoffset)
Inform the gui about a scroll event when a callback from glfwSetScrollCallback occurs.
Base class for the Gui.
Definition: BackendGui.hpp:45
Wrapper for colors.
Definition: Color.hpp:63
Namespace that contains all TGUI functions and classes.
Definition: AbsoluteOrRelativeValue.hpp:36