Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
portals::ui::ct::Element< T, Id, N, Children > Class Template Reference

Immutable-through-accessors static node; no live widgets, models, slots or callbacks. More...

#include <ui_static.hpp>

Public Types

using WidgetType = T
 Existing widget type instantiated only at runtime mount.

Public Member Functions

constexpr std::string_view text () const noexcept
constexpr ControlStyle style () const
constexpr SizePolicy sizePolicy () const
constexpr LinearOptions linearOptions () const
constexpr EditMode editMode () const
constexpr const std::tuple< Children... > & children () const noexcept

Static Public Attributes

static constexpr auto ID = Id
 Owning static identity; empty means unnamed.
static constexpr std::size_t NODE_COUNT = 1 + (Children::NODE_COUNT + ... + 0)
 Complete subtree node count.

Friends

struct detail::Access

Detailed Description

template<class T, Literal Id, std::size_t N, class... Children>
class portals::ui::ct::Element< T, Id, N, Children >

Immutable-through-accessors static node; no live widgets, models, slots or callbacks.

Template Parameters
TExisting Label, Button, LineEdit, Row or Column widget type.
IdOptional owning style/adapter identity; nonempty identities must be unique in a scene.
NOwned caption array extent including the terminator; containers use one empty byte.
ChildrenStatic Element types stored by value in insertion order. Construct only through the consteval factories. Copies own all text and child storage.

Member Function Documentation

◆ children()

template<class T, Literal Id, std::size_t N, class... Children>
const std::tuple< Children... > & portals::ui::ct::Element< T, Id, N, Children >::children ( ) const
inlineconstexprnoexcept
Returns
Children borrowed from this value, in the runtime mount order.

◆ editMode()

template<class T, Literal Id, std::size_t N, class... Children>
EditMode portals::ui::ct::Element< T, Id, N, Children >::editMode ( ) const
inlineconstexpr
Returns
Existing editor confirmation policy; relevant only for LineEdit.

◆ linearOptions()

template<class T, Literal Id, std::size_t N, class... Children>
LinearOptions portals::ui::ct::Element< T, Id, N, Children >::linearOptions ( ) const
inlineconstexpr
Returns
Validated linear options; relevant only for Row and Column.

◆ sizePolicy()

template<class T, Literal Id, std::size_t N, class... Children>
SizePolicy portals::ui::ct::Element< T, Id, N, Children >::sizePolicy ( ) const
inlineconstexpr
Returns
Validated owning size constraints, in terminal cells.

◆ style()

template<class T, Literal Id, std::size_t N, class... Children>
ControlStyle portals::ui::ct::Element< T, Id, N, Children >::style ( ) const
inlineconstexpr
Returns
Owning manual appearances copied into the runtime recipe.

◆ text()

template<class T, Literal Id, std::size_t N, class... Children>
std::string_view portals::ui::ct::Element< T, Id, N, Children >::text ( ) const
inlineconstexprnoexcept
Returns
Byte view borrowing this node; UTF-8 conversion is deferred to mount.

The documentation for this class was generated from the following file: