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

A titled frame around one child; a collapsible one is an accordion section. More...

#include <view.hpp>

Public Attributes

Prop< std::string > title
 The title.
Node header
 Shown beside the title, collapsed or not; may be null.
int padding = 0
 Space between frame and child: a spacing step, 0 to kMaxSpacingStep.
Node child
 The content; may be null.
bool collapsible = false
 Whether the user can collapse it; set once.
Prop< bool > collapsed = false
 Whether it is collapsed; used only when collapsible.
std::function< void(bool)> onToggle
 Called with the collapsed state the user asked for; used only when collapsible.
Common common {}
 Visibility, enablement, layout, drag-and-drop.

Detailed Description

A titled frame around one child; a collapsible one is an accordion section.

Definition at line 624 of file view.hpp.

Member Data Documentation

◆ title

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

The title.

Definition at line 626 of file view.hpp.

◆ header

Node morph::ui::Panel::header

Shown beside the title, collapsed or not; may be null.

Definition at line 628 of file view.hpp.

◆ padding

int morph::ui::Panel::padding = 0

Space between frame and child: a spacing step, 0 to kMaxSpacingStep.

Definition at line 630 of file view.hpp.

◆ child

Node morph::ui::Panel::child

The content; may be null.

Definition at line 632 of file view.hpp.

◆ collapsible

bool morph::ui::Panel::collapsible = false

Whether the user can collapse it; set once.

Definition at line 634 of file view.hpp.

◆ collapsed

Prop<bool> morph::ui::Panel::collapsed = false

Whether it is collapsed; used only when collapsible.

Definition at line 636 of file view.hpp.

◆ onToggle

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

Called with the collapsed state the user asked for; used only when collapsible.

Definition at line 638 of file view.hpp.

◆ common

Common morph::ui::Panel::common {}

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

Definition at line 640 of file view.hpp.


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