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

◆ make_value_group() [2/2]

ValueGroup MayaFlux::Portal::Forma::make_value_group ( std::span< const ValueSpec values,
RowBuffer  header_buf,
std::span< const RowBuffer row_bufs,
Surface surface,
LayoutCursor cursor,
float  x_min,
float  x_max,
float  row_h,
bool  initially_open = false 
)

Construct a collapsible header followed by N value rows under it.

The header and all row buffers are pre-created by the caller. Once expanded, all rows in values become visible via the relation cascade. Visibility tracks the header's open state.

Parameters
valuesSpecs for each body row. Order is preserved top-to-bottom.
header_bufPre-created buffer and text image for the header strip.
row_bufsPre-created buffers and text images, one per entry in values.
surfaceSurface to register the header and rows on.
cursorLayout cursor. Advanced across header and all rows on return.
x_minLeft edge in NDC.
x_maxRight edge in NDC.
row_hRow height in NDC units.
initially_openDefault false so deep trees stay collapsed at construction.

Definition at line 146 of file QueryUtils.cpp.

154{
155 auto header = Collapsible {}
156 .initially_open(initially_open)
157 .closed_color(glm::vec3(0.25F))
158 .open_color(glm::vec3(0.35F))
159 .label(header_buf.text_image)
160 .place(std::move(header_buf.buf), surface, cursor, x_min, x_max, row_h);
161
162 std::vector<ValueRow> rows;
163 rows.reserve(values.size());
164 for (size_t i = 0; i < values.size(); ++i) {
165 auto row = make_value_row(values[i], row_bufs[i], surface, cursor, x_min, x_max, row_h);
166 header.attach(surface.layer(), row.element_id);
167 rows.push_back(std::move(row));
168 }
169
170 header.cursor_out = cursor;
171
172 return ValueGroup {
173 .header = std::move(header),
174 .rows = std::move(rows),
175 };
176}
Layer & layer() noexcept
Access the spatial registry.
Definition Surface.hpp:107
Collapsible & closed_color(glm::vec3 c)
Collapsible & open_color(glm::vec3 c)
Collapsible & label(std::shared_ptr< Core::VKImage > img)
Attach a GPU image overlaid on the header as a text label.
MAYAFLUX_API Collapsible & place(std::shared_ptr< Buffers::FormaBuffer > buf, Surface &surface, LayoutCursor &cursor, float x_min, float x_max, float row_h)
Register the header element and wire the toggle callback.
Collapsible & initially_open(bool v)
A collapsible header strip.
std::shared_ptr< Buffers::FormaBuffer > buf
std::shared_ptr< Core::VKImage > text_image

References MayaFlux::Portal::Forma::RowBuffer::buf, MayaFlux::Portal::Forma::Collapsible::closed_color(), MayaFlux::Portal::Forma::ValueGroup::header, MayaFlux::Portal::Forma::Collapsible::initially_open(), MayaFlux::Portal::Forma::Collapsible::label(), MayaFlux::Portal::Forma::Surface::layer(), make_value_row(), MayaFlux::Portal::Forma::Collapsible::open_color(), MayaFlux::Portal::Forma::Collapsible::place(), and MayaFlux::Portal::Forma::RowBuffer::text_image.

Referenced by MayaFlux::Portal::Forma::Inspector::buffer(), MayaFlux::Portal::Forma::Inspector::buffer_manager(), MayaFlux::Portal::Forma::Inspector::event(), MayaFlux::Portal::Forma::Inspector::event_manager(), MayaFlux::Portal::Forma::Inspector::inspect_modulator_tree(), MayaFlux::Portal::Forma::Inspector::inspect_task(), make_value_group(), MayaFlux::Portal::Forma::Inspector::node(), MayaFlux::Portal::Forma::Inspector::node_graph_manager(), MayaFlux::Portal::Forma::Inspector::node_network(), MayaFlux::Portal::Forma::Inspector::root_audio_buffer(), MayaFlux::Portal::Forma::Inspector::root_audio_buffer(), MayaFlux::Portal::Forma::Inspector::root_graphics_buffer(), MayaFlux::Portal::Forma::Inspector::root_node(), MayaFlux::Portal::Forma::Inspector::scheduler(), and MayaFlux::Portal::Forma::Inspector::tasks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: