diff options
author | crupest <crupest@outlook.com> | 2021-11-21 15:18:28 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-11-21 15:18:28 +0800 |
commit | eeb1f55d5a483720441c3f44e83d02cc882a3bc0 (patch) | |
tree | e8d8a49d26602ac3f8097aa4d2fff65d70bbfba5 /src/ui/host/WindowHost.cpp | |
parent | 2b28ec296fdc72050569b9fedc1664ada7791497 (diff) | |
download | cru-eeb1f55d5a483720441c3f44e83d02cc882a3bc0.tar.gz cru-eeb1f55d5a483720441c3f44e83d02cc882a3bc0.tar.bz2 cru-eeb1f55d5a483720441c3f44e83d02cc882a3bc0.zip |
...
Diffstat (limited to 'src/ui/host/WindowHost.cpp')
-rw-r--r-- | src/ui/host/WindowHost.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/ui/host/WindowHost.cpp b/src/ui/host/WindowHost.cpp index 3f3976b4..034d9bd8 100644 --- a/src/ui/host/WindowHost.cpp +++ b/src/ui/host/WindowHost.cpp @@ -8,7 +8,6 @@ #include "cru/platform/gui/UiApplication.hpp" #include "cru/platform/gui/Window.hpp" #include "cru/ui/DebugFlags.hpp" -#include "cru/ui/controls/Window.hpp" #include "cru/ui/host/LayoutPaintCycler.hpp" #include "cru/ui/render/MeasureRequirement.hpp" #include "cru/ui/render/RenderObject.hpp" @@ -104,8 +103,7 @@ inline void BindNativeEvent( } } // namespace -WindowHost::WindowHost(controls::Control* root_control, - CreateWindowParams params) +WindowHost::WindowHost(controls::Control* root_control) : root_control_(root_control), focus_control_(root_control) { root_control_->TraverseDescendants([this](controls::Control* control) { control->window_host_ = this; @@ -117,17 +115,16 @@ WindowHost::WindowHost(controls::Control* root_control, this->layout_paint_cycler_ = std::make_unique<LayoutPaintCycler>(this); - CreateNativeWindow(params); + CreateNativeWindow(); } WindowHost::~WindowHost() {} -gsl::not_null<platform::gui::INativeWindow*> WindowHost::CreateNativeWindow( - CreateWindowParams create_window_params) { +gsl::not_null<platform::gui::INativeWindow*> WindowHost::CreateNativeWindow() { const auto ui_application = IUiApplication::GetInstance(); - auto native_window = ui_application->CreateWindow(create_window_params.parent, - create_window_params.flag); + auto native_window = ui_application->CreateWindow(); + Ensures(native_window); native_window_ = native_window; |