diff options
Diffstat (limited to 'src/ui/controls/flex_layout.cpp')
-rw-r--r-- | src/ui/controls/flex_layout.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ui/controls/flex_layout.cpp b/src/ui/controls/flex_layout.cpp new file mode 100644 index 00000000..ebe61a6d --- /dev/null +++ b/src/ui/controls/flex_layout.cpp @@ -0,0 +1,19 @@ +#include "flex_layout.hpp" + +#include "ui/render/flex_layout_render_object.hpp" + +namespace cru::ui::controls { +using render::FlexLayoutRenderObject; + +FlexLayout::FlexLayout() { render_object_ = new FlexLayoutRenderObject(); } + +FlexLayout::~FlexLayout() { delete render_object_; } + +void FlexLayout::OnAddChild(Control* child, int position) { + render_object_->AddChild(child->GetRenderObject(), position); +} + +void FlexLayout::OnRemoveChild(Control* child, int position) { + render_object_->RemoveChild(position); +} +} // namespace cru::ui::controls |