blob: d0525a1c700cccaccd625f4963a244ec08c28d19 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#include "cru/ui/components/Component.h"
#include "cru/ui/controls/Control.h"
namespace cru::ui::components {
void Component::OnPrepareDelete() { GetRootControl()->RemoveFromParent(); }
void Component::DeleteIfDeleteByParent(bool delete_later) {
if (delete_by_parent_) {
if (delete_later) {
DeleteLater();
} else {
delete this;
}
}
}
} // namespace cru::ui::components
|