morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::views::ActionDescriptor Struct Reference

One action a view screen can fire — the row opener (v-rowAction) or an entry of v-actions. More...

#include <views.hpp>

Public Attributes

std::string_view actionTypeId
 Registered type id of the target action.
std::string_view label {}
 Button label. Empty means "use the action type id as-is".
ActionScope scope {ActionScope::Row}
 Row button vs. collection-wide button.
std::span< const BindEntry > bind {}
 Field-name mapping applied to prefill the target action's draft from the activating row. Empty for an action that needs no row context (e.g. a collection-scope "create").
bool confirm {false}
 Whether a renderer must confirm before firing this action.

Detailed Description

One action a view screen can fire — the row opener (v-rowAction) or an entry of v-actions.

Always built by describeAction<Action>(...), never constructed by hand, so actionTypeId always reflects a real, registered ActionTraits<Action>::typeId() rather than a hand-typed, unchecked string (contrast morph::forms::Choice's OptionsAction NTTP, which is an unchecked string — see docs/spec/forms/choice.md, "Limitations").

Definition at line 57 of file views.hpp.

Member Data Documentation

◆ actionTypeId

std::string_view morph::views::ActionDescriptor::actionTypeId

Registered type id of the target action.

Definition at line 59 of file views.hpp.

◆ label

std::string_view morph::views::ActionDescriptor::label {}

Button label. Empty means "use the action type id as-is".

Definition at line 61 of file views.hpp.

◆ scope

ActionScope morph::views::ActionDescriptor::scope {ActionScope::Row}

Row button vs. collection-wide button.

Definition at line 63 of file views.hpp.

◆ bind

std::span<const BindEntry> morph::views::ActionDescriptor::bind {}

Field-name mapping applied to prefill the target action's draft from the activating row. Empty for an action that needs no row context (e.g. a collection-scope "create").

Definition at line 67 of file views.hpp.

◆ confirm

bool morph::views::ActionDescriptor::confirm {false}

Whether a renderer must confirm before firing this action.

Definition at line 69 of file views.hpp.


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