aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/components/Component.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-02-10 23:37:38 +0800
committercrupest <crupest@outlook.com>2022-02-10 23:37:38 +0800
commit382d42802221941e24e672743d03e7adcb544f94 (patch)
treecce2a16646c289f66270e61a0b0533764049ceaf /include/cru/ui/components/Component.h
parentf65d0502a9f0fc44be0dd79a5f3f31697bb3aad0 (diff)
downloadcru-382d42802221941e24e672743d03e7adcb544f94.tar.gz
cru-382d42802221941e24e672743d03e7adcb544f94.tar.bz2
cru-382d42802221941e24e672743d03e7adcb544f94.zip
...
Diffstat (limited to 'include/cru/ui/components/Component.h')
-rw-r--r--include/cru/ui/components/Component.h9
1 files changed, 5 insertions, 4 deletions
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