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

◆ make_entry_group() [2/2]

MAYAFLUX_API EntryGroup MayaFlux::Portal::Forma::make_entry_group ( std::span< const EntrySpec >  entrys,
std::string_view  header_label,
FormaTarget  header_buf,
std::span< const EntryBuffer >  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 entry rows under it.

The header draws header_label itself (Collapsible::label), background included, so header_buf needs only a "text" additional_textures slot. Once expanded, all rows in entrys become visible via the relation cascade. Visibility tracks the header's open state.

Parameters
entrysSpecs for each body row. Order is preserved top-to-bottom.
header_labelText drawn into the header strip.
header_bufPre-created buffer for the header strip, "text" slot empty.
row_bufsPre-created text-capable buffers, one per entry in entrys.
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 104 of file Entry.cpp.

113{
114 auto header = Collapsible {}
115 .initially_open(initially_open)
116 .closed_color(glm::vec3(0.25F))
117 .open_color(glm::vec3(0.35F))
118 .label(std::string(header_label))
119 .place(std::move(header_buf), surface, cursor, x_min, x_max, row_h);
120
121 std::vector<Entry> rows;
122 rows.reserve(entrys.size());
123 for (size_t i = 0; i < entrys.size(); ++i) {
124 auto row = make_entry(entrys[i], row_bufs[i], surface, cursor, x_min, x_max, row_h);
125 header.attach(surface.layer(), row.element_id);
126 rows.push_back(std::move(row));
127 }
128
129 header.cursor_out = cursor;
130
131 return EntryGroup {
132 .header = std::move(header),
133 .rows = std::move(rows),
134 };
135}
uint32_t rows
Layer & layer() noexcept
Access the spatial registry.
Definition Surface.hpp:159
MAYAFLUX_API Collapsible & place(FormaTarget buf, Surface &surface, LayoutCursor &cursor, float x_min, float x_max, float row_h)
Register the header element and wire the toggle callback.
Collapsible & closed_color(glm::vec3 c)
Collapsible & open_color(glm::vec3 c)
Collapsible & label(std::string text)
Draw a text label over the header, background included.
Collapsible & initially_open(bool v)
A collapsible header strip.

References MayaFlux::Portal::Forma::Collapsible::closed_color(), MayaFlux::Portal::Forma::EntryGroup::header, MayaFlux::Portal::Forma::Collapsible::initially_open(), MayaFlux::Portal::Forma::Collapsible::label(), MayaFlux::Portal::Forma::Surface::layer(), make_entry(), MayaFlux::Portal::Forma::Collapsible::open_color(), MayaFlux::Portal::Forma::Collapsible::place(), and rows.

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_entry_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::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: