diff options
Diffstat (limited to 'src/ui/controls/LayoutControl.cpp')
| -rw-r--r-- | src/ui/controls/LayoutControl.cpp | 18 | 
1 files changed, 18 insertions, 0 deletions
| diff --git a/src/ui/controls/LayoutControl.cpp b/src/ui/controls/LayoutControl.cpp new file mode 100644 index 00000000..5954853e --- /dev/null +++ b/src/ui/controls/LayoutControl.cpp @@ -0,0 +1,18 @@ +#include "cru/ui/controls/LayoutControl.hpp" + +#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 | 
