#include <hikogui/widgets/selection_delegate.hpp>
|
|
using | notifier_type = notifier<> |
| |
|
using | callback_token = notifier_type::callback_token |
| |
|
using | callback_proto = notifier_type::callback_proto |
| |
|
|
virtual void | init (widget &sender) noexcept |
| |
|
virtual void | deinit (widget &sender) noexcept |
| |
| virtual void | set_selected (widget &sender, ssize_t index) noexcept |
| | Called when an option is selected by the user.
|
| |
| virtual std::pair< std::vector< label >, ssize_t > | options_and_selected (widget const &sender) const noexcept |
| | Retrieve the label of an option.
|
| |
| callback_token | subscribe (forward_of< callback_proto > auto &&callback, callback_flags flags=callback_flags::synchronous) noexcept |
| | Subscribe a callback for notifying the widget of a data change.
|
| |
A delegate that controls the state of a selection_widget.
◆ options_and_selected()
◆ set_selected()
| virtual void hi::v1::selection_delegate::set_selected |
( |
widget & | sender, |
|
|
ssize_t | index ) |
|
inlinevirtualnoexcept |
Called when an option is selected by the user.
- Parameters
-
| sender | The widget that called this function. |
| index | The index of the option selected, -1 if no option is selected. |
◆ subscribe()
| callback_token hi::v1::selection_delegate::subscribe |
( |
forward_of< callback_proto > auto && | callback, |
|
|
callback_flags | flags = callback_flags::synchronous ) |
|
inlinenoexcept |
Subscribe a callback for notifying the widget of a data change.
The documentation for this class was generated from the following file: