diff options
Diffstat (limited to 'src/ui/controls/flex_layout.cpp')
-rw-r--r-- | src/ui/controls/flex_layout.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ui/controls/flex_layout.cpp b/src/ui/controls/flex_layout.cpp index 6ea26d92..1c649e3b 100644 --- a/src/ui/controls/flex_layout.cpp +++ b/src/ui/controls/flex_layout.cpp @@ -10,6 +10,8 @@ FlexLayout::FlexLayout() { render_object_->SetAttachedControl(this); } +FlexLayout::~FlexLayout() = default; + render::RenderObject* FlexLayout::GetRenderObject() const { return render_object_.get(); } @@ -39,6 +41,24 @@ void FlexLayout::SetChildLayoutData(Control* control, FindPosition(render_object_.get(), control->GetRenderObject())) = data; } +FlexMainAlignment FlexLayout::GetContentMainAlign() const { + return render_object_->GetContentMainAlign(); +} + +void FlexLayout::SetContentMainAlign(FlexMainAlignment value) { + if (value == GetContentMainAlign()) return; + render_object_->SetContentMainAlign(value); +} + +FlexDirection FlexLayout::GetFlexDirection() const { + return render_object_->GetFlexDirection(); +} + +void FlexLayout::SetFlexDirection(FlexDirection direction) { + if (direction == GetFlexDirection()) return; + render_object_->SetFlexDirection(direction); +} + void FlexLayout::OnAddChild(Control* child, int position) { render_object_->AddChild(child->GetRenderObject(), position); } |