18#include <AUI/Common/AVector.h>
19#include <AUI/Util/kAUI.h>
30 virtual bool isPossiblyApplicable(
AView* view) = 0;
31 virtual bool isStateApplicable(
AView* view);
40 template<
typename SubSelector, std::enable_if_t<!std::is_po
inter_v<SubSelector>,
bool> = true>
41 void processSubSelector(SubSelector&& subSelector) {
42 mSubSelectors << _new<SubSelector>(std::forward<SubSelector>(subSelector));
45 template<
typename SubSelector, std::enable_if_t<std::is_po
inter_v<SubSelector>,
bool> = true>
46 void processSubSelector(SubSelector&& subSelector) {
47 mSubSelectors << _<IAssSubSelector>(subSelector);
50 template<
typename SubSelector,
typename...SubSelectors>
51 void processSubSelectors(SubSelector&& subSelector, SubSelectors&&... subSelectors) {
52 processSubSelector(std::forward<SubSelector>(subSelector));
53 processSubSelectors(std::forward<SubSelectors>(subSelectors)...);
56 void processSubSelectors() {}
59 template<
typename...SubSelectors>
61 processSubSelectors(std::forward<SubSelectors>(subSelectors)...);
70 mSubSelectors.clear();
75 bool isPossiblyApplicable(
AView* view)
const {
76 for (
const auto& s : mSubSelectors) {
77 if (s->isPossiblyApplicable(view)) {
84 bool isPossiblyApplicable(
AView* view)
override {
85 return constMe()->isPossiblyApplicable(view);
88 bool isStateApplicable(
AView* view)
const {
89 for (
const auto& s : mSubSelectors) {
90 if (s->isStateApplicable(view)) {
96 bool isStateApplicable(
AView* view)
override {
97 return constMe()->isStateApplicable(view);
101 constMe()->setupConnections(view, helper);
103 template<
typename SubSelector, std::enable_if_t<!std::is_po
inter_v<SubSelector>,
bool> = true>
104 void addSubSelector(SubSelector&& subSelector) {
105 processSubSelector(std::forward<SubSelector>(subSelector));
110 return mSubSelectors;
115 result.mSubSelectors = from.mSubSelectors;
Remember, ASS is not a butt. ASS is Aui Style Sheets.
Definition: AAssHelper.h:32
A std::vector with AUI extensions.
Definition: AVector.h:38
Base class of all UI objects.
Definition: AView.h:77
An std::weak_ptr with AUI extensions.
Definition: SharedPtrTypes.h:177
Definition: AAssSelector.h:36
Definition: AAssSelector.h:28
Definition: class_of.h:57