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

Replacements for the parts of a collection view a host draws from its own UI kit. Each one left empty keeps the built-in part. More...

#include <collection_view.hpp>

Public Attributes

std::function< ui::Node(CollectionSession &)> header
 Replaces the title and the collection actions' buttons. Called once, with the session, whose model gives the title, columns and actions and whose fire runs one.
std::function< ui::Node(CollectionSession &, reactive::Signal< CollectionRow > const &)> row
 Replaces each row's cells and buttons: the rows are then a list of these nodes rather than a table. Called once per row mounted, with the session and the row's signal (read it inside bindings).
std::function< ui::Node(CollectionSession &)> confirm
 Replaces the confirm dialog: mounted while an action waits for confirmation, unmounted once it is answered. Called with the session, whose pendingConfirm, confirm and cancelConfirm it uses.
std::function< ui::Node(CollectionSession &, ui::Node editor)> editor
 Replaces the editor dialog of a collection view; it is always mounted, and shows the editor while openRow() is engaged. Called once with the session and the editor's form view, which it places. A master-detail view has no dialog and does not call it.

Detailed Description

Replacements for the parts of a collection view a host draws from its own UI kit. Each one left empty keeps the built-in part.

Definition at line 32 of file collection_view.hpp.

Member Data Documentation

◆ header

std::function<ui::Node(CollectionSession&)> morph::forms::CollectionChrome::header

Replaces the title and the collection actions' buttons. Called once, with the session, whose model gives the title, columns and actions and whose fire runs one.

Definition at line 35 of file collection_view.hpp.

◆ row

std::function<ui::Node(CollectionSession&, reactive::Signal<CollectionRow> const&)> morph::forms::CollectionChrome::row

Replaces each row's cells and buttons: the rows are then a list of these nodes rather than a table. Called once per row mounted, with the session and the row's signal (read it inside bindings).

Definition at line 38 of file collection_view.hpp.

◆ confirm

std::function<ui::Node(CollectionSession&)> morph::forms::CollectionChrome::confirm

Replaces the confirm dialog: mounted while an action waits for confirmation, unmounted once it is answered. Called with the session, whose pendingConfirm, confirm and cancelConfirm it uses.

Definition at line 41 of file collection_view.hpp.

◆ editor

std::function<ui::Node(CollectionSession&, ui::Node editor)> morph::forms::CollectionChrome::editor

Replaces the editor dialog of a collection view; it is always mounted, and shows the editor while openRow() is engaged. Called once with the session and the editor's form view, which it places. A master-detail view has no dialog and does not call it.

Definition at line 45 of file collection_view.hpp.


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