26#ifndef TGUI_BACKEND_SFML_HPP
27#define TGUI_BACKEND_SFML_HPP
29#include <TGUI/Backend.hpp>
30#include <SFML/Window/Cursor.hpp>
45 class BackendRenderTargetSFML;
55#ifndef TGUI_REMOVE_DEPRECATED_CODE
62 TGUI_DEPRECATED(
"Use GuiSFML::convertEvent instead") static
bool convertEvent(const sf::
Event& eventSFML,
Event& eventTGUI);
173#ifdef TGUI_SYSTEM_ANDROID
182 std::unique_ptr<std::uint8_t[]> readFileFromAndroidAssets(
const String& filename, std::size_t& fileSize)
const override;
202 std::unique_ptr<sf::Cursor> createSystemCursor(
Cursor::Type type);
208 void updateMouseCursor(
Cursor::Type type, std::unique_ptr<sf::Cursor> cursor);
214 void updateMouseCursor(sf::Window* window,
Cursor::Type type);
222 sf::Window* window =
nullptr;
226 std::map<GuiBase*, GuiResources> m_guis;
227 std::map<Cursor::Type, std::unique_ptr<sf::Cursor>> m_mouseCursors;
Base class for the backend.
Definition Backend.hpp:83
Backend that uses SFML.
Definition BackendSFML.hpp:52
void setClipboard(const String &contents) override
Changes the contents of the clipboard.
std::shared_ptr< BackendTextBase > createText() override
Creates a new text object.
std::shared_ptr< BackendFontBase > createFont() override
Creates a new font object.
bool isKeyboardModifierPressed(Event::KeyModifier modifierKey) override
Checks the state for one of the modifier keys.
void setMouseCursorStyle(Cursor::Type type, const std::uint8_t *pixels, Vector2u size, Vector2u hotspot) override
Changes the look of a certain mouse cursor by using a bitmap.
void attachGui(GuiBase *gui) override
Informs the backend that a new gui object has been created.
std::shared_ptr< BackendRenderTargetSFML > createGuiRenderTarget(GuiSFML *gui, sf::RenderTarget &target)
Sets the SFML target to which the gui will render and returns a new render target object to interact ...
void resetMouseCursorStyle(Cursor::Type type) override
Changes the look of a certain mouse cursor back to the system theme.
String getClipboard() const override
Returns the contents of the clipboard.
void openVirtualKeyboard(const FloatRect &inputRect) override
Opens the virtual keyboard on Android and iOS.
std::shared_ptr< BackendTextureBase > createTexture() override
Creates a new texture object.
Font createDefaultFont() override
Creates and returns the default font for all widgets.
void closeVirtualKeyboard() override
Closes the virtual keyboard on Android and iOS.
void setMouseCursor(GuiBase *gui, Cursor::Type type) override
Changes the mouse cursor when the mouse is on top of the window to which the gui is attached.
void detatchGui(GuiBase *gui) override
Informs the backend that a gui object is being destroyed.
Type
List of available cursors.
Definition Cursor.hpp:48
Base class for the Gui.
Definition GuiBase.hpp:45
Gui class for the SFML backend.
Definition GuiSFML.hpp:46
Wrapper class to store strings.
Definition String.hpp:79
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:36
KeyModifier
Modifiers keys.
Definition Event.hpp:156