|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API Entry MayaFlux::Portal::Forma::make_entry | ( | const EntrySpec & | spec, |
| EntryBuffer | row_buf, | ||
| Surface & | surface, | ||
| LayoutCursor & | cursor, | ||
| float | x_min, | ||
| float | x_max, | ||
| float | row_h, | ||
| glm::vec3 | bg = glm::vec3(0.15F) |
||
| ) |
Construct one labeled entry row, advance the cursor, and return it.
The row is one slice of glyph quads: bg is drawn as the fill beneath the text (Portal::Text::PressParams::background), so one slice carries both. The link's compose function runs immediately (establish) so the row shows correctly from the first frame, and again on every subsequent link.tap(), drawing "label: entry" into the row's buffer. The buffer is pre-created by the caller as row_buf.
Bounds come from cursor.advance()'s return (scroll-offset aware, per LayoutCursor::bind_scroll), with x_min/x_max substituted in afterward for this call's own column override - not from cursor.y() read directly, so a row placed through a scroll-bound cursor lands at the correct position immediately.
| spec | Label and reader for the row. |
| row_buf | Pre-created text-capable buffer. |
| surface | Surface to register the row on. |
| cursor | Layout cursor. Advanced by row_h on return. |
| x_min | Left edge in NDC. |
| x_max | Right edge in NDC. |
| row_h | Row height in NDC units. |
| bg | Background fill drawn beneath the row's text. |
Definition at line 32 of file Entry.cpp.
References MayaFlux::Portal::Forma::Layer::add(), MayaFlux::Portal::Forma::LayoutCursor::advance(), MayaFlux::Portal::Forma::EntryBuffer::buf, MayaFlux::Portal::Forma::Element::buffer, MayaFlux::Portal::Text::PressParams::color, MayaFlux::Portal::Forma::Surface::ctx(), MayaFlux::Portal::Forma::Entry::element_id, label, MayaFlux::Portal::Forma::EntrySpec::label, MayaFlux::Portal::Forma::Surface::layer(), MayaFlux::Kinesis::AABB2D::max, MayaFlux::Kinesis::AABB2D::min, MayaFlux::Portal::Forma::Context::on_resize(), MayaFlux::Portal::Forma::EntrySpec::reader, row_pixel_dims(), and MayaFlux::Portal::Forma::Surface::window().
Referenced by make_entry(), and make_entry_group().
Here is the call graph for this function:
Here is the caller graph for this function: