aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/statusline.hpp
blob: f07c1a0a1d304a223bf2027349b930c80f34870c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once

#include "interfaces/cursor.hpp"
#include "interfaces/window.hpp"

#include <string_view>

enum StatusLineSection
{
	A,
	B
};

// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions)
class IStatusLine
{
public:
	virtual ~IStatusLine() noexcept = default;

	virtual void initialize_background() noexcept = 0;

	virtual void set_status(StatusLineSection section,
							const std::string_view &str) noexcept = 0;
};

using IStatusLineFactory = std::shared_ptr<IStatusLine> (*)(
	const std::shared_ptr<ICursorController> &cursor_controller,
	const std::shared_ptr<IWindow> &window);