MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Portal::Forma Namespace Reference

Namespaces

namespace  Geometry
 
namespace  internal
 
namespace  Plot
 

Classes

class  Bridge
 Two-way binding orchestrator for Forma elements. More...
 
struct  Collapsible
 A collapsible header strip. More...
 
struct  ColorPicker
 A saturation and value square, a hue strip and a swatch, drawn into one buffer. More...
 
class  Context
 Event wiring between a Layer and a window surface. More...
 
struct  Dropdown
 A header showing the current choice that opens into a list of options. More...
 
struct  Element
 A bounded, renderable region on a window surface. More...
 
struct  Entry
 One entry row in a EntryGroup body. More...
 
struct  EntryBuffer
 A pre-created text-capable buffer, passed to make_entry. More...
 
struct  EntryGroup
 Header collapsible with N entry rows related to it. More...
 
struct  EntrySpec
 A single entry to display in a EntryGroup body row. More...
 
class  FormaTarget
 Where an element's geometry and texture are written. More...
 
class  Inspector
 Forma subsystem for live introspection. More...
 
struct  InspectResult
 Result of an introspect call. More...
 
class  Layer
 Flat registry of Elements on a surface. More...
 
class  LayoutCursor
 Reactive Y-position accumulator for vertical primitive stacking. More...
 
struct  Link
 A directed coupling between Forma participants. More...
 
struct  Mapped
 Infrastructure for a continuously-mapped value whose GPU geometry tracks it. More...
 
struct  MappedState
 Value carrier for a Mapped primitive. More...
 
struct  Scrollable
 A clipped, scroll-offset viewport over content taller than it. More...
 
class  Surface
 Named owner of a (Window, Layer, Context) triple: the Forma canvas. More...
 
struct  SurfaceConfig
 The single argument every Surface-creating function in this module takes, at every level of abstraction. More...
 
struct  Tend
 The fourth member of the Collapsible/Scrollable/TextField family, for a bare Form<T> control. More...
 
struct  TextField
 An editable text region: keyboard/text-input wiring over an Element the caller already has a buffer for. More...
 
struct  Tracked
 One element registered with a Scrollable for reflow on scroll. More...
 

Typedefs

using ElementRef = std::pair< std::weak_ptr< Layer >, uint32_t >
 Layer-scoped element identity.
 
template<typename T >
using GeometryFn = std::function< void(T value, std::vector< uint8_t > &out_bytes, Element &element)>
 Geometry function signature.
 
using PickCallback = std::function< void(std::optional< size_t >)>
 Receives the chosen index, or nullopt when the window was closed without a choice.
 
using Version = uint64_t
 Version counter incremented on every value write.
 

Functions

Bridge & bridge ()
 Return the application-level Bridge instance.
 
template<typename T >
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.
 
template<typename T >
Mapped< T > create (Surface &surface, Geometry::Form< T > form, T initial, std::function< float(T)> project={})
 Realize a Form on surface.
 
std::shared_ptr< Buffers::FormaBuffer > create_buffer (Graphics::RenderConfig render)
 Construct and register a FormaBuffer without creating a Mapped<T>.
 
template<typename T >
Mapped< T > create_element (Surface &surface, FormaTarget target, GeometryFn< T > geom, T initial, std::function< float(T)> project={})
 create_element drawing into target instead of a buffer of its own.
 
template<typename T >
Mapped< T > create_element (Surface &surface, GeometryFn< T > geom, T initial, Graphics::PrimitiveTopology topology=Graphics::PrimitiveTopology::TRIANGLE_STRIP, std::function< float(T)> project={})
 Build a FormaBuffer, register it, construct a Mapped<T>, add the element to surface's layer, and register it with the application Bridge.
 
std::pair< std::shared_ptr< Layer >, std::shared_ptr< Context > > create_layer (const std::shared_ptr< Core::Window > &window, std::string name)
 Construct a Layer and a Context wired to window.
 
Surface create_surface (SurfaceConfig config)
 Construct a Surface from a SurfaceConfig.
 
TextField create_text_field (Surface &surface, Kinesis::AABB2D bounds, std::shared_ptr< Portal::Text::PressParams > params=nullptr, std::string initial_text={}, bool scrollable=false)
 Build a text-capable FormaBuffer, register a TextField, and wire text editing onto it in one call.
 
void destroy (Surface &surface, uint32_t id)
 Tear down an element and everything related to it.
 
bool initialize (std::shared_ptr< Nodes::NodeGraphManager > node_graph_manager, std::shared_ptr< Buffers::BufferManager > buffer_manager, std::shared_ptr< Vruta::TaskScheduler > scheduler, std::shared_ptr< Vruta::EventManager > event_manager, std::shared_ptr< Core::WindowManager > window_manager)
 Store engine-level references for use by all subsequent Forma calls.
 
void inspect (const std::shared_ptr< Buffers::Buffer > &buf)
 Open a dedicated window inspecting a single Buffer and its processing chain.
 
void inspect (const std::shared_ptr< Nodes::Network::NodeNetwork > &net)
 Open a dedicated window inspecting a NodeNetwork.
 
void inspect (const std::shared_ptr< Nodes::Node > &node)
 Open a dedicated window inspecting a single Node and its modulator tree.
 
void inspect (const std::shared_ptr< Vruta::Event > &ev, std::string_view name={})
 Open a dedicated window inspecting a single Event.
 
void inspect_buffers ()
 Open or show the BufferManager inspection window.
 
void inspect_events ()
 Open or show the EventManager inspection window.
 
void inspect_node_graph ()
 Open or show the NodeGraphManager inspection window.
 
void inspect_scheduler ()
 Open or show the TaskScheduler inspection window.
 
Inspector & inspector ()
 Access the Forma introspection subsystem.
 
bool is_initialized ()
 Whether initialize() has been called successfully.
 
Collapsible make_collapsible (FormaTarget buf, Surface &surface, LayoutCursor &cursor, float x_min, float x_max, float row_h, bool initially_open=true, glm::vec3 color_closed=glm::vec3(0.25F), glm::vec3 color_open=glm::vec3(0.35F), std::string label={})
 Construct a collapsible header strip.
 
Entry make_entry (const EntrySpec &spec, EntryBuffer row_buf, Surface &surface, LayoutCursor &cursor, float row_h, glm::vec3 bg=glm::vec3(0.15F))
 make_entry using the cursor's column extents.
 
Entry make_entry (const EntrySpec &spec, EntryBuffer row_buf, Surface &surface, LayoutCursor &cursor, float x_min, float x_max, float row_h, glm::vec3 bg=glm::vec3(0.15F))
 Construct one labeled entry row, advance the cursor, and return it.
 
EntryGroup 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 row_h, bool initially_open=false)
 make_entry_group using the cursor's column extents.
 
EntryGroup 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.
 
template<typename T >
Mapped< T > make_mapped (T initial, GeometryFn< T > geometry, FormaTarget buffer)
 Construct a Mapped<T> with a freshly allocated MappedState.
 
Scrollable make_scrollable (FormaTarget buf, Surface &surface, Kinesis::AABB2D viewport, glm::vec3 background_color=glm::vec3(0.08F, 0.08F, 0.1F), float wheel_speed=0.05F)
 Construct a scrollable viewport.
 
void pick (std::string title, std::vector< std::string > labels, PickCallback callback)
 Open a window of clickable rows, one per label, and report the choice.
 
template<typename T >
void pick (std::string title, std::vector< T > items, std::type_identity_t< std::function< std::string(const T &)> > label, std::type_identity_t< std::function< void(std::optional< T >)> > callback)
 Typed form of pick: list items by label and receive the chosen item.
 
std::pair< Mapped< std::shared_ptr< Kakshya::PlotContainer > >, Surface > plot (std::string title, uint32_t width, uint32_t height, std::shared_ptr< Kakshya::PlotContainer > container, Plot::SeriesSpec spec)
 Create a live plot in a new window.
 
glm::uvec2 row_pixel_dims (const std::shared_ptr< Core::Window > &window, float x_min, float x_max, float row_h)
 Convert an NDC row rect into integer pixel dimensions.
 
void shutdown ()
 Release stored references.
 

Variables

constexpr float k_inspect_indent = 0.03F