26#ifndef TGUI_DEFAULT_BACKEND_WINDOW_HPP
27#define TGUI_DEFAULT_BACKEND_WINDOW_HPP
29#include <TGUI/String.hpp>
30#include <TGUI/Color.hpp>
71 static std::shared_ptr<DefaultBackendWindow>
create(
unsigned int width,
unsigned int height,
const String& title);
Base class for the Gui.
Definition: BackendGui.hpp:45
Wrapper for colors.
Definition: Color.hpp:63
This class abstracts the backend-specific window and gui creation code.
Definition: DefaultBackendWindow.hpp:47
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:79
Namespace that contains all TGUI functions and classes.
Definition: AbsoluteOrRelativeValue.hpp:36