aboutsummaryrefslogtreecommitdiff
path: root/src/ui/render
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/render')
-rw-r--r--src/ui/render/RenderObject.cpp12
-rw-r--r--src/ui/render/ScrollBar.cpp10
2 files changed, 11 insertions, 11 deletions
diff --git a/src/ui/render/RenderObject.cpp b/src/ui/render/RenderObject.cpp
index a4da2414..fbb7c292 100644
--- a/src/ui/render/RenderObject.cpp
+++ b/src/ui/render/RenderObject.cpp
@@ -4,7 +4,7 @@
#include "cru/platform/GraphicsBase.h"
#include "cru/ui/DebugFlags.h"
#include "cru/ui/controls/Control.h"
-#include "cru/ui/controls/Window.h"
+#include "cru/ui/controls/ControlHost.h"
namespace cru::ui::render {
const BoxConstraint BoxConstraint::kNotLimit{Size::kMax, Size::kZero};
@@ -265,21 +265,21 @@ Rect RenderObject::GetContentRect() const {
return rect;
}
-controls::Window* RenderObject::GetWindow() {
+controls::ControlHost* RenderObject::GetControlHost() {
if (control_) {
- return control_->GetWindow();
+ return control_->GetControlHost();
}
return nullptr;
}
void RenderObject::InvalidateLayout() {
- if (auto window = GetWindow()) {
- window->InvalidateLayout();
+ if (auto host = GetControlHost()) {
+ host->InvalidateLayout();
}
}
void RenderObject::InvalidatePaint() {
- if (auto window = GetWindow()) {
+ if (auto window = GetControlHost()) {
window->InvalidatePaint();
}
}
diff --git a/src/ui/render/ScrollBar.cpp b/src/ui/render/ScrollBar.cpp
index 3834fffb..4343f15a 100644
--- a/src/ui/render/ScrollBar.cpp
+++ b/src/ui/render/ScrollBar.cpp
@@ -8,7 +8,7 @@
#include "cru/platform/gui/Cursor.h"
#include "cru/ui/Base.h"
#include "cru/ui/ThemeManager.h"
-#include "cru/ui/controls/Window.h"
+#include "cru/ui/controls/ControlHost.h"
#include "cru/ui/render/ScrollRenderObject.h"
#include <algorithm>
@@ -317,8 +317,8 @@ void ScrollBar::OnDraw(platform::graphics::IPainter* painter,
void ScrollBar::SetCursor() {
if (const auto control = render_object_->GetAttachedControl()) {
- if (const auto window = control->GetWindow()) {
- window->SetOverrideCursor(
+ if (const auto host = control->GetControlHost()) {
+ host->SetOverrideCursor(
GetUiApplication()->GetCursorManager()->GetSystemCursor(
platform::gui::SystemCursorType::Arrow));
cursor_overridden_ = true;
@@ -329,8 +329,8 @@ void ScrollBar::SetCursor() {
void ScrollBar::RestoreCursor() {
if (cursor_overridden_) {
if (const auto control = render_object_->GetAttachedControl()) {
- if (const auto window = control->GetWindow()) {
- window->SetOverrideCursor(nullptr);
+ if (const auto host = control->GetControlHost()) {
+ host->SetOverrideCursor(nullptr);
}
}
cursor_overridden_ = false;