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

◆ scroll_by()

void MayaFlux::Portal::Forma::Scrollable::scroll_by ( Layer &  layer,
glm::vec2  delta 
)

Apply a scroll delta and reflow every tracked element.

The input-agnostic core: place() wires wheel input to this by default, but any other trigger can call it directly with its own delta - nothing here assumes the source.

Parameters
layerLayer the viewport and every tracked element were registered on.
deltaContent-space scroll delta, added to the current offset and clamped to scroll->content_bounds.

Definition at line 131 of file Scrollable.cpp.

132{
133 if (!scroll || !offset || !m_tracked)
134 return;
135
137 reflow(*scroll, *offset, *m_tracked, layer, m_indicator.get());
138}
void apply_scroll(NavigationState &st, float ticks)
Dolly eye along the current forward vector.
std::shared_ptr< MappedState< glm::vec2 > > offset
Reactive mirror of scroll->offset, bound into cursor_out. Valid after place().
std::shared_ptr< Mapped< glm::vec2 > > m_indicator
std::shared_ptr< std::vector< Tracked > > m_tracked
std::shared_ptr< Kinesis::ScrollState > scroll
Clamped scroll offset and content/viewport extents. Valid after place().

References MayaFlux::Kinesis::apply_scroll(), MayaFlux::Portal::Forma::Layer::get(), m_indicator, m_tracked, offset, and scroll.

+ Here is the call graph for this function: