aboutsummaryrefslogtreecommitdiff
path: root/src/engine/graphics/scene.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/graphics/scene.hpp')
-rw-r--r--src/engine/graphics/scene.hpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/engine/graphics/scene.hpp b/src/engine/graphics/scene.hpp
index c4c217f..3d05cd9 100644
--- a/src/engine/graphics/scene.hpp
+++ b/src/engine/graphics/scene.hpp
@@ -1,29 +1,37 @@
#pragma once
-#include "DI/auto_wirable.hpp"
+#include "interfaces/cursor.hpp"
#include "interfaces/matrix.hpp"
#include "interfaces/scene.hpp"
+#include "interfaces/window.hpp"
#include <fmt/core.h>
+#include <memory>
#include <string_view>
constexpr fmt::string_view ENABLE_ALT_BUFFER = "{esc}[?1049h";
constexpr fmt::string_view DISABLE_ALT_BUFFER = "{esc}[?1049l";
-class Scene : public IScene,
- public AutoWirable<IScene, Scene, IMatrixFactory<std::string_view>>
+constexpr fmt::string_view ERASE_ENTIRE_LINE = "{esc}[2K";
+
+class Scene : public IScene
{
public:
- explicit Scene(IMatrixFactory<std::string_view> matrix_factory);
+ explicit Scene(IMatrixFactory<std::string_view> matrix_factory,
+ std::shared_ptr<ICursorController> cursor_controller,
+ std::shared_ptr<IWindow> window) noexcept;
- void enter() override;
+ void enter() noexcept override;
- void leave() override;
+ void leave() noexcept override;
- // void do_in_statusbar(const std::function<void()> &routine);
+ void write_status(const std::string_view &str) noexcept override;
private:
bool _is_shown;
IMatrixFactory<std::string_view> _matrix_factory;
+
+ std::shared_ptr<ICursorController> _cursor_controller;
+ std::shared_ptr<IWindow> _window;
};