From 4e0b7d82cd64ef8016dcb49247a8a5e4de8a0b3d Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Sun, 16 Nov 2025 10:37:36 +0800 Subject: Rename ClonePtr, update theme. --- include/cru/ui/style/Condition.h | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'include/cru/ui/style/Condition.h') diff --git a/include/cru/ui/style/Condition.h b/include/cru/ui/style/Condition.h index 2d2dceac..e9b0e9d5 100644 --- a/include/cru/ui/style/Condition.h +++ b/include/cru/ui/style/Condition.h @@ -1,7 +1,7 @@ #pragma once #include "../Base.h" #include "cru/base/Base.h" -#include "cru/base/ClonablePtr.h" +#include "cru/base/ClonePtr.h" #include "cru/base/Event.h" #include "cru/ui/controls/IClickableControl.h" #include "cru/ui/helper/ClickDetector.h" @@ -23,8 +23,8 @@ class CRU_UI_API Condition : public Object { class CRU_UI_API NoCondition : public Condition { public: - static ClonablePtr Create() { - return ClonablePtr(new NoCondition); + static ClonePtr Create() { + return ClonePtr(new NoCondition); }; std::vector ChangeOn(controls::Control*) const override { @@ -38,23 +38,23 @@ class CRU_UI_API NoCondition : public Condition { class CRU_UI_API CompoundCondition : public Condition { public: - explicit CompoundCondition(std::vector> conditions); + explicit CompoundCondition(std::vector> conditions); std::vector ChangeOn(controls::Control* control) const override; - std::vector> GetChildren() const { + std::vector> GetChildren() const { return conditions_; } protected: - std::vector> conditions_; + std::vector> conditions_; }; class CRU_UI_API AndCondition : public CompoundCondition { public: - static ClonablePtr Create( - std::vector> conditions) { - return ClonablePtr(new AndCondition(std::move(conditions))); + static ClonePtr Create( + std::vector> conditions) { + return ClonePtr(new AndCondition(std::move(conditions))); } using CompoundCondition::CompoundCondition; @@ -66,9 +66,9 @@ class CRU_UI_API AndCondition : public CompoundCondition { class CRU_UI_API OrCondition : public CompoundCondition { public: - static ClonablePtr Create( - std::vector> conditions) { - return ClonablePtr(new OrCondition(std::move(conditions))); + static ClonePtr Create( + std::vector> conditions) { + return ClonePtr(new OrCondition(std::move(conditions))); } using CompoundCondition::CompoundCondition; @@ -80,8 +80,8 @@ class CRU_UI_API OrCondition : public CompoundCondition { class CRU_UI_API FocusCondition : public Condition { public: - static ClonablePtr Create(bool has_focus) { - return ClonablePtr(new FocusCondition(has_focus)); + static ClonePtr Create(bool has_focus) { + return ClonePtr(new FocusCondition(has_focus)); } explicit FocusCondition(bool has_focus); @@ -101,8 +101,8 @@ class CRU_UI_API FocusCondition : public Condition { class CRU_UI_API HoverCondition : public Condition { public: - static ClonablePtr Create(bool hover) { - return ClonablePtr(new HoverCondition(hover)); + static ClonePtr Create(bool hover) { + return ClonePtr(new HoverCondition(hover)); } explicit HoverCondition(bool hover) : hover_(hover) {} @@ -118,9 +118,9 @@ class CRU_UI_API HoverCondition : public Condition { class CRU_UI_API ClickStateCondition : public Condition { public: - static ClonablePtr Create( + static ClonePtr Create( helper::ClickState click_state) { - return ClonablePtr( + return ClonePtr( new ClickStateCondition(click_state)); } @@ -141,8 +141,8 @@ class CRU_UI_API ClickStateCondition : public Condition { class CRU_UI_API CheckedCondition : public Condition { public: - static ClonablePtr Create(bool checked) { - return ClonablePtr(new CheckedCondition(checked)); + static ClonePtr Create(bool checked) { + return ClonePtr(new CheckedCondition(checked)); } explicit CheckedCondition(bool checked); -- cgit v1.2.3