blob: 90d45da0ee9d2d37b0da3eb73802cad975519722 (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#pragma once
#include "engine/data/bounds.hpp"
#include "engine/data/vector2.hpp"
#include <memory>
enum class CursorStyle
{
BlinkingBlock = 0,
BlinkingBlockDefault = 1,
SteadyBlock = 2,
BlinkingUnderline = 3,
SteadyUnderline = 4,
BlinkingBar = 5,
SteadyBar = 6
};
// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions)
class ICursorController
{
public:
virtual ~ICursorController() noexcept = default;
virtual void move(
const Vector2 &direction,
const uint32_t &amount,
bool flush_cout = false) noexcept = 0;
virtual void move_to(const Vector2 &position, bool flush_cout = false) noexcept = 0;
[[nodiscard]] virtual auto where() const noexcept -> Vector2 = 0;
/**
* Updates the stored cursor position.
*
* This will NOT change the position of the actual cursor!
*/
virtual void update_position(const Vector2 &position) noexcept = 0;
virtual void hide(bool flush_cout = false) noexcept = 0;
virtual void show(bool flush_cout = false) noexcept = 0;
virtual void
set_cursor_style(CursorStyle cursor_style, bool flush_cout = false) noexcept = 0;
virtual void set_bounds(const Bounds &bounds) noexcept = 0;
};
|