238{
240 std::make_shared<Vruta::Event>(
242 [
this](
double px,
double py) {
245 })),
247
249 std::make_shared<Vruta::Event>(
253
255 std::make_shared<Vruta::Event>(
258 m_name +
"_release_left");
259
261 std::make_shared<Vruta::Event>(
265
267 std::make_shared<Vruta::Event>(
270 m_name +
"_release_right");
271
273 std::make_shared<Vruta::Event>(
276 m_name +
"_press_middle");
277
279 std::make_shared<Vruta::Event>(
282 m_name +
"_release_middle");
283
285 std::make_shared<Vruta::Event>(
289
291 std::make_shared<Vruta::Event>(
293 [
this](uint32_t codepoint) {
handle_text(codepoint); })),
295
297 std::make_shared<Vruta::Event>(
301
303 std::make_shared<Vruta::Event>(
307}
void handle_move(double px, double py)
void handle_drags(double px, double py)
Vruta::EventManager & m_event_manager
std::shared_ptr< Core::Window > m_window
void handle_release(double px, double py, IO::MouseButtons btn)
void handle_resize(uint32_t width, uint32_t height)
void handle_press(double px, double py, IO::MouseButtons btn)
void handle_scroll(double dx, double dy)
void handle_text(uint32_t codepoint)
void add_event(const std::shared_ptr< Event > &event, const std::string &name="")
Add a event to the manager.
Vruta::Event mouse_moved(std::shared_ptr< Core::Window > window, std::function< void(double, double)> callback)
Creates an Event coroutine that triggers on mouse movement.
Vruta::Event mouse_scrolled(std::shared_ptr< Core::Window > window, std::function< void(double, double)> callback)
Creates an Event coroutine that triggers on mouse scroll.
Vruta::Event window_closed(std::shared_ptr< Core::Window > window, std::function< void()> callback)
Creates an Event coroutine that triggers on window close.
Vruta::Event mouse_released(std::shared_ptr< Core::Window > window, IO::MouseButtons button, std::function< void(double, double)> callback)
Creates an Event coroutine that triggers on specific mouse button release.
Vruta::Event mouse_pressed(std::shared_ptr< Core::Window > window, IO::MouseButtons button, std::function< void(double, double)> callback)
Creates an Event coroutine that triggers on specific mouse button press.
Vruta::Event window_resized(std::shared_ptr< Core::Window > window, std::function< void(uint32_t, uint32_t)> callback)
Creates an Event coroutine that triggers on window resize.
Vruta::Event text_input(std::shared_ptr< Core::Window > window, std::function< void(uint32_t)> callback)
Creates an Event coroutine that triggers on resolved text input.