From c5fe6fc72e9bca222e6d7b94fd47523089083fdd Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 9 Nov 2020 20:48:13 +0800 Subject: ... --- include/cru/ui/controls/RootControl.hpp | 1 + src/ui/controls/RootControl.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/cru/ui/controls/RootControl.hpp b/include/cru/ui/controls/RootControl.hpp index b3fa6101..53e69e7c 100644 --- a/include/cru/ui/controls/RootControl.hpp +++ b/include/cru/ui/controls/RootControl.hpp @@ -24,6 +24,7 @@ class RootControl : public LayoutControl { // and shown. void Show(bool create = true); + Rect GetRect(); void SetRect(const Rect& rect); protected: diff --git a/src/ui/controls/RootControl.cpp b/src/ui/controls/RootControl.cpp index 1ebcb6e7..015703c3 100644 --- a/src/ui/controls/RootControl.cpp +++ b/src/ui/controls/RootControl.cpp @@ -26,6 +26,8 @@ render::RenderObject* RootControl::GetRenderObject() const { void RootControl::EnsureWindowCreated() { this->GetNativeWindow(true); } +Rect RootControl::GetRect() { return window_host_->GetWindowRect(); } + void RootControl::SetRect(const Rect& rect) { window_host_->SetWindowRect(rect); } -- cgit v1.2.3