blob: ebe61a6dfbc37d8dc03e158f27436ed019e834f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
|