aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/cursor.hpp
blob: 63aae41fd6cd523bd9efb9592043dcf2310321c2 (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
#pragma once

#include "engine/data/vector2.hpp"

#include <memory>

enum CursorEvent
{
	POSITION_CHANGE
};

// 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;

	// 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;

	virtual void hide() noexcept = 0;

	virtual void show() noexcept = 0;
};