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

◆ register_handlers()

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

Definition at line 237 of file Context.cpp.

238{
240 std::make_shared<Vruta::Event>(
242 [this](double px, double py) {
243 handle_move(px, py);
245 })),
246 m_name + "_move");
247
249 std::make_shared<Vruta::Event>(
251 [this](double px, double py) { handle_press(px, py, IO::MouseButtons::Left); })),
252 m_name + "_press_left");
253
255 std::make_shared<Vruta::Event>(
257 [this](double px, double py) { handle_release(px, py, IO::MouseButtons::Left); })),
258 m_name + "_release_left");
259
261 std::make_shared<Vruta::Event>(
263 [this](double px, double py) { handle_press(px, py, IO::MouseButtons::Right); })),
264 m_name + "_press_right");
265
267 std::make_shared<Vruta::Event>(
269 [this](double px, double py) { handle_release(px, py, IO::MouseButtons::Right); })),
270 m_name + "_release_right");
271
273 std::make_shared<Vruta::Event>(
275 [this](double px, double py) { handle_press(px, py, IO::MouseButtons::Middle); })),
276 m_name + "_press_middle");
277
279 std::make_shared<Vruta::Event>(
281 [this](double px, double py) { handle_release(px, py, IO::MouseButtons::Middle); })),
282 m_name + "_release_middle");
283
285 std::make_shared<Vruta::Event>(
287 [this](double dx, double dy) { handle_scroll(dx, dy); })),
288 m_name + "_scroll");
289
291 std::make_shared<Vruta::Event>(
293 [this](uint32_t codepoint) { handle_text(codepoint); })),
294 m_name + "_text");
295
297 std::make_shared<Vruta::Event>(
299 [this](uint32_t w, uint32_t h) { handle_resize(w, h); })),
300 m_name + "_resize");
301
303 std::make_shared<Vruta::Event>(
305 [this]() { handle_close(); })),
306 m_name + "_close");
307}
uint32_t h
Definition InkPress.cpp:29
uint32_t py
uint32_t px
void handle_move(double px, double py)
Definition Context.cpp:352
void handle_drags(double px, double py)
Definition Context.cpp:433
Vruta::EventManager & m_event_manager
Definition Context.hpp:357
std::shared_ptr< Core::Window > m_window
Definition Context.hpp:356
void handle_release(double px, double py, IO::MouseButtons btn)
Definition Context.cpp:414
void handle_resize(uint32_t width, uint32_t height)
Definition Context.cpp:549
void handle_press(double px, double py, IO::MouseButtons btn)
Definition Context.cpp:379
void handle_scroll(double dx, double dy)
Definition Context.cpp:460
void handle_text(uint32_t codepoint)
Definition Context.cpp:524
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.

References MayaFlux::Vruta::EventManager::add_event(), h, handle_close(), handle_drags(), handle_move(), handle_press(), handle_release(), handle_resize(), handle_scroll(), handle_text(), MayaFlux::IO::Left, m_event_manager, m_name, m_window, MayaFlux::IO::Middle, MayaFlux::Kriya::mouse_moved(), MayaFlux::Kriya::mouse_pressed(), MayaFlux::Kriya::mouse_released(), MayaFlux::Kriya::mouse_scrolled(), px, py, MayaFlux::IO::Right, MayaFlux::Kriya::text_input(), MayaFlux::Kriya::window_closed(), and MayaFlux::Kriya::window_resized().

Referenced by Context().

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