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

◆ form_placer()

template<typename Placer, typename State>
Placer MayaFlux::Portal::Forma::Detail::form_placer ( Geometry::Form< State > form,
State initial )

A Placer that places a form with an initial state on a Surface and returns its element id.

Definition at line 44 of file CallTable.hpp.

45 {
46 return Placer([form = std::move(form), initial = std::move(initial)](
47 Surface& surface, std::string& error) -> std::optional<uint32_t> {
48 Tend<State> tend {
49 .form = form,
50 .initial = initial,
51 };
52 tend.place(surface);
53 if (!tend.result) {
54 error = "could not place the element";
55 return std::nullopt;
56 }
57 return tend.result->element.id;
58 });
59 }
Named owner of a (Window, Layer, Context) triple: the Forma canvas.
Definition Surface.hpp:121
Tend & place(Surface &target)
Realize form on target.
Definition Tend.hpp:244
std::optional< Mapped< T > > result
Populated by place(). The real, fully wired element.
Definition Tend.hpp:233
The fourth member of the Collapsible/Scrollable/TextField family, for a bare Form<T> control.
Definition Tend.hpp:220

References MayaFlux::Portal::Forma::Tend< T >::place(), and MayaFlux::Portal::Forma::Tend< T >::result.

Referenced by MayaFlux::Portal::Forma::Detail::DocumentWalk< Source, Access >::vertex_placer().

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