diff options
Diffstat (limited to 'src/ui/controls/LayoutControl.cpp')
-rw-r--r-- | src/ui/controls/LayoutControl.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/ui/controls/LayoutControl.cpp b/src/ui/controls/LayoutControl.cpp index 85417beb..5954853e 100644 --- a/src/ui/controls/LayoutControl.cpp +++ b/src/ui/controls/LayoutControl.cpp @@ -1,3 +1,18 @@ #include "cru/ui/controls/LayoutControl.hpp" -namespace cru::ui::controls {} +#include "cru/ui/render/RenderObject.hpp" + +namespace cru::ui::controls { +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 |