aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-06-08 18:31:58 +0200
committerHampusM <hampus@hampusmat.com>2022-06-13 17:57:01 +0200
commit6d66d5675d0fb78827bc47c49f9d4a1852c7255d (patch)
treee8cbf56d895c6d4acc496fffb076938e822dba40 /src/interfaces
parent7e84d664079d9c407bdf94861825bb05ccf1b0f7 (diff)
feat: implement command mode
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/cursor.hpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/interfaces/cursor.hpp b/src/interfaces/cursor.hpp
index 377fe25..b09f06f 100644
--- a/src/interfaces/cursor.hpp
+++ b/src/interfaces/cursor.hpp
@@ -5,18 +5,21 @@
#include <memory>
-enum CursorEvent
+enum class CursorStyle
{
- POSITION_CHANGE
+ BlinkingBlock = 0,
+ BlinkingBlockDefault = 1,
+ SteadyBlock = 2,
+ BlinkingUnderline = 3,
+ SteadyUnderline = 4,
+ BlinkingBar = 5,
+ SteadyBar = 6
};
// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions)
class ICursorController
{
public:
- using Event = CursorEvent;
- using Context = Vector2;
-
virtual ~ICursorController() noexcept = default;
virtual void move(const Vector2 &direction, const uint32_t &amount) noexcept = 0;
@@ -28,9 +31,18 @@ public:
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;
};