#pragma once #include "interfaces/cursor.hpp" #include "interfaces/matrix.hpp" #include "interfaces/scene.hpp" #include "interfaces/window.hpp" #include #include #include constexpr fmt::string_view ENABLE_ALT_BUFFER = "{esc}[?1049h"; constexpr fmt::string_view DISABLE_ALT_BUFFER = "{esc}[?1049l"; constexpr fmt::string_view ERASE_ENTIRE_LINE = "{esc}[2K"; constexpr uint32_t STATUSBAR_COLOR = 0x1A1A1AU; class Scene : public IScene { public: explicit Scene(IMatrixFactory matrix_factory, std::shared_ptr cursor_controller, std::shared_ptr window) noexcept; void enter() noexcept override; void leave() noexcept override; void write_status(const std::string_view &str) noexcept override; private: bool _is_shown; IMatrixFactory _matrix_factory; std::shared_ptr _cursor_controller; std::shared_ptr _window; };