25#ifndef TGUI_BACKEND_GUI_SFML_HPP
26#define TGUI_BACKEND_GUI_SFML_HPP
28#include <TGUI/Config.hpp>
29#if !TGUI_BUILD_AS_CXX_MODULE
30 #include <TGUI/Backend/Window/BackendGui.hpp>
33#include <SFML/Window.hpp>
37TGUI_MODULE_EXPORT
namespace tgui
83 using BackendGui::handleEvent;
196 void updateContainerSize()
override;
201 sf::Window* m_window =
nullptr;
203 bool m_modifierKeySystemPressed =
false;
204 bool m_modifierKeyControlPressed =
false;
205 bool m_modifierKeyShiftPressed =
false;
206 bool m_modifierKeyAltPressed =
false;
Definition BackendGuiSFML.hpp:42
~BackendGuiSFML()
Destructor.
bool convertEvent(const sf::Event &eventSFML, Event &eventTGUI)
Helper function that converts an SFML event to a TGUI event.
void setGuiWindow(sf::Window &window)
Sets the window which the gui should use.
sf::Window * getWindow() const
Returns the window that was provided to the gui.
bool handleEvent(sf::Event event)
Passes the event to the widgets.
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...
BackendGuiSFML()
Default constructor.
void mainLoop(Color clearColor={240, 240, 240}) override
Give the gui control over the main loop.
void startTextInput(FloatRect inputRect) override
This function is called by TGUI when focusing a text field (EditBox or TextArea). It will result in t...
void stopTextInput() override
This function is called by TGUI when unfocusing a text field (EditBox or TextArea)....
bool isKeyboardModifierPressed(Event::KeyModifier modifierKey) const override
Checks the state for one of the modifier keys.
Base class for the Gui.
Definition BackendGui.hpp:47
Wrapper for colors.
Definition Color.hpp:73
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:38
KeyModifier
Modifiers keys.
Definition Event.hpp:157