aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/host/WindowHost.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/ui/host/WindowHost.hpp')
-rw-r--r--include/cru/ui/host/WindowHost.hpp19
1 files changed, 4 insertions, 15 deletions
diff --git a/include/cru/ui/host/WindowHost.hpp b/include/cru/ui/host/WindowHost.hpp
index f3caeeef..6fb853b6 100644
--- a/include/cru/ui/host/WindowHost.hpp
+++ b/include/cru/ui/host/WindowHost.hpp
@@ -30,7 +30,7 @@ class WindowHost : public Object {
CRU_DEFINE_CLASS_LOG_TAG(u"cru::ui::host::WindowHost")
public:
- WindowHost(controls::Control* root_control);
+ WindowHost(controls::Control* root_control, CreateWindowParams params);
CRU_DELETE_COPY(WindowHost)
CRU_DELETE_MOVE(WindowHost)
@@ -40,10 +40,6 @@ class WindowHost : public Object {
public:
platform::gui::INativeWindow* GetNativeWindow() { return native_window_; }
- // Do nothing if native window is already created.
- gsl::not_null<platform::gui::INativeWindow*> CreateNativeWindow(
- CreateWindowParams create_window_params = {});
-
// Mark the layout as invalid, and arrange a re-layout later.
// This method could be called more than one times in a message cycle. But
// layout only takes place once.
@@ -112,18 +108,13 @@ class WindowHost : public Object {
return &native_window_change_event_;
}
- // If window exist, return window actual size. Otherwise if saved rect exists,
- // return it. Otherwise return 0.
- Rect GetWindowRect();
-
- void SetSavedWindowRect(std::optional<Rect> rect);
-
- void SetWindowRect(const Rect& rect);
-
std::shared_ptr<platform::gui::ICursor> GetOverrideCursor();
void SetOverrideCursor(std::shared_ptr<platform::gui::ICursor> cursor);
private:
+ gsl::not_null<platform::gui::INativeWindow*> CreateNativeWindow(
+ CreateWindowParams params);
+
//*************** region: native messages ***************
void OnNativeDestroy(platform::gui::INativeWindow* window, std::nullptr_t);
void OnNativePaint(platform::gui::INativeWindow* window, std::nullptr_t);
@@ -178,8 +169,6 @@ class WindowHost : public Object {
Event<platform::gui::INativeWindow*> native_window_change_event_;
- std::optional<Rect> saved_rect_;
-
std::shared_ptr<platform::gui::ICursor> override_cursor_;
};
} // namespace cru::ui::host