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

◆ add()

Layer::Slot MayaFlux::Portal::Forma::Layer::add ( Element  element)

Add an element to the layer.

Assigns a stable id and returns a Slot carrying that id. The Slot supports chained post-registration mutations (relate_to, hidden, non_interactive, to_front, to_back) and converts implicitly to uint32_t, preserving all existing callsites.

Returns
Slot for the registered element.

Definition at line 9 of file Layer.cpp.

10{
11 element.id = m_next_id++;
12 m_elements.push_back(std::move(element));
13 return Slot(*this, m_elements.back().id);
14}
std::vector< Element > m_elements
Definition Layer.hpp:280

References MayaFlux::Portal::Forma::Element::id, m_elements, and m_next_id.

Referenced by MayaFlux::Portal::Forma::make_value_row(), MayaFlux::Portal::Forma::Collapsible::place(), MayaFlux::Portal::Forma::Plot::place(), MayaFlux::Portal::Forma::Plot::place_label(), and MayaFlux::Portal::Forma::Plot::place_rect().

+ Here is the caller graph for this function: