|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
A collapsible header strip. More...
#include <Collapsible.hpp>
Collaboration diagram for MayaFlux::Portal::Forma::Collapsible:Public Member Functions | |
| MAYAFLUX_API void | attach (Layer &layer, uint32_t body_id) const |
| Relate a body element to this collapsible and sync its visibility to the current open state. | |
| Collapsible & | closed_color (glm::vec3 c) |
| Collapsible & | initially_open (bool v) |
| Collapsible & | label (std::shared_ptr< Core::VKImage > img) |
| Attach a GPU image overlaid on the header as a text label. | |
| Collapsible & | open_color (glm::vec3 c) |
| MAYAFLUX_API Collapsible & | place (std::shared_ptr< Buffers::FormaBuffer > buf, Surface &surface, LayoutCursor &cursor, float x_min, float x_max, float row_h) |
| Register the header element and wire the toggle callback. | |
Public Attributes | |
| std::shared_ptr< Buffers::FormaBuffer > | buf |
| FormaBuffer backing the header geometry. Valid after place(). | |
| LayoutCursor | cursor_out |
| Cursor positioned below the header, ready for body elements. Valid after place(). | |
| uint32_t | header_id {} |
| Element id of the header strip. Valid after place(). | |
| glm::vec3 | m_color_closed { 0.25F } |
| Background color when closed. Default: glm::vec3(0.25F). | |
| glm::vec3 | m_color_open { 0.35F } |
| Background color when open. Default: glm::vec3(0.35F). | |
| bool | m_initially_open { true } |
| Starting toggle state. Default: true (open). | |
| std::shared_ptr< Core::VKImage > | m_label |
| Optional GPU image overlaid as a text label. nullptr = color only. | |
| std::shared_ptr< MappedState< bool > > | open |
| Open/closed state. Valid after place(). Write to toggle. | |
A collapsible header strip.
Before place() is called, the struct carries only configuration. After place(), header_id, open, buf, and cursor_out are populated. This mirrors the Element pattern: configure with setters, register with a single explicit call.
Definition at line 39 of file Collapsible.hpp.