|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| Scrollable & MayaFlux::Portal::Forma::Scrollable::place | ( | FormaTarget | in_buf, |
| Surface & | surface, | ||
| Kinesis::AABB2D | viewport | ||
| ) |
Register the viewport element, wire wheel scrolling, and populate scroll, offset, buf, and cursor_out.
| in_buf | Pre-created buffer for the viewport background. Its render processor is scissored to viewport, so give a slice of a create_buffer() buffer and create the tracked elements as slices of the same buffer: one scissor then clips them all. Elements on buffers of their own are scissored individually by track(), as before. Do not share this buffer with anything that must draw outside the viewport. |
| surface | Surface to register the viewport on. |
| viewport | NDC region: hit-test bounds, wheel-scroll trigger region, background quad, and the Scissor clip every track()ed element with a buffer gets. |
Definition at line 47 of file Scrollable.cpp.
References MayaFlux::Portal::Forma::Layer::add(), MayaFlux::Portal::Forma::LayoutCursor::bind_scroll(), buf, MayaFlux::Portal::Forma::Surface::ctx(), cursor_out, MayaFlux::Kinesis::filled_rect(), MayaFlux::Kinesis::Scissor::from(), MayaFlux::Buffers::VKBuffer::get_render_processor(), MayaFlux::Portal::Forma::Surface::layer(), m_background, m_indicator, m_tracked, MayaFlux::Kinesis::AABB2D::max, MayaFlux::Kinesis::AABB2D::min, offset, MayaFlux::Portal::Forma::Context::on_scroll(), scroll, MayaFlux::Portal::Forma::FormaTarget::submit(), viewport_bounds, viewport_id, wheel_handler(), MayaFlux::Portal::Forma::Element::with_bounds(), MayaFlux::Portal::Forma::Element::with_buffer(), and MayaFlux::Portal::Forma::Element::with_name().
Referenced by MayaFlux::Portal::Forma::create_text_field(), and MayaFlux::Portal::Forma::make_scrollable().
Here is the call graph for this function:
Here is the caller graph for this function: