aboutsummaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-11-09 20:28:39 +0800
committercrupest <crupest@outlook.com>2020-11-09 20:28:39 +0800
commit014aaf773fd95a7f0dd1a766023a21fb6b54a1a1 (patch)
treef690e33536fa17910d9921c97accb7f7c99df500 /src/ui
parent7d380576ec4a86938d3d2021657bb8d6eba98c1a (diff)
downloadcru-014aaf773fd95a7f0dd1a766023a21fb6b54a1a1.tar.gz
cru-014aaf773fd95a7f0dd1a766023a21fb6b54a1a1.tar.bz2
cru-014aaf773fd95a7f0dd1a766023a21fb6b54a1a1.zip
...
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/controls/RootControl.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ui/controls/RootControl.cpp b/src/ui/controls/RootControl.cpp
index 61d272f8..c6d9a577 100644
--- a/src/ui/controls/RootControl.cpp
+++ b/src/ui/controls/RootControl.cpp
@@ -24,6 +24,15 @@ render::RenderObject* RootControl::GetRenderObject() const {
return render_object_.get();
}
+void RootControl::EnsureWindowCreated() { this->GetNativeWindow(true); }
+
+void RootControl::SetRect(const Rect& rect) {
+ auto native_window = GetNativeWindow(false);
+ if (!native_window) return;
+
+ native_window->SetWindowRect(rect);
+}
+
void RootControl::Show(bool create) {
platform::gui::INativeWindow* native_window = GetNativeWindow(create);
if (!native_window) return;