|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
A choice of one option. More...
#include <view.hpp>
Public Attributes | |
| Prop< std::vector< SelectOption > > | options |
| The options, in order. | |
| Prop< std::optional< Key > > | selected |
| The selected key, or none. A key outside options shows no selection. | |
| std::function< void(Key)> | onSelect |
| Called with the key the user chose. | |
| Action | onOpen |
| Called when the user opens the dropdown, whether or not it has options to show; a radio group is never opened. A hint, such as retrying a fetch of the options that failed: a backend may not report it. | |
| SelectStyle | style = SelectStyle::Dropdown |
| Dropdown or radio; set once. | |
| Prop< std::string > | label |
| The field's label: its visible caption while showLabel; a form's cell draws it otherwise, beside the input. Empty: none. | |
| bool | showLabel = false |
| Whether the input draws label as a visible caption itself; set once. A form leaves it false, since its cell draws the caption. | |
| FieldState | field {} |
| Read-only, required, errors and stale. | |
| Common | common {} |
| Visibility, enablement, layout, drag-and-drop. | |
| Prop<std::vector<SelectOption> > morph::ui::Select::options |
| std::function<void(Key)> morph::ui::Select::onSelect |
| Action morph::ui::Select::onOpen |
| SelectStyle morph::ui::Select::style = SelectStyle::Dropdown |
| Prop<std::string> morph::ui::Select::label |
| bool morph::ui::Select::showLabel = false |
| FieldState morph::ui::Select::field {} |
| Common morph::ui::Select::common {} |