diff options
author | crupest <crupest@outlook.com> | 2022-02-16 23:41:28 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-02-16 23:41:28 +0800 |
commit | 77e0fd5cf7dd35324a7c3a43f2004fb923c6254c (patch) | |
tree | 0d66fd74fa61bb680ac0ae35c9faa4e5d853f295 /include/cru/ui | |
parent | 9307bd1af7c52aaf9c6d25b598bf3069a63c32a1 (diff) | |
download | cru-77e0fd5cf7dd35324a7c3a43f2004fb923c6254c.tar.gz cru-77e0fd5cf7dd35324a7c3a43f2004fb923c6254c.tar.bz2 cru-77e0fd5cf7dd35324a7c3a43f2004fb923c6254c.zip |
...
Diffstat (limited to 'include/cru/ui')
-rw-r--r-- | include/cru/ui/components/Component.h | 5 | ||||
-rw-r--r-- | include/cru/ui/controls/Control.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/include/cru/ui/components/Component.h b/include/cru/ui/components/Component.h index 795d0db0..64c3ef47 100644 --- a/include/cru/ui/components/Component.h +++ b/include/cru/ui/components/Component.h @@ -4,9 +4,8 @@ namespace cru::ui::components { /** * \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. + * \remarks Component should respect children's Component::IsDeleteByParent + * value and decide whether to delete it. */ class CRU_UI_API Component : public Object { public: diff --git a/include/cru/ui/controls/Control.h b/include/cru/ui/controls/Control.h index 4dad4549..3293969d 100644 --- a/include/cru/ui/controls/Control.h +++ b/include/cru/ui/controls/Control.h @@ -157,6 +157,8 @@ class CRU_UI_API Control : public Object { host::WindowHost* new_host); private: + bool in_destruction_ = false; + Control* parent_ = nullptr; host::WindowHost* window_host_ = nullptr; |