|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
| void MayaFlux::Portal::Forma::Context::on_drag | ( | uint32_t | id, |
| IO::MouseButtons | btn, | ||
| MoveFn | fn | ||
| ) |
Called on each mouse-move event while btn is held, tracking the element where the drag began even when the cursor leaves its bounds.
Drag tracking begins when the element is first hit (either at initial press or first drag motion while button is held). Once tracking starts, the callback continues to fire with the current cursor position until the button is released, regardless of whether the cursor remains over the element.
This matches standard UI expectations for sliders, scrollbars, resize handles, and other controls that must respond continuously during a drag gesture.
Backed by Kriya::mouse_dragged, which gates on button state natively.
| id | Element id to bind to. |
| btn | Mouse button that must be held. |
| fn | Callback receiving element id and current NDC cursor position (which may be outside the element's bounds during drag). |
Definition at line 48 of file Context.cpp.
References m_callbacks.
Referenced by MayaFlux::Portal::Forma::Geometry::wire_canvas_drag().
Here is the caller graph for this function: