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

◆ register_handlers()

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

Definition at line 177 of file Context.cpp.

178{
180 std::make_shared<Vruta::Event>(
182 [this](double px, double py) { handle_move(px, py); })),
183 m_name + "_move");
184
186 std::make_shared<Vruta::Event>(
188 [this](double px, double py) { handle_press(px, py, IO::MouseButtons::Left); })),
189 m_name + "_press_left");
190
192 std::make_shared<Vruta::Event>(
194 [this](double px, double py) { handle_release(px, py, IO::MouseButtons::Left); })),
195 m_name + "_release_left");
196
198 std::make_shared<Vruta::Event>(
200 [this](double px, double py) { handle_press(px, py, IO::MouseButtons::Right); })),
201 m_name + "_press_right");
202
204 std::make_shared<Vruta::Event>(
206 [this](double px, double py) { handle_release(px, py, IO::MouseButtons::Right); })),
207 m_name + "_release_right");
208
210 std::make_shared<Vruta::Event>(
212 [this](double px, double py) { handle_drag(px, py, IO::MouseButtons::Left); })),
213 m_name + "_drag_left");
214
216 std::make_shared<Vruta::Event>(
218 [this](double px, double py) { handle_drag(px, py, IO::MouseButtons::Right); })),
219 m_name + "_drag_right");
220
222 std::make_shared<Vruta::Event>(
224 [this](double dx, double dy) { handle_scroll(dx, dy); })),
225 m_name + "_scroll");
226}
void handle_move(double px, double py)
Definition Context.cpp:263
Vruta::EventManager & m_event_manager
Definition Context.hpp:248
std::shared_ptr< Core::Window > m_window
Definition Context.hpp:247
void handle_release(double px, double py, IO::MouseButtons btn)
Definition Context.cpp:323
void handle_drag(double px, double py, IO::MouseButtons btn)
Definition Context.cpp:342
void handle_press(double px, double py, IO::MouseButtons btn)
Definition Context.cpp:289
void handle_scroll(double dx, double dy)
Definition Context.cpp:360
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: