26#ifndef TGUI_BACKEND_GUI_GLFW_HPP
27#define TGUI_BACKEND_GUI_GLFW_HPP
29#include <TGUI/Config.hpp>
30#if TGUI_BUILD_AS_CXX_MODULE
33 #include <TGUI/Backend/Window/BackendGui.hpp>
34 #include <TGUI/Optional.hpp>
39using GLFWwindow =
struct GLFWwindow;
43TGUI_IGNORE_DEPRECATED_WARNINGS_START
45TGUI_MODULE_EXPORT
namespace tgui
162 TGUI_NODISCARD Optional<Event> convertWindowFocusEvent(
int focused);
172 TGUI_NODISCARD Optional<Event> convertSizeEvent(
int width,
int height);
181 TGUI_NODISCARD Optional<Event> convertCharEvent(
unsigned int codepoint);
193 TGUI_NODISCARD Optional<Event> convertKeyEvent(
int key,
int scancode,
int action,
int mods);
203 TGUI_NODISCARD Optional<Event> convertScrollEvent(
double xoffset,
double yoffset);
213 TGUI_NODISCARD Optional<Event> convertCursorPosEvent(
double xpos,
double ypos);
224 TGUI_NODISCARD Optional<Event> convertMouseButtonEvent(
int button,
int action,
int mods);
261 void updateContainerSize()
override;
267 GLFWwindow* m_window =
nullptr;
273TGUI_IGNORE_DEPRECATED_WARNINGS_END
Definition BackendGuiGLFW.hpp:50
GLFWwindow * getWindow() const
Returns the window that was provided to the gui.
bool mouseButtonCallback(int button, int action, int mods)
Inform the gui about a mouse button event when a callback from glfwSetMouseButtonCallback occurs.
void setGuiWindow(GLFWwindow *window)
Sets the window on which the gui should be drawn.
bool scrollCallback(double xoffset, double yoffset)
Inform the gui about a scroll event when a callback from glfwSetScrollCallback occurs.
bool charCallback(unsigned int codepoint)
Inform the gui about a char event when a callback from glfwSetCharCallback occurs.
BackendGuiGLFW()
Default constructor.
void mainLoop(Color clearColor={240, 240, 240}) override
Give the gui control over the main loop.
void updateTextCursorPosition(FloatRect inputRect, Vector2f caretPos) override
This function is called by TGUI when the position of the caret changes in a text field (EditBox or Te...
bool keyCallback(int key, int scancode, int action, int mods)
Inform the gui about a key event when a callback from glfwSetKeyCallback occurs.
bool sizeCallback(int width, int height)
Inform the gui about a framebuffer size event when a callback from glfwSetFramebufferSizeCallback occ...
bool cursorPosCallback(double xpos, double ypos)
Inform the gui about a cursor position event when a callback from glfwSetCursorPosCallback occurs.
bool windowFocusCallback(int focused)
Inform the gui about a focus event when a callback from glfwSetWindowFocusCallback occurs.
~BackendGuiGLFW()
Destructor.
Base class for the Gui.
Definition BackendGui.hpp:48
Wrapper for colors.
Definition Color.hpp:72
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:39