#pragma once #include "interfaces/publisher.hpp" #include "interfaces/subscriber.hpp" #include "engine/data/vector2.hpp" #include enum CursorEvent { POSITION_CHANGE }; class ICursorController : public IPublisher { public: using Event = CursorEvent; using Context = Vector2; using Subscriber = std::shared_ptr>; ~ICursorController() noexcept override = default; virtual void move(const Vector2 &direction, const uint32_t &amount) noexcept = 0; // NOLINTNEXTLINE(google-default-arguments) virtual void move_to(const Vector2 &position, bool silent = false) noexcept = 0; [[nodiscard]] virtual Vector2 where() const noexcept = 0; virtual void ensure_position() noexcept = 0; static void hide() noexcept; static void show() noexcept; void subscribe(const Event &event, const Subscriber &subscriber) noexcept override = 0; void notify_subscribers(const Event &event, const Context &context) const noexcept override = 0; };