25#ifndef TGUI_DEFAULT_BACKEND_WINDOW_HPP
26#define TGUI_DEFAULT_BACKEND_WINDOW_HPP
28#include <TGUI/Config.hpp>
29#if !TGUI_BUILD_AS_CXX_MODULE
30 #include <TGUI/String.hpp>
31 #include <TGUI/Color.hpp>
34#if !TGUI_EXPERIMENTAL_USE_STD_MODULE
40TGUI_MODULE_EXPORT
namespace tgui
42#if !TGUI_BUILD_AS_CXX_MODULE
77 TGUI_NODISCARD
static std::shared_ptr<DefaultBackendWindow>
create(
unsigned int width,
unsigned int height,
const String& title);
96 TGUI_NODISCARD
virtual bool isOpen()
const = 0;
Base class for the Gui.
Definition BackendGui.hpp:47
Wrapper for colors.
Definition Color.hpp:73
This class abstracts the backend-specific window and gui creation code.
Definition DefaultBackendWindow.hpp:54
virtual void setIcon(const String &filename)=0
Changes the icon of the window.
virtual bool isOpen() const =0
Returns whether the window is still open.
virtual ~DefaultBackendWindow()=default
Virtual destructor.
virtual void draw()=0
Draws the gui to the window.
DefaultBackendWindow()=default
Default constructor.
virtual void close()=0
Closes the window.
virtual void mainLoop(Color clearColor={240, 240, 240})=0
Pass control of the main loop to TGUI, if the backend supports it.
virtual BackendGui * getGui() const =0
Returns the gui object that is created and destroyed by this class.
virtual bool pollEvent(Event &event)=0
Retrieves an event from the window if there is one.
static std::shared_ptr< DefaultBackendWindow > create(unsigned int width, unsigned int height, const String &title)
Creates the backend window and the gui.
Wrapper class to store strings.
Definition String.hpp:96
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:38