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

#include "engine/data/bounds.hpp"
#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;

	virtual void set_bounds(const Bounds &bounds) noexcept = 0;
};