blob: e5a38445cc94d96bc080890a53a49c8604fa2646 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#include "cru/ui/controls/LayoutControl.hpp"
#include "cru/ui/render/RenderObject.hpp"
namespace cru::ui::controls {
void LayoutControl::ClearChildren() {
while (GetChildren().size() > 0) {
RemoveChild(0);
}
}
void LayoutControl::OnAddChild(Control* child, Index position) {
if (container_render_object_ != nullptr) {
container_render_object_->AddChild(child->GetRenderObject(), position);
}
}
void LayoutControl::OnRemoveChild(Control* child, Index position) {
CRU_UNUSED(child)
if (container_render_object_ != nullptr) {
container_render_object_->RemoveChild(position);
}
}
} // namespace cru::ui::controls
|