diff options
Diffstat (limited to 'include/cru/ui')
22 files changed, 2 insertions, 102 deletions
diff --git a/include/cru/ui/ThemeManager.h b/include/cru/ui/ThemeManager.h index 5e24a159..ab9efcff 100644 --- a/include/cru/ui/ThemeManager.h +++ b/include/cru/ui/ThemeManager.h @@ -15,9 +15,6 @@ class CRU_UI_API ThemeManager : public Object { ThemeManager(); public: - CRU_DELETE_COPY(ThemeManager) - CRU_DELETE_MOVE(ThemeManager) - ~ThemeManager() override; std::vector<ThemeResourceDictionary*> GetThemeResourceDictionaryList() const; diff --git a/include/cru/ui/ThemeResourceDictionary.h b/include/cru/ui/ThemeResourceDictionary.h index e7463b12..f28a61db 100644 --- a/include/cru/ui/ThemeResourceDictionary.h +++ b/include/cru/ui/ThemeResourceDictionary.h @@ -32,10 +32,6 @@ class CRU_UI_API ThemeResourceDictionary : public Object { explicit ThemeResourceDictionary(xml::XmlElementNode* xml_root, bool clone = true); - - CRU_DELETE_COPY(ThemeResourceDictionary) - CRU_DELETE_MOVE(ThemeResourceDictionary) - ~ThemeResourceDictionary() override; public: diff --git a/include/cru/ui/components/Component.h b/include/cru/ui/components/Component.h index ae742aae..d44e6728 100644 --- a/include/cru/ui/components/Component.h +++ b/include/cru/ui/components/Component.h @@ -14,10 +14,6 @@ class CRU_UI_API Component : public Object, public DeleteLaterImpl { public: Component() = default; - - CRU_DELETE_COPY(Component) - CRU_DELETE_MOVE(Component) - ~Component() = default; virtual controls::Control* GetRootControl() = 0; diff --git a/include/cru/ui/controls/Control.h b/include/cru/ui/controls/Control.h index 7301ecd8..d70854fe 100644 --- a/include/cru/ui/controls/Control.h +++ b/include/cru/ui/controls/Control.h @@ -29,10 +29,6 @@ class CRU_UI_API Control : public Object, Control(); public: - Control(const Control& other) = delete; - Control(Control&& other) = delete; - Control& operator=(const Control& other) = delete; - Control& operator=(Control&& other) = delete; ~Control() override; public: diff --git a/include/cru/ui/controls/TextHostControlService.h b/include/cru/ui/controls/TextHostControlService.h index a945e427..529225a7 100644 --- a/include/cru/ui/controls/TextHostControlService.h +++ b/include/cru/ui/controls/TextHostControlService.h @@ -30,7 +30,7 @@ struct CRU_UI_API ITextHostControl : virtual Interface { class TextHostControlService; -class TextControlMovePattern : public Object { +class TextControlMovePattern { public: static TextControlMovePattern kLeft; static TextControlMovePattern kRight; @@ -57,11 +57,6 @@ class TextControlMovePattern : public Object { key_bind_(key_bind), move_function_(move_function) {} - CRU_DEFAULT_COPY(TextControlMovePattern) - CRU_DEFAULT_MOVE(TextControlMovePattern) - - ~TextControlMovePattern() override = default; - public: std::string GetName() const { return name_; } helper::ShortcutKeyBind GetKeyBind() const { return key_bind_; } @@ -81,10 +76,6 @@ class CRU_UI_API TextHostControlService : public Object { public: TextHostControlService(Control* control); - - CRU_DELETE_COPY(TextHostControlService) - CRU_DELETE_MOVE(TextHostControlService) - ~TextHostControlService(); public: diff --git a/include/cru/ui/controls/TreeView.h b/include/cru/ui/controls/TreeView.h index dc74750a..f4938259 100644 --- a/include/cru/ui/controls/TreeView.h +++ b/include/cru/ui/controls/TreeView.h @@ -14,9 +14,6 @@ class CRU_UI_API TreeViewItem : public Object { ~TreeViewItem() override; public: - CRU_DELETE_COPY(TreeViewItem) - CRU_DELETE_MOVE(TreeViewItem) - TreeView* GetTreeView() { return tree_view_; } TreeViewItem* GetParent() { return parent_; } diff --git a/include/cru/ui/events/FocusChangeEventArgs.h b/include/cru/ui/events/FocusChangeEventArgs.h index aaef25b4..922803b9 100644 --- a/include/cru/ui/events/FocusChangeEventArgs.h +++ b/include/cru/ui/events/FocusChangeEventArgs.h @@ -8,11 +8,6 @@ class CRU_UI_API FocusChangeEventArgs : public UiEventArgs { FocusChangeEventArgs(Object* sender, Object* original_sender, const bool is_window = false) : UiEventArgs(sender, original_sender), is_window_(is_window) {} - FocusChangeEventArgs(const FocusChangeEventArgs& other) = default; - FocusChangeEventArgs(FocusChangeEventArgs&& other) = default; - FocusChangeEventArgs& operator=(const FocusChangeEventArgs& other) = default; - FocusChangeEventArgs& operator=(FocusChangeEventArgs&& other) = default; - ~FocusChangeEventArgs() override = default; // Return whether the focus change is caused by the window-wide focus change. bool IsWindow() const { return is_window_; } diff --git a/include/cru/ui/events/KeyEventArgs.h b/include/cru/ui/events/KeyEventArgs.h index bf6c8c0f..b0d6b769 100644 --- a/include/cru/ui/events/KeyEventArgs.h +++ b/include/cru/ui/events/KeyEventArgs.h @@ -12,11 +12,6 @@ class CRU_UI_API KeyEventArgs : public UiEventArgs { : UiEventArgs(sender, original_sender), key_code_(key_code), key_modifier_(key_modifier) {} - KeyEventArgs(const KeyEventArgs& other) = default; - KeyEventArgs(KeyEventArgs&& other) = default; - KeyEventArgs& operator=(const KeyEventArgs& other) = default; - KeyEventArgs& operator=(KeyEventArgs&& other) = default; - ~KeyEventArgs() override = default; platform::gui::KeyCode GetKeyCode() const { return key_code_; } platform::gui::KeyModifier GetKeyModifier() const { return key_modifier_; } diff --git a/include/cru/ui/events/MouseButtonEventArgs.h b/include/cru/ui/events/MouseButtonEventArgs.h index 57a84cfb..99e95020 100644 --- a/include/cru/ui/events/MouseButtonEventArgs.h +++ b/include/cru/ui/events/MouseButtonEventArgs.h @@ -20,11 +20,6 @@ class CRU_UI_API MouseButtonEventArgs : public MouseEventArgs { : MouseEventArgs(sender, original_sender), button_(button), key_modifier_(key_modifier) {} - MouseButtonEventArgs(const MouseButtonEventArgs& other) = default; - MouseButtonEventArgs(MouseButtonEventArgs&& other) = default; - MouseButtonEventArgs& operator=(const MouseButtonEventArgs& other) = default; - MouseButtonEventArgs& operator=(MouseButtonEventArgs&& other) = default; - ~MouseButtonEventArgs() override = default; platform::gui::MouseButton GetButton() const { return button_; } platform::gui::KeyModifier GetKeyModifier() const { return key_modifier_; } diff --git a/include/cru/ui/events/MouseEventArgs.h b/include/cru/ui/events/MouseEventArgs.h index 1320002d..081b3a6d 100644 --- a/include/cru/ui/events/MouseEventArgs.h +++ b/include/cru/ui/events/MouseEventArgs.h @@ -11,11 +11,6 @@ class CRU_UI_API MouseEventArgs : public UiEventArgs { MouseEventArgs(Object* sender, Object* original_sender, const std::optional<Point>& point = std::nullopt) : UiEventArgs(sender, original_sender), point_(point) {} - MouseEventArgs(const MouseEventArgs& other) = default; - MouseEventArgs(MouseEventArgs&& other) = default; - MouseEventArgs& operator=(const MouseEventArgs& other) = default; - MouseEventArgs& operator=(MouseEventArgs&& other) = default; - ~MouseEventArgs() override = default; // This point is relative to window client lefttop. Point GetPoint() const { return point_.value_or(Point{}); } diff --git a/include/cru/ui/events/MouseWheelEventArgs.h b/include/cru/ui/events/MouseWheelEventArgs.h index 9ed63924..3287122c 100644 --- a/include/cru/ui/events/MouseWheelEventArgs.h +++ b/include/cru/ui/events/MouseWheelEventArgs.h @@ -12,11 +12,6 @@ class CRU_UI_API MouseWheelEventArgs : public MouseEventArgs { : MouseEventArgs(sender, original_sender, point), delta_(delta), key_modifier_(key_modifier) {} - MouseWheelEventArgs(const MouseWheelEventArgs& other) = default; - MouseWheelEventArgs(MouseWheelEventArgs&& other) = default; - MouseWheelEventArgs& operator=(const MouseWheelEventArgs& other) = default; - MouseWheelEventArgs& operator=(MouseWheelEventArgs&& other) = default; - ~MouseWheelEventArgs() override = default; // Positive means down; Negative means up. float GetDelta() const { return delta_; } diff --git a/include/cru/ui/events/PaintEventArgs.h b/include/cru/ui/events/PaintEventArgs.h index 934c6c8c..823bb222 100644 --- a/include/cru/ui/events/PaintEventArgs.h +++ b/include/cru/ui/events/PaintEventArgs.h @@ -11,11 +11,6 @@ class CRU_UI_API PaintEventArgs : public UiEventArgs { PaintEventArgs(Object* sender, Object* original_sender, platform::graphics::IPainter* painter) : UiEventArgs(sender, original_sender), painter_(painter) {} - PaintEventArgs(const PaintEventArgs& other) = default; - PaintEventArgs(PaintEventArgs&& other) = default; - PaintEventArgs& operator=(const PaintEventArgs& other) = default; - PaintEventArgs& operator=(PaintEventArgs&& other) = default; - ~PaintEventArgs() = default; platform::graphics::IPainter* GetPainter() const { return painter_; } diff --git a/include/cru/ui/events/UiEventArgs.h b/include/cru/ui/events/UiEventArgs.h index fff84edd..bf8937ca 100644 --- a/include/cru/ui/events/UiEventArgs.h +++ b/include/cru/ui/events/UiEventArgs.h @@ -7,12 +7,6 @@ class CRU_UI_API UiEventArgs : public Object { UiEventArgs(Object* sender, Object* original_sender) : sender_(sender), original_sender_(original_sender), handled_(false) {} - UiEventArgs(const UiEventArgs& other) = default; - UiEventArgs(UiEventArgs&& other) = default; - UiEventArgs& operator=(const UiEventArgs& other) = default; - UiEventArgs& operator=(UiEventArgs&& other) = default; - ~UiEventArgs() override = default; - Object* GetSender() const { return sender_; } Object* GetOriginalSender() const { return original_sender_; } diff --git a/include/cru/ui/helper/ClickDetector.h b/include/cru/ui/helper/ClickDetector.h index b83f0e20..037b015e 100644 --- a/include/cru/ui/helper/ClickDetector.h +++ b/include/cru/ui/helper/ClickDetector.h @@ -45,10 +45,6 @@ class ClickDetector : public Object { public: explicit ClickDetector(controls::Control* control); - - CRU_DELETE_COPY(ClickDetector) - CRU_DELETE_MOVE(ClickDetector) - ~ClickDetector() override = default; controls::Control* GetControl() const { return control_; } diff --git a/include/cru/ui/helper/ShortcutHub.h b/include/cru/ui/helper/ShortcutHub.h index a5973ab5..d2c9952b 100644 --- a/include/cru/ui/helper/ShortcutHub.h +++ b/include/cru/ui/helper/ShortcutHub.h @@ -97,10 +97,6 @@ class CRU_UI_API ShortcutHub : public Object { CRU_DEFINE_CLASS_LOG_TAG("ShortcutHub") public: ShortcutHub() = default; - - CRU_DELETE_COPY(ShortcutHub) - CRU_DELETE_MOVE(ShortcutHub) - ~ShortcutHub() override = default; int RegisterShortcut(std::string name, ShortcutKeyBind bind, diff --git a/include/cru/ui/host/WindowHost.h b/include/cru/ui/host/WindowHost.h index e2391125..6e7a0f2e 100644 --- a/include/cru/ui/host/WindowHost.h +++ b/include/cru/ui/host/WindowHost.h @@ -31,10 +31,6 @@ class CRU_UI_API WindowHost : public Object, public SelfResolvable<WindowHost> { public: explicit WindowHost(controls::Control* root_control); - - CRU_DELETE_COPY(WindowHost) - CRU_DELETE_MOVE(WindowHost) - ~WindowHost() override; public: diff --git a/include/cru/ui/mapper/Mapper.h b/include/cru/ui/mapper/Mapper.h index 709288f5..a4507fc9 100644 --- a/include/cru/ui/mapper/Mapper.h +++ b/include/cru/ui/mapper/Mapper.h @@ -17,10 +17,6 @@ class BasicMapper; class CRU_UI_API MapperBase : public Object { public: explicit MapperBase(std::type_index type_index); - - CRU_DELETE_COPY(MapperBase) - CRU_DELETE_MOVE(MapperBase) - ~MapperBase() override = default; public: diff --git a/include/cru/ui/render/RenderObject.h b/include/cru/ui/render/RenderObject.h index 266045e3..34761b51 100644 --- a/include/cru/ui/render/RenderObject.h +++ b/include/cru/ui/render/RenderObject.h @@ -66,8 +66,6 @@ class CRU_UI_API RenderObject : public Object { RenderObject() = default; public: - CRU_DELETE_COPY(RenderObject) - CRU_DELETE_MOVE(RenderObject) ~RenderObject() override = default; controls::Control* GetAttachedControl() const { return control_; } diff --git a/include/cru/ui/render/ScrollBar.h b/include/cru/ui/render/ScrollBar.h index fbe14244..8c531489 100644 --- a/include/cru/ui/render/ScrollBar.h +++ b/include/cru/ui/render/ScrollBar.h @@ -45,10 +45,6 @@ std::string CRU_UI_API GenerateScrollBarThemeColorKey(ScrollBarBrushUsageKind us class CRU_UI_API ScrollBar : public Object { public: ScrollBar(ScrollRenderObject* render_object, Direction direction); - - CRU_DELETE_COPY(ScrollBar) - CRU_DELETE_MOVE(ScrollBar) - ~ScrollBar() override; public: @@ -213,10 +209,6 @@ class CRU_UI_API VerticalScrollBar : public ScrollBar { class CRU_UI_API ScrollBarDelegate : public Object { public: explicit ScrollBarDelegate(ScrollRenderObject* render_object); - - CRU_DELETE_COPY(ScrollBarDelegate) - CRU_DELETE_MOVE(ScrollBarDelegate) - ~ScrollBarDelegate() override = default; public: diff --git a/include/cru/ui/render/TreeRenderObject.h b/include/cru/ui/render/TreeRenderObject.h index 9cb8581e..de6e6f9b 100644 --- a/include/cru/ui/render/TreeRenderObject.h +++ b/include/cru/ui/render/TreeRenderObject.h @@ -13,8 +13,6 @@ class CRU_UI_API TreeRenderObjectItem : public Object { TreeRenderObjectItem* parent); public: - CRU_DELETE_COPY(TreeRenderObjectItem) - CRU_DELETE_MOVE(TreeRenderObjectItem) ~TreeRenderObjectItem() override; RenderObject* GetRenderObject() { return render_object_; } diff --git a/include/cru/ui/style/StyleRule.h b/include/cru/ui/style/StyleRule.h index e7f4d390..382cd664 100644 --- a/include/cru/ui/style/StyleRule.h +++ b/include/cru/ui/style/StyleRule.h @@ -9,7 +9,7 @@ namespace cru::ui::style { * \brief An immutable style rule contains a condition and a styler. * \remarks This class is immutable and has value semantics. */ -class CRU_UI_API StyleRule : public Object { +class CRU_UI_API StyleRule { public: static ClonablePtr<StyleRule> Create(ClonablePtr<Condition> condition, ClonablePtr<Styler> styler, @@ -21,11 +21,6 @@ class CRU_UI_API StyleRule : public Object { StyleRule(ClonablePtr<Condition> condition, ClonablePtr<Styler> styler, std::string name = {}); - CRU_DEFAULT_COPY(StyleRule) - CRU_DEFAULT_MOVE(StyleRule) - - ~StyleRule() override = default; - public: std::string GetName() const { return name_; } Condition* GetCondition() const { return condition_.get(); } diff --git a/include/cru/ui/style/StyleRuleSet.h b/include/cru/ui/style/StyleRuleSet.h index fae9ab5f..0b7a237d 100644 --- a/include/cru/ui/style/StyleRuleSet.h +++ b/include/cru/ui/style/StyleRuleSet.h @@ -17,10 +17,6 @@ class CRU_UI_API StyleRuleSet : public Object, public model::IListChangeNotify { public: StyleRuleSet() = default; explicit StyleRuleSet(std::shared_ptr<StyleRuleSet> parent); - - CRU_DELETE_COPY(StyleRuleSet) - CRU_DELETE_MOVE(StyleRuleSet) - ~StyleRuleSet() override = default; public: |
