#ifndef WINDOW_HPP #define WINDOW_HPP #include #include #include #include #include #include namespace sftk { /** * @brief Window type * * To create a unique SFML window in the current thread. */ class Window : public Container { public: static Window &create(int width, int height, std::wstring name = L""); void exec(); void setSize(sf::Vector2u size); void setBackgroudColor(sf::Color color); const sf::Color &getBackgroundColor() const; bool isRoot() const; sf::Vector2f &getPosition() const; protected: Window(int width, int height, std::wstring name = L""); private: sf::RenderWindow &windowSFWindow(); sf::RenderWindow sfwindow; std::unique_ptr running; private: std::unique_ptr> v2f_dumpst; sf::Color backgroud; public: class WindowMultipleConstructed : public SFTKException { public: WindowMultipleConstructed(Window *); const char *what() const noexcept override; }; }; }; #endif