19 template<
typename Base>
20 struct disabled: Base {
21 template<
typename... Args>
22 disabled(Args&&... args):
23 Base(std::forward<Args>(args)...)
28 bool isStateApplicable(
AView* view)
override {
29 return Base::isStateApplicable(view) && !*view->
enabled();
33 Base::setupConnections(view, helper);
34 view->
enabled().changed.clearAllOutgoingConnectionsWith(helper.get());
Base class of all UI objects.
Definition AView.h:78
auto enabled() const
Whether view is enabled (i.e., reacts to user).
Definition AView.h:90
An std::weak_ptr with AUI extensions.
Definition SharedPtrTypes.h:179
static decltype(auto) connect(const Signal &signal, Object *object, Function &&function)
Connects signal to the slot of the specified object.
Definition AObject.h:86
#define slot(v)
Passes some variable and type of the variable separated by comma. It's convenient to use with the con...
Definition kAUI.h:88