blob: 7e45a55531fe63131d364c8b955c1893e33c1e46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include "cru/ui/controls/StackLayout.h"
#include <memory>
#include "cru/ui/render/StackLayoutRenderObject.h"
namespace cru::ui::controls {
using render::StackLayoutRenderObject;
StackLayout::StackLayout() {
render_object_ = std::make_unique<StackLayoutRenderObject>();
render_object_->SetAttachedControl(this);
SetContainerRenderObject(render_object_.get());
}
StackLayout::~StackLayout() = default;
render::RenderObject* StackLayout::GetRenderObject() const {
return render_object_.get();
}
const StackChildLayoutData& StackLayout::GetChildLayoutData(Index position) {
return render_object_->GetChildLayoutData(position);
}
void StackLayout::SetChildLayoutData(Index position,
StackChildLayoutData data) {
render_object_->SetChildLayoutData(position, std::move(data));
}
} // namespace cru::ui::controls
|