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

A titled section the user opens and closes. Its header stays usable while it is closed. More...

#include <view.hpp>

Public Attributes

Prop< std::string > title
 The title.
Prop< bool > open = true
 Whether the content is shown.
std::function< void(bool)> onToggle
 Called with the state the user asked for.
Node header
 Shown beside the title, open or closed; may be null.
Node child
 The content; may be null. Mounted once, and hidden while closed.
Common common {}
 Visibility, enablement, layout, drag-and-drop.

Detailed Description

A titled section the user opens and closes. Its header stays usable while it is closed.

Definition at line 1112 of file view.hpp.

Member Data Documentation

◆ title

Prop<std::string> morph::ui::Collapsible::title

The title.

Definition at line 1114 of file view.hpp.

◆ open

Prop<bool> morph::ui::Collapsible::open = true

Whether the content is shown.

Definition at line 1116 of file view.hpp.

◆ onToggle

std::function<void(bool)> morph::ui::Collapsible::onToggle

Called with the state the user asked for.

Definition at line 1118 of file view.hpp.

◆ header

Node morph::ui::Collapsible::header

Shown beside the title, open or closed; may be null.

Definition at line 1120 of file view.hpp.

◆ child

Node morph::ui::Collapsible::child

The content; may be null. Mounted once, and hidden while closed.

Definition at line 1122 of file view.hpp.

◆ common

Common morph::ui::Collapsible::common {}

Visibility, enablement, layout, drag-and-drop.

Definition at line 1124 of file view.hpp.


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