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

A command the application registers, such as restartApp or openPath. More...

#include <host_vocabulary.hpp>

Public Attributes

std::string name
 The command's name, as {"host": name} gives it.
std::int64_t version = 1
 Its version, declared in ui-hello.
std::vector< HostArg > args
 Its arguments. An optional type makes the argument optional.
bool safeForUntrusted = false
 Whether a document that came over a connection that is not verified may run it. A command that opens files, reaches the network or touches the host is not.
std::function< void(ValueRecord const &)> run
 Runs the command with its checked arguments, by name; an absent optional argument is null.

Detailed Description

A command the application registers, such as restartApp or openPath.

Definition at line 36 of file host_vocabulary.hpp.

Member Data Documentation

◆ name

std::string morph::ui::HostCommand::name

The command's name, as {"host": name} gives it.

Definition at line 38 of file host_vocabulary.hpp.

◆ version

std::int64_t morph::ui::HostCommand::version = 1

Its version, declared in ui-hello.

Definition at line 40 of file host_vocabulary.hpp.

◆ args

std::vector<HostArg> morph::ui::HostCommand::args

Its arguments. An optional type makes the argument optional.

Definition at line 42 of file host_vocabulary.hpp.

◆ safeForUntrusted

bool morph::ui::HostCommand::safeForUntrusted = false

Whether a document that came over a connection that is not verified may run it. A command that opens files, reaches the network or touches the host is not.

Definition at line 45 of file host_vocabulary.hpp.

◆ run

std::function<void(ValueRecord const&)> morph::ui::HostCommand::run

Runs the command with its checked arguments, by name; an absent optional argument is null.

Definition at line 47 of file host_vocabulary.hpp.


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