MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ register_handlers()

void MayaFlux::Portal::Forma::Context::register_handlers ( )
private

Definition at line 191 of file Context.cpp.

192{
194 std::make_shared<Vruta::Event>(
196 [this](double px, double py) { handle_move(px, py); })),
197 m_name + "_move");
198
200 std::make_shared<Vruta::Event>(
202 [this](double px, double py) { handle_press(px, py, IO::MouseButtons::Left); })),
203 m_name + "_press_left");
204
206 std::make_shared<Vruta::Event>(
208 [this](double px, double py) { handle_release(px, py, IO::MouseButtons::Left); })),
209 m_name + "_release_left");
210
212 std::make_shared<Vruta::Event>(
214 [this](double px, double py) { handle_press(px, py, IO::MouseButtons::Right); })),
215 m_name + "_press_right");
216
218 std::make_shared<Vruta::Event>(
220 [this](double px, double py) { handle_release(px, py, IO::MouseButtons::Right); })),
221 m_name + "_release_right");
222
224 std::make_shared<Vruta::Event>(
226 [this](double px, double py) { handle_drag(px, py, IO::MouseButtons::Left); })),
227 m_name + "_drag_left");
228
230 std::make_shared<Vruta::Event>(
232 [this](double px, double py) { handle_drag(px, py, IO::MouseButtons::Right); })),
233 m_name + "_drag_right");
234
236 std::make_shared<Vruta::Event>(
238 [this](double dx, double dy) { handle_scroll(dx, dy); })),
239 m_name + "_scroll");
240}
void handle_move(double px, double py)
Definition Context.cpp:277
Vruta::EventManager & m_event_manager
Definition Context.hpp:265
std::shared_ptr< Core::Window > m_window
Definition Context.hpp:264
void handle_release(double px, double py, IO::MouseButtons btn)
Definition Context.cpp:337
void handle_drag(double px, double py, IO::MouseButtons btn)
Definition Context.cpp:356
void handle_press(double px, double py, IO::MouseButtons btn)
Definition Context.cpp:303
void handle_scroll(double dx, double dy)
Definition Context.cpp:374
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 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 mouse_dragged(std::shared_ptr< Core::Window > window, IO::MouseButtons button, std::function< void(double, double)> callback)
Creates an Event coroutine that triggers on mouse drag with specific button.

References MayaFlux::Vruta::EventManager::add_event(), handle_drag(), handle_move(), handle_press(), handle_release(), handle_scroll(), MayaFlux::IO::Left, m_event_manager, m_name, m_window, MayaFlux::Kriya::mouse_dragged(), MayaFlux::Kriya::mouse_moved(), MayaFlux::Kriya::mouse_pressed(), MayaFlux::Kriya::mouse_released(), MayaFlux::Kriya::mouse_scrolled(), and MayaFlux::IO::Right.

Referenced by Context().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: