|
template<forward_of< observer< value_type > > Value, forward_of< observer< options_type > > Options> |
| default_selection_delegate (Value &&value, Options &&options) noexcept |
| Construct a default selection delegate.
|
|
size_t | size (widget_intf const &sender) const noexcept override |
| The number of options in the pull-down menu.
|
|
std::optional< label > | selected_label (widget_intf const &sender) const noexcept override |
| Get the label of the selected option.
|
|
std::optional< widget_id > | keyboard_focus_id (widget_intf const &sender) const noexcept override |
| The id of the widget that will need to get keyboard focus when the pull-down menu is opened.
|
|
std::unique_ptr< widget > | make_option_widget (widget_intf const &sender, widget_intf const &parent, size_t index) noexcept override |
| Create a new widget that represents the button in the selection menu.
|
|
virtual void | init (widget_intf const &sender) |
|
virtual void | deinit (widget_intf const &sender) |
|
bool | empty (widget_intf const &sender) const noexcept |
|
template<forward_of< void()> Func> |
callback< void()> | subscribe_on_value (Func &&func, callback_flags flags=callback_flags::synchronous) noexcept |
| Subscribe a callback for notifying the widget of a change in the value.
|
|
template<forward_of< void()> Func> |
callback< void()> | subscribe_on_options (Func &&func, callback_flags flags=callback_flags::synchronous) noexcept |
| Subscribe a callback for notifying the widget of a change in the options.
|
|
template<typename T>
class hi::v1::default_selection_delegate< T >
A delegate that control the state of a selection_widget.
- Template Parameters
-
T | the type used as the key for which option is selected. |