|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| std::function< void(uint32_t, glm::vec2, double, double)> MayaFlux::Portal::Forma::Scrollable::wheel_handler | ( | Surface & | surface | ) | const |
A self-contained wheel-scroll handler bound to this Scrollable's own state.
place() wires exactly this behind the viewport's own on_scroll, but Context::handle_scroll dispatches to only the topmost element under the cursor (Layer::hit_test), so content drawn on top of the viewport - anything track()ed, since it registers after and so hit- tests first - never reaches the viewport's own on_scroll while the cursor sits over it. A caller in that position (TextField:: scrollable() is exactly this case) registers the returned function on its own element's on_scroll instead of duplicating the wheel- delta-to-content-delta conversion by hand.
Captures only this Scrollable's own shared state (scroll, offset, the tracked list, the indicator), the same shared_ptrs place()'s own wiring captures - safe to keep registered after this Scrollable value itself is destroyed, same as every other Context callback this struct wires.
Definition at line 87 of file Scrollable.cpp.
References MayaFlux::Kinesis::apply_scroll(), indicator(), MayaFlux::Portal::Forma::Surface::layer(), m_indicator, m_tracked, m_wheel_speed, offset, and scroll.
Referenced by place(), and MayaFlux::Portal::Forma::TextField::scrollable().
Here is the call graph for this function:
Here is the caller graph for this function: