|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
Handle returned by Layer::add, carrying the assigned element id. More...
#include <Layer.hpp>
Collaboration diagram for MayaFlux::Portal::Forma::Layer::Slot:Public Member Functions | |
| Slot & | hidden () |
| Hide this element immediately after registration. | |
| uint32_t | id () const noexcept |
| Explicit id accessor, for clarity in chained expressions. | |
| Slot & | non_interactive () |
| Disable hit testing for this element immediately. | |
| operator uint32_t () const noexcept | |
| Implicit conversion to the element id. | |
| Slot & | relate_to (uint32_t primary_id) |
Record that this element belongs with primary_id. | |
| Slot (Layer &layer, uint32_t id) noexcept | |
| Slot & | to_back () |
| Move to the bottom of the hit-test order (drawn first, hit last). | |
| Slot & | to_front () |
| Move to the top of the hit-test order (drawn last, hit first). | |
Private Attributes | |
| uint32_t | m_id |
| Layer & | m_layer |
Handle returned by Layer::add, carrying the assigned element id.
Provides chained post-registration mutations — relation, visibility, z-order — without requiring the caller to keep the id in a separate variable before acting on it.
Slot holds a non-owning reference to its Layer. It must not outlive the Layer. The recommended pattern is to extract the id immediately after configuration is complete and store that instead:
When the id is not needed, Slot converts implicitly to uint32_t so existing callsites (el.element.id = layer.add(...)) compile unchanged.