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

◆ handle_scroll()

void MayaFlux::Portal::Forma::Context::handle_scroll ( double  dx,
double  dy 
)
private

Definition at line 374 of file Context.cpp.

375{
376 if (!m_hovered)
377 return;
378
379 auto it = m_callbacks.find(*m_hovered);
380 if (it == m_callbacks.end() || !it->second.scroll)
381 return;
382
383 const auto [px, py] = m_window->get_event_source().get_mouse_position();
384 it->second.scroll(*m_hovered, to_ndc(px, py), dx, dy);
385}
std::shared_ptr< Core::Window > m_window
Definition Context.hpp:264
glm::vec2 to_ndc(double px, double py) const noexcept
Definition Context.cpp:268
std::unordered_map< uint32_t, ElementCallbacks > m_callbacks
Definition Context.hpp:269
std::optional< uint32_t > m_hovered
Definition Context.hpp:267

References m_callbacks, m_hovered, m_window, and to_ndc().

Referenced by register_handlers().

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