26#ifndef TGUI_BACKEND_GUI_SDL_HPP
27#define TGUI_BACKEND_GUI_SDL_HPP
29#include <TGUI/extlibs/IncludeSDL.hpp>
30#if SDL_MAJOR_VERSION < 3
31 #include <SDL_touch.h>
34#include <TGUI/Config.hpp>
35#if TGUI_BUILD_AS_CXX_MODULE
38 #include <TGUI/Backend/Window/BackendGui.hpp>
43TGUI_MODULE_EXPORT
namespace tgui
76 using BackendGui::handleEvent;
142 void updateContainerSize()
override;
153#if ((SDL_MAJOR_VERSION == 2) && (SDL_MINOR_VERSION < 26))
157 virtual void updateFramebufferSize() = 0;
163 SDL_Window* m_window =
nullptr;
164 float m_dpiScale = 1;
166 bool m_touchFirstFingerDown =
false;
167 SDL_FingerID m_touchFirstFingerId = 0;
168 SDL_TouchID m_touchFirstFingerTouchId = 0;
Definition BackendGuiSDL.hpp:48
TGUI_NODISCARD bool convertEvent(const SDL_Event &eventSDL, Event &eventTGUI)
Helper function that converts an SDL event to a TGUI event.
void mainLoop(Color clearColor={240, 240, 240}) override
Give the gui control over the main loop.
BackendGuiSDL()=default
Default constructor.
SDL_Window * getWindow() const
Returns the window that was provided to the gui.
void setGuiWindow(SDL_Window *window)
Sets the window on which the gui should be drawn.
bool handleEvent(const SDL_Event &event)
Passes the event to the widgets.
virtual void presentScreen()=0
Shows the drawn content with SDL_GL_SwapWindow or SDL_RenderPresent, depending on the renderer.
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