MayaFlux 0.4.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 360 of file Context.cpp.

361{
362 if (!m_hovered)
363 return;
364
365 auto it = m_callbacks.find(*m_hovered);
366 if (it == m_callbacks.end() || !it->second.scroll)
367 return;
368
369 const auto [px, py] = m_window->get_event_source().get_mouse_position();
370 it->second.scroll(*m_hovered, to_ndc(px, py), dx, dy);
371}
std::shared_ptr< Core::Window > m_window
Definition Context.hpp:247
glm::vec2 to_ndc(double px, double py) const noexcept
Definition Context.cpp:254
std::unordered_map< uint32_t, ElementCallbacks > m_callbacks
Definition Context.hpp:252
std::optional< uint32_t > m_hovered
Definition Context.hpp:250

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: