31 if constexpr(std::is_same_v<menu_button, T>) {
32 return w.get_value_string();
36 if constexpr(std::is_base_of_v<selectable_item, T>) {
37 return w.get_value_bool() ?
_(
"yes") :
_(
"no");
41 if constexpr(std::is_same_v<slider, T>) {
42 return w.get_value_label();
67 const std::string& source_id,
68 const std::function<
t_string(
const W&)> value_getter = default_status_value_getter<W>,
69 const std::string& label_id =
"")
72 const std::string label_id_ = label_id.empty() ? source_id +
"_label" : label_id;
75 W& source = find_widget<W>(find_in, source_id,
false);
80 const auto update_label = [&, value_getter]() {
static std::string _(const char *str)
void connect_signal_notify_modified(dispatcher &dispatcher, const signal_notification &signal)
Connects a signal handler for getting a notification upon modification.
t_string default_status_value_getter(const T &w)
std::function< void()> bind_status_label(widget *find_in, const std::string &source_id, const std::function< t_string(const W &)> value_getter=default_status_value_getter< W >, const std::string &label_id="")
Creates a bound status label that will reflect the label state of a widget.