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

◆ make_value_group()

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 132 of file QueryUtils.cpp.

140{
141 auto header = Collapsible {}
142 .initially_open(initially_open)
143 .closed_color(glm::vec3(0.25F))
144 .open_color(glm::vec3(0.35F))
145 .label(header_buf.text_image)
146 .place(std::move(header_buf.buf), surface, cursor, x_min, x_max, row_h);
147
148 std::vector<ValueRow> rows;
149 rows.reserve(values.size());
150 for (size_t i = 0; i < values.size(); ++i) {
151 auto row = make_value_row(values[i], row_bufs[i], surface, cursor, x_min, x_max, row_h);
152 header.attach(surface.layer(), row.element_id);
153 rows.push_back(std::move(row));
154 }
155
156 header.cursor_out = cursor;
157
158 return ValueGroup {
159 .header = std::move(header),
160 .rows = std::move(rows),
161 };
162}
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(), 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: