morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
collection.hpp File Reference

Collections, headless: a v-* view document as a reactive list of rows, the table source the table engine sorts and filters, row and collection actions, the confirm step and the row editor. More...

#include <algorithm>
#include <cstddef>
#include <cstdint>
#include <exception>
#include <expected>
#include <functional>
#include <memory>
#include <optional>
#include <span>
#include <stdexcept>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include "../../attributes.hpp"
#include "../../core/completion.hpp"
#include "../../reactive/control.hpp"
#include "../../reactive/runtime.hpp"
#include "../../reactive/signal.hpp"
#include "../../table/data_source.hpp"
#include "../../util/rational.hpp"
#include "detail/text.hpp"
#include "field_model.hpp"
#include "form_session.hpp"
#include "rules.hpp"

Go to the source code of this file.

Classes

struct  morph::forms::CollectionColumn
 One v-columns entry. More...
struct  morph::forms::CollectionAction
 One v-rowAction or v-actions entry. More...
class  morph::forms::CollectionModel
 The immutable model of a v-* view document. More...
struct  morph::forms::CollectionRow
 One listed row. More...
struct  morph::forms::PendingConfirm
 A confirm-guarded action waiting for an answer. More...
class  morph::forms::CollectionSession
 The reactive state of one collection: the list, the table source, the actions, the confirm step and the row editor. A controller in the sense of docs/spec/reactive/control.md; it draws nothing. More...

Typedefs

using morph::forms::SchemaLookup = std::function<std::optional<std::string>(std::string_view actionType)>
 Finds an action's schema JSON by its type id (a registry, a map, a served catalog).

Enumerations

enum class  morph::forms::CollectionKind : std::uint8_t { Collection , MasterDetail }
 How a collection presents its row editor. More...
enum class  morph::forms::CollectionActionScope : std::uint8_t { Row , Collection }
 Where an action's button sits. More...

Detailed Description

Collections, headless: a v-* view document as a reactive list of rows, the table source the table engine sorts and filters, row and collection actions, the confirm step and the row editor.

Specified in docs/spec/forms/engine.md, "Collections".

Definition in file collection.hpp.

Typedef Documentation

◆ SchemaLookup

using morph::forms::SchemaLookup = std::function<std::optional<std::string>(std::string_view actionType)>

Finds an action's schema JSON by its type id (a registry, a map, a served catalog).

Definition at line 83 of file collection.hpp.

Enumeration Type Documentation

◆ CollectionKind

enum class morph::forms::CollectionKind : std::uint8_t
strong

How a collection presents its row editor.

Enumerator
Collection 

v-kind: collection: the editor is a dialog.

MasterDetail 

v-kind: master-detail: the editor sits beside the table.

Definition at line 41 of file collection.hpp.

◆ CollectionActionScope

enum class morph::forms::CollectionActionScope : std::uint8_t
strong

Where an action's button sits.

Enumerator
Row 

On every row; the body is built from the row's bind entries.

Collection 

Once, beside the title; the body is {}.

Definition at line 47 of file collection.hpp.