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

◆ place()

template<typename T >
Tend & MayaFlux::Portal::Forma::Tend< T >::place ( Surface &  target)
inline

Realize form on target.

Parameters
targetCanvas to register on. A copy is retained in surface.
Returns
*this, with surface and result populated.

Definition at line 243 of file Tend.hpp.

244 {
245 surface = target;
246 result = batch
247 ? Portal::Forma::create<T>(target, batch, std::move(form), std::move(initial))
248 : Portal::Forma::create<T>(target, std::move(form), std::move(initial));
249 return *this;
250 }
@ Portal
High-level user-facing API layer.
Mapped< T > create(Surface &surface, const std::shared_ptr< Buffers::FormaBuffer > &batch, Geometry::Form< T > form, T initial, std::function< float(T)> project={})
Realize a Form on surface as a slice of batch.
Definition Tend.hpp:28
void move(EditableText &s, int n)
Move the cursor by n codepoints.
Definition TextEdit.cpp:20
T initial
Starting value written into MappedState. Consumed by place().
Definition Tend.hpp:225
Geometry::Form< T > form
Geometry, topology, capacity, and interaction. Consumed by place().
Definition Tend.hpp:222
std::optional< Surface > surface
Populated by place() with a copy of the Surface it was given, so ctx()/layer()/window() stay reachabl...
Definition Tend.hpp:236
std::shared_ptr< Buffers::FormaBuffer > batch
Optional shared buffer from create_buffer().
Definition Tend.hpp:229
std::optional< Mapped< T > > result
Populated by place(). The real, fully wired element.
Definition Tend.hpp:232

References MayaFlux::Portal::Forma::Tend< T >::batch, MayaFlux::Portal::Forma::Tend< T >::form, MayaFlux::Portal::Forma::Tend< T >::initial, MayaFlux::Portal::Forma::Tend< T >::result, and MayaFlux::Portal::Forma::Tend< T >::surface.