mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-09 04:15:52 +00:00
dialog: make 'click()' const wherever possible
This eases the use of, e.g., 'Select_button' as temporary variable. Issue #5008 Issue #5053
This commit is contained in:
parent
ec60011852
commit
133cbd272e
@ -354,23 +354,23 @@ struct Dialog::Hosted : Meta::Last<HIERARCHY...>::Type
|
||||
fn(narrowed); });
|
||||
}
|
||||
|
||||
template <typename... ARGS>
|
||||
void propagate(Clicked_at const &at, ARGS &&... args)
|
||||
{
|
||||
_with_narrowed_at(at, [&] (auto const &at) { this->click(at, args...); });
|
||||
}
|
||||
void propagate(Clicked_at const &at, auto &&... args) {
|
||||
_with_narrowed_at(at, [&] (auto const &at) { this->click(at, args...); }); }
|
||||
|
||||
template <typename... ARGS>
|
||||
void propagate(Clacked_at const &at, ARGS &&... args)
|
||||
{
|
||||
_with_narrowed_at(at, [&] (auto const &at) { this->clack(at, args...); });
|
||||
}
|
||||
void propagate(Clicked_at const &at, auto &&... args) const {
|
||||
_with_narrowed_at(at, [&] (auto const &at) { this->click(at, args...); }); }
|
||||
|
||||
template <typename... ARGS>
|
||||
void propagate(Dragged_at const &at, ARGS &&... args)
|
||||
{
|
||||
_with_narrowed_at(at, [&] (auto const &at) { this->drag(at, args...); });
|
||||
}
|
||||
void propagate(Clacked_at const &at, auto &&... args) {
|
||||
_with_narrowed_at(at, [&] (auto const &at) { this->clack(at, args...); }); }
|
||||
|
||||
void propagate(Clacked_at const &at, auto &&... args) const {
|
||||
_with_narrowed_at(at, [&] (auto const &at) { this->clack(at, args...); }); }
|
||||
|
||||
void propagate(Dragged_at const &at, auto &&... args) {
|
||||
_with_narrowed_at(at, [&] (auto const &at) { this->drag(at, args...); }); }
|
||||
|
||||
void propagate(Dragged_at const &at, auto &&... args) const {
|
||||
_with_narrowed_at(at, [&] (auto const &at) { this->drag(at, args...); }); }
|
||||
|
||||
/*
|
||||
* \noapi used internally by 'Scope::widget'
|
||||
|
@ -45,7 +45,7 @@ struct Dialog::Toggle_button : Widget<Button>
|
||||
}
|
||||
|
||||
template <typename FN>
|
||||
void click(Clicked_at const &, FN const &toggle_fn) { toggle_fn(); }
|
||||
void click(Clicked_at const &, FN const &toggle_fn) const { toggle_fn(); }
|
||||
};
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ struct Dialog::Select_button : Widget<Button>
|
||||
}
|
||||
|
||||
template <typename FN>
|
||||
void click(Clicked_at const &, FN const &select_fn) { select_fn(_value); }
|
||||
void click(Clicked_at const &, FN const &select_fn) const { select_fn(_value); }
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user