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

◆ drag_with()

template<typename T >
auto MayaFlux::Portal::Forma::Geometry::drag_with ( std::function< T(glm::vec2)>  project,
IO::MouseButtons  btn = IO::MouseButtons::Left 
)

Produce a Form::wire that registers a drag writing a projected cursor position.

Parameters
projectNDC to value mapping, from Kinesis::Projection.
btnMouse button that must be held.

Definition at line 72 of file FormFactory.hpp.

75{
76 return [project = std::move(project), btn](
77 Context& ctx, uint32_t id, std::shared_ptr<MappedState<T>> state) {
78 wire_drag<T>(ctx, id, std::move(state), project, btn);
79 };
80}
Event wiring between a Layer and a window surface.
Definition Context.hpp:40