From 382d42802221941e24e672743d03e7adcb544f94 Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 10 Feb 2022 23:37:38 +0800 Subject: ... --- include/cru/ui/components/Component.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'include/cru/ui/components') diff --git a/include/cru/ui/components/Component.h b/include/cru/ui/components/Component.h index 8861f30b..795d0db0 100644 --- a/include/cru/ui/components/Component.h +++ b/include/cru/ui/components/Component.h @@ -3,9 +3,10 @@ namespace cru::ui::components { /** - * \remarks In destructor, component should first delete all child components - * and then remove root control from its parent (by calling - * Control::RemoveFromParent). Then delete all its root control. + * \brief A component is a composition of controls. + * \remarks In destructor, component should remove root control from its parent + * by calling Control::RemoveFromParent. It should respect children's + * Component::IsDeleteByParent value and decide whether to delete it. */ class CRU_UI_API Component : public Object { public: @@ -27,6 +28,6 @@ class CRU_UI_API Component : public Object { } private: - bool delete_by_parent_; + bool delete_by_parent_ = false; }; } // namespace cru::ui::components -- cgit v1.2.3