#pragma once #include "interfaces/cursor.hpp" #include "interfaces/matrix.hpp" #include "interfaces/scene.hpp" #include #include #include #include constexpr fmt::string_view ENABLE_ALT_BUFFER = "{esc}[?1049h"; constexpr fmt::string_view DISABLE_ALT_BUFFER = "{esc}[?1049l"; class Scene : public IScene { public: explicit Scene( IMatrixFactory matrix_factory, std::shared_ptr cursor_controller) noexcept; void enter() noexcept override; void leave() noexcept override; [[nodiscard]] auto size() const noexcept -> Bounds override; [[nodiscard]] auto get_matrix() const noexcept -> const std::shared_ptr> & override; private: std::shared_ptr> _matrix; std::shared_ptr _cursor_controller; bool _is_shown; std::shared_ptr _original_termios = nullptr; };