blob: b09f06fbd4dc851e10034d921d37d03f87d5186d (
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
|
#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) noexcept = 0;
// NOLINTNEXTLINE(google-default-arguments)
virtual void move_to(const Vector2 &position) noexcept = 0;
[[nodiscard]] virtual auto where() const noexcept -> Vector2 = 0;
virtual void ensure_position() noexcept = 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() noexcept = 0;
virtual void show() noexcept = 0;
virtual void set_cursor_style(CursorStyle cursor_style) noexcept = 0;
virtual void set_bounds(const Bounds &bounds) noexcept = 0;
};
|