morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::ui::ScreenHead Class Referenceabstract

A screen's head beside its title: the subtitle, the status badges and the actions a shell shows above the screen (the document's subtitle, status and actions). More...

#include <host.hpp>

Public Member Functions

 ScreenHead (ScreenHead const &)=delete
ScreenHead & operator= (ScreenHead const &)=delete
 ScreenHead (ScreenHead &&)=delete
ScreenHead & operator= (ScreenHead &&)=delete
virtual reactive::Computed< std::string > const & subtitle () const =0
 The subtitle, as text; empty when the screen declares none.
virtual reactive::Computed< std::vector< HeadBadge > > const & status () const =0
 The status badges that are visible, in order.
virtual reactive::Computed< std::vector< HeadAction > > const & actions () const =0
 The actions that are visible, in order, each with whether it is enabled.
virtual bool run (std::string_view actionId)=0
 Runs an action's onClick as a user event in the screen scope, in one batch.

Detailed Description

A screen's head beside its title: the subtitle, the status badges and the actions a shell shows above the screen (the document's subtitle, status and actions).

Definition at line 50 of file host.hpp.

Member Function Documentation

◆ subtitle()

virtual reactive::Computed< std::string > const & morph::ui::ScreenHead::subtitle ( ) const
nodiscardpure virtual

The subtitle, as text; empty when the screen declares none.

Returns
It; it keeps its last value once the screen is closed.

◆ status()

virtual reactive::Computed< std::vector< HeadBadge > > const & morph::ui::ScreenHead::status ( ) const
nodiscardpure virtual

The status badges that are visible, in order.

Returns
They; empty once the screen is closed.

◆ actions()

virtual reactive::Computed< std::vector< HeadAction > > const & morph::ui::ScreenHead::actions ( ) const
nodiscardpure virtual

The actions that are visible, in order, each with whether it is enabled.

Returns
They; empty once the screen is closed.

◆ run()

virtual bool morph::ui::ScreenHead::run ( std::string_view actionId)
pure virtual

Runs an action's onClick as a user event in the screen scope, in one batch.

Parameters
actionIdThe action's id.
Returns
Whether it ran: false, with a diagnostic, for an id the head does not hold enabled and visible, and false for a closed screen.

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