diff options
author | crupest <crupest@outlook.com> | 2022-01-24 17:52:47 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-01-24 17:52:47 +0800 |
commit | 1cc6e51838fcd5fc986dbb3e13bbb85f11a348be (patch) | |
tree | 438ed0961b708139f2c3f8429052a737e0b8e334 /include/cru/ui/style/Condition.hpp | |
parent | 6d64ac7d354831b687aee1b7450d539411648888 (diff) | |
download | cru-1cc6e51838fcd5fc986dbb3e13bbb85f11a348be.tar.gz cru-1cc6e51838fcd5fc986dbb3e13bbb85f11a348be.tar.bz2 cru-1cc6e51838fcd5fc986dbb3e13bbb85f11a348be.zip |
...
Diffstat (limited to 'include/cru/ui/style/Condition.hpp')
-rw-r--r-- | include/cru/ui/style/Condition.hpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/cru/ui/style/Condition.hpp b/include/cru/ui/style/Condition.hpp index d5cf16f2..89da81f6 100644 --- a/include/cru/ui/style/Condition.hpp +++ b/include/cru/ui/style/Condition.hpp @@ -48,6 +48,11 @@ class CompoundCondition : public Condition { class AndCondition : public CompoundCondition { public: + static ClonablePtr<AndCondition> Create( + std::vector<ClonablePtr<Condition>> conditions) { + return ClonablePtr<AndCondition>(new AndCondition(std::move(conditions))); + } + using CompoundCondition::CompoundCondition; bool Judge(controls::Control* control) const override; @@ -57,6 +62,11 @@ class AndCondition : public CompoundCondition { class OrCondition : public CompoundCondition { public: + static ClonablePtr<OrCondition> Create( + std::vector<ClonablePtr<Condition>> conditions) { + return ClonablePtr<OrCondition>(new OrCondition(std::move(conditions))); + } + using CompoundCondition::CompoundCondition; bool Judge(controls::Control* control) const override; |