4#include <SFML/Graphics.hpp>
33 [[nodiscard]]
bool isOpen()
const;
46 [[nodiscard]]
bool pollEvent(sf::Event& event);
53 void draw(
const sf::Drawable& drawable);
98 void setView(
const sf::View& view);
106 [[nodiscard]]
unsigned int getWidth()
const;
114 [[nodiscard]]
unsigned int getHeight()
const;
119 sf::RenderWindow window;
static Window & getInstance()
Returns an instance of the Window class.
Definition Window.cpp:10
void close()
Close the window and destroy all the attached resources.
Definition Window.cpp:38
void clear()
Clear the window.
Definition Window.cpp:30
Window(Window &other)=delete
bool isOpen() const
Tell whether the window is open.
Definition Window.cpp:18
bool pollEvent(sf::Event &event)
Pop the event on top of the event queue, if any, and return it.
Definition Window.cpp:22
void operator=(const Window &)=delete
unsigned int getHeight() const
Get the height of the rendering region of the window. This does not include the titlebar or borders o...
Definition Window.cpp:50
unsigned int getWidth() const
Get the width of the rendering region of the window. This does not include the borders of the window.
Definition Window.cpp:46
void setFramerateLimit(unsigned int frameRate)
Limit the framerate to a maximum fixed frequency.
Definition Window.cpp:42
void setView(const sf::View &view)
Change the current active view.
Definition Window.cpp:54
void draw(const sf::Drawable &drawable)
Draw a drawable object to the window.
Definition Window.cpp:26
void display()
Display on screen what has been drawn to the window since the last clear.
Definition Window.cpp:34