aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/status_manager.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/status_manager.hpp')
-rw-r--r--src/interfaces/status_manager.hpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/interfaces/status_manager.hpp b/src/interfaces/status_manager.hpp
new file mode 100644
index 0000000..afc8416
--- /dev/null
+++ b/src/interfaces/status_manager.hpp
@@ -0,0 +1,28 @@
+#pragma once
+
+#include "interfaces/statusline.hpp"
+
+#include <yacppdic/factory.hpp>
+
+#include <memory>
+#include <string_view>
+
+// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions)
+class IStatusManager
+{
+public:
+ virtual ~IStatusManager() = default;
+
+ virtual void set_section_title(
+ const StatusLineSection &section,
+ const std::string_view &title
+ ) noexcept = 0;
+
+ virtual void set_section_body(
+ const StatusLineSection &section,
+ const std::string_view &body
+ ) noexcept = 0;
+};
+
+using IStatusManagerFactory = yacppdic::Factory<
+ std::unique_ptr<IStatusManager>(const std::shared_ptr<IStatusLine> &statusline)>;