26#ifndef TGUI_BACKEND_GUI_SFML_HPP
27#define TGUI_BACKEND_GUI_SFML_HPP
30#include <TGUI/GuiBase.hpp>
32#if TGUI_HAS_BACKEND_SFML
33 #include <SFML/Window/Event.hpp>
40 class BackendRenderTargetSFML;
100 using GuiBase::handleEvent;
153 void init()
override;
159 void updateContainerSize()
override;
165 std::shared_ptr<BackendRenderTargetSFML> m_renderTarget =
nullptr;
Base class for the Gui.
Definition GuiBase.hpp:45
Gui class for the SFML backend.
Definition GuiSFML.hpp:46
sf::RenderTarget * getTarget() const
Returns the render target on which the gui is being drawn.
void mainLoop() override
Give the gui control over the main loop.
GuiSFML(sf::RenderTarget &target)
Constructs the gui and set the target on which the gui should be drawn.
void draw() override
Draws all the widgets that were added to the gui.
bool convertEvent(const sf::Event &eventSFML, Event &eventTGUI)
Helper function that converts an SFML event to a TGUI event.
GuiSFML()
Default constructor.
bool handleEvent(sf::Event event)
Passes the event to the widgets.
void setTarget(sf::RenderTarget &target)
Sets the target on which the gui should be drawn.
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:36