blob: 051e67efb5bd2dc6a452515c8db874db12f01ac4 (
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
30
31
32
|
#include "cru/ui/Window.hpp"
#include "cru/common/Base.hpp"
#include "cru/ui/WindowHost.hpp"
#include "cru/ui/render/Base.hpp"
#include "cru/ui/render/StackLayoutRenderObject.hpp"
namespace cru::ui {
Window* Window::CreateOverlapped() { return new Window(); }
Window::Window() : render_object_(new render::StackLayoutRenderObject()) {
render_object_->SetAttachedControl(this);
window_host_ = std::make_unique<WindowHost>(this);
}
Window::~Window() {}
std::u16string_view Window::GetControlType() const { return control_type; }
render::RenderObject* Window::GetRenderObject() const {
return render_object_.get();
}
void Window::OnAddChild(Control* child, Index position) {
render_object_->AddChild(child->GetRenderObject(), position);
}
void Window::OnRemoveChild(Control* child, Index position) {
CRU_UNUSED(child);
render_object_->RemoveChild(position);
}
} // namespace cru::ui
|