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

A component the backend may load (spec 5 §10), with the built-in nodes shown when it does not. More...

#include <view.hpp>

Public Attributes

std::string name
 The component's name, as the document's components declares it.
Node fallback
 The built-in nodes shown in its place; never null.
std::vector< CustomProp > props
 The props a loaded component is given, bound as any other property is.
int minVersion = 0
 The lowest version of a host component that will do.
std::function< void(std::string event, std::string payload)> onEvent
 Called with an event a loaded component raises: its name and its payload as the backend reports it.

Detailed Description

A component the backend may load (spec 5 §10), with the built-in nodes shown when it does not.

Mounted asks IViewBackend::createCustom first and mounts the fallback only when the backend loads nothing. The fallback carries its own Common.

Definition at line 1156 of file view.hpp.

Member Data Documentation

◆ name

std::string morph::ui::Custom::name

The component's name, as the document's components declares it.

Definition at line 1158 of file view.hpp.

◆ fallback

Node morph::ui::Custom::fallback

The built-in nodes shown in its place; never null.

Definition at line 1160 of file view.hpp.

◆ props

std::vector<CustomProp> morph::ui::Custom::props

The props a loaded component is given, bound as any other property is.

Definition at line 1162 of file view.hpp.

◆ minVersion

int morph::ui::Custom::minVersion = 0

The lowest version of a host component that will do.

Definition at line 1164 of file view.hpp.

◆ onEvent

std::function<void(std::string event, std::string payload)> morph::ui::Custom::onEvent

Called with an event a loaded component raises: its name and its payload as the backend reports it.

Definition at line 1166 of file view.hpp.


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