diff options
author | crupest <crupest@outlook.com> | 2022-05-15 14:15:31 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-05-15 14:15:31 +0800 |
commit | 34a64e6ffefaab007578932ddbab931a25f1d56e (patch) | |
tree | 541fdb8279e829a129df62288d09916bf23c9200 /src/ThemeBuilder/components/conditions/ClickStateConditionEditor.h | |
parent | 8ad2966933957ac5d6ff8dcd5e732736fd5e4dc6 (diff) | |
download | cru-34a64e6ffefaab007578932ddbab931a25f1d56e.tar.gz cru-34a64e6ffefaab007578932ddbab931a25f1d56e.tar.bz2 cru-34a64e6ffefaab007578932ddbab931a25f1d56e.zip |
...
Diffstat (limited to 'src/ThemeBuilder/components/conditions/ClickStateConditionEditor.h')
-rw-r--r-- | src/ThemeBuilder/components/conditions/ClickStateConditionEditor.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/ThemeBuilder/components/conditions/ClickStateConditionEditor.h b/src/ThemeBuilder/components/conditions/ClickStateConditionEditor.h new file mode 100644 index 00000000..454a1346 --- /dev/null +++ b/src/ThemeBuilder/components/conditions/ClickStateConditionEditor.h @@ -0,0 +1,30 @@ +#pragma once +#include "../properties/SelectPropertyEditor.h" +#include "ConditionEditor.h" +#include "cru/common/ClonablePtr.h" +#include "cru/common/Event.h" +#include "cru/ui/style/Condition.h" + +namespace cru::theme_builder::components::conditions { +class ClickStateConditionEditor : public ConditionEditor { + public: + ClickStateConditionEditor(); + ~ClickStateConditionEditor(); + + public: + ClonablePtr<ui::style::ClickStateCondition> GetValue() const; + void SetValue(ui::style::ClickStateCondition* value, + bool trigger_change = true); + void SetValue(const ClonablePtr<ui::style::ClickStateCondition>& value, + bool trigger_change = true) { + SetValue(value.get(), trigger_change); + } + + ClonablePtr<ui::style::Condition> GetCondition() override { + return GetValue(); + } + + private: + properties::SelectPropertyEditor click_state_select_; +}; +} // namespace cru::theme_builder::components::conditions |