diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/ui/Control.cpp | 10 | ||||
-rw-r--r-- | src/ui/Helper.cpp | 8 | ||||
-rw-r--r-- | src/ui/Helper.hpp | 4 | ||||
-rw-r--r-- | src/ui/UiManager.cpp | 12 | ||||
-rw-r--r-- | src/ui/WindowHost.cpp | 30 | ||||
-rw-r--r-- | src/ui/controls/Button.cpp | 10 | ||||
-rw-r--r-- | src/ui/controls/Container.cpp | 2 | ||||
-rw-r--r-- | src/ui/controls/TextControlService.hpp | 22 | ||||
-rw-r--r-- | src/ui/render/BorderRenderObject.cpp | 12 | ||||
-rw-r--r-- | src/ui/render/CanvasRenderObject.cpp | 2 | ||||
-rw-r--r-- | src/ui/render/FlexLayoutRenderObject.cpp | 2 | ||||
-rw-r--r-- | src/ui/render/RenderObject.cpp | 16 | ||||
-rw-r--r-- | src/ui/render/ScrollRenderObject.cpp | 10 | ||||
-rw-r--r-- | src/ui/render/TextRenderObject.cpp | 28 |
15 files changed, 85 insertions, 85 deletions
diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt index 045fea24..45f64c88 100644 --- a/src/ui/CMakeLists.txt +++ b/src/ui/CMakeLists.txt @@ -63,4 +63,4 @@ target_sources(cru_ui PUBLIC ${CRU_UI_INCLUDE_DIR}/render/StackLayoutRenderObject.hpp ${CRU_UI_INCLUDE_DIR}/render/TextRenderObject.hpp ) -target_link_libraries(cru_ui PUBLIC cru_platform_native) +target_link_libraries(cru_ui PUBLIC cru_platform_gui) diff --git a/src/ui/Control.cpp b/src/ui/Control.cpp index 13b1c780..cae48c66 100644 --- a/src/ui/Control.cpp +++ b/src/ui/Control.cpp @@ -2,8 +2,8 @@ #include "RoutedEventDispatch.hpp" #include "cru/common/Base.hpp" -#include "cru/platform/native/Cursor.hpp" -#include "cru/platform/native/UiApplication.hpp" +#include "cru/platform/gui/Cursor.hpp" +#include "cru/platform/gui/UiApplication.hpp" #include "cru/ui/Base.hpp" #include "cru/ui/WindowHost.hpp" #include "cru/ui/render/RenderObject.hpp" @@ -11,9 +11,9 @@ #include <memory> namespace cru::ui { -using platform::native::ICursor; -using platform::native::IUiApplication; -using platform::native::SystemCursorType; +using platform::gui::ICursor; +using platform::gui::IUiApplication; +using platform::gui::SystemCursorType; Control::Control() { MouseEnterEvent()->Direct()->AddHandler([this](event::MouseEventArgs&) { diff --git a/src/ui/Helper.cpp b/src/ui/Helper.cpp index 6f67e701..88ead993 100644 --- a/src/ui/Helper.cpp +++ b/src/ui/Helper.cpp @@ -1,11 +1,11 @@ #include "Helper.hpp" -#include "cru/platform/graph/Factory.hpp" -#include "cru/platform/native/UiApplication.hpp" +#include "cru/platform/graphics/Factory.hpp" +#include "cru/platform/gui/UiApplication.hpp" namespace cru::ui { -using cru::platform::graph::IGraphFactory; -using cru::platform::native::IUiApplication; +using cru::platform::graphics::IGraphFactory; +using cru::platform::gui::IUiApplication; IGraphFactory* GetGraphFactory() { return IUiApplication::GetInstance()->GetGraphFactory(); diff --git a/src/ui/Helper.hpp b/src/ui/Helper.hpp index 6923852f..327f91ff 100644 --- a/src/ui/Helper.hpp +++ b/src/ui/Helper.hpp @@ -12,6 +12,6 @@ struct IUiApplication; } // namespace cru::platform namespace cru::ui { -cru::platform::graph::IGraphFactory* GetGraphFactory(); -cru::platform::native::IUiApplication* GetUiApplication(); +cru::platform::graphics::IGraphFactory* GetGraphFactory(); +cru::platform::gui::IUiApplication* GetUiApplication(); } // namespace cru::ui diff --git a/src/ui/UiManager.cpp b/src/ui/UiManager.cpp index 8a2029b9..62995f86 100644 --- a/src/ui/UiManager.cpp +++ b/src/ui/UiManager.cpp @@ -1,13 +1,13 @@ #include "cru/ui/UiManager.hpp" #include "Helper.hpp" -#include "cru/platform/graph/Brush.hpp" -#include "cru/platform/graph/Factory.hpp" -#include "cru/platform/graph/Font.hpp" -#include "cru/platform/native/UiApplication.hpp" +#include "cru/platform/graphics/Brush.hpp" +#include "cru/platform/graphics/Factory.hpp" +#include "cru/platform/graphics/Font.hpp" +#include "cru/platform/gui/UiApplication.hpp" namespace cru::ui { -using namespace cru::platform::graph; +using namespace cru::platform::graphics; namespace { std::unique_ptr<ISolidColorBrush> CreateSolidColorBrush(IGraphFactory* factory, @@ -35,7 +35,7 @@ UiManager::UiManager() { theme_resource_.default_font = factory->CreateFont(theme_resource_.default_font_family, 24.0f); - const auto black_brush = std::shared_ptr<platform::graph::ISolidColorBrush>( + const auto black_brush = std::shared_ptr<platform::graphics::ISolidColorBrush>( CreateSolidColorBrush(factory, colors::black)); theme_resource_.text_brush = black_brush; theme_resource_.text_selection_brush = diff --git a/src/ui/WindowHost.cpp b/src/ui/WindowHost.cpp index 8c61d27d..4b32467b 100644 --- a/src/ui/WindowHost.cpp +++ b/src/ui/WindowHost.cpp @@ -2,10 +2,10 @@ #include "RoutedEventDispatch.hpp" #include "cru/common/Logger.hpp" -#include "cru/platform/graph/Painter.hpp" -#include "cru/platform/native/InputMethod.hpp" -#include "cru/platform/native/UiApplication.hpp" -#include "cru/platform/native/Window.hpp" +#include "cru/platform/graphics/Painter.hpp" +#include "cru/platform/gui/InputMethod.hpp" +#include "cru/platform/gui/UiApplication.hpp" +#include "cru/platform/gui/Window.hpp" #include "cru/ui/DebugFlags.hpp" #include "cru/ui/Window.hpp" #include "cru/ui/render/MeasureRequirement.hpp" @@ -14,8 +14,8 @@ #include <cstddef> namespace cru::ui { -using platform::native::INativeWindow; -using platform::native::IUiApplication; +using platform::gui::INativeWindow; +using platform::gui::IUiApplication; namespace event_names { #ifdef CRU_DEBUG @@ -149,7 +149,7 @@ void WindowHost::InvalidateLayout() { if constexpr (debug_flags::layout) log::TagDebug(log_tag, u"A relayout is requested."); if (!need_layout_) { - platform::native::IUiApplication::GetInstance()->SetImmediate([this] { + platform::gui::IUiApplication::GetInstance()->SetImmediate([this] { Relayout(); need_layout_ = false; InvalidatePaint(); @@ -272,10 +272,10 @@ void WindowHost::OnNativeResize(INativeWindow* window, const Size& size) { } void WindowHost::OnNativeFocus(INativeWindow* window, - platform::native::FocusChangeType focus) { + platform::gui::FocusChangeType focus) { CRU_UNUSED(window) - focus == platform::native::FocusChangeType::Gain + focus == platform::gui::FocusChangeType::Gain ? DispatchEvent(event_names::GainFocus, focus_control_, &Control::GainFocusEvent, nullptr, true) : DispatchEvent(event_names::LoseFocus, focus_control_, @@ -283,10 +283,10 @@ void WindowHost::OnNativeFocus(INativeWindow* window, } void WindowHost::OnNativeMouseEnterLeave( - INativeWindow* window, platform::native::MouseEnterLeaveType type) { + INativeWindow* window, platform::gui::MouseEnterLeaveType type) { CRU_UNUSED(window) - if (type == platform::native::MouseEnterLeaveType::Leave) { + if (type == platform::gui::MouseEnterLeaveType::Leave) { DispatchEvent(event_names::MouseLeave, mouse_hover_control_, &Control::MouseLeaveEvent, nullptr); mouse_hover_control_ = nullptr; @@ -328,7 +328,7 @@ void WindowHost::OnNativeMouseMove(INativeWindow* window, const Point& point) { void WindowHost::OnNativeMouseDown( INativeWindow* window, - const platform::native::NativeMouseButtonEventArgs& args) { + const platform::gui::NativeMouseButtonEventArgs& args) { CRU_UNUSED(window) Control* control = @@ -339,7 +339,7 @@ void WindowHost::OnNativeMouseDown( void WindowHost::OnNativeMouseUp( INativeWindow* window, - const platform::native::NativeMouseButtonEventArgs& args) { + const platform::gui::NativeMouseButtonEventArgs& args) { CRU_UNUSED(window) Control* control = @@ -349,7 +349,7 @@ void WindowHost::OnNativeMouseUp( } void WindowHost::OnNativeKeyDown( - INativeWindow* window, const platform::native::NativeKeyEventArgs& args) { + INativeWindow* window, const platform::gui::NativeKeyEventArgs& args) { CRU_UNUSED(window) DispatchEvent(event_names::KeyDown, focus_control_, &Control::KeyDownEvent, @@ -357,7 +357,7 @@ void WindowHost::OnNativeKeyDown( } void WindowHost::OnNativeKeyUp( - INativeWindow* window, const platform::native::NativeKeyEventArgs& args) { + INativeWindow* window, const platform::gui::NativeKeyEventArgs& args) { CRU_UNUSED(window) DispatchEvent(event_names::KeyUp, focus_control_, &Control::KeyUpEvent, diff --git a/src/ui/controls/Button.cpp b/src/ui/controls/Button.cpp index 6f6af878..5f7ed143 100644 --- a/src/ui/controls/Button.cpp +++ b/src/ui/controls/Button.cpp @@ -2,15 +2,15 @@ #include <memory> #include "../Helper.hpp" -#include "cru/platform/graph/Brush.hpp" -#include "cru/platform/native/Cursor.hpp" -#include "cru/platform/native/UiApplication.hpp" +#include "cru/platform/graphics/Brush.hpp" +#include "cru/platform/gui/Cursor.hpp" +#include "cru/platform/gui/UiApplication.hpp" #include "cru/ui/render/BorderRenderObject.hpp" #include "cru/ui/UiManager.hpp" #include "cru/ui/Window.hpp" namespace cru::ui::controls { -using cru::platform::native::SystemCursorType; +using cru::platform::gui::SystemCursorType; namespace { void Set(render::BorderRenderObject* o, const ButtonStateStyle& s) { @@ -21,7 +21,7 @@ void Set(render::BorderRenderObject* o, const ButtonStateStyle& s) { o->SetBackgroundBrush(s.background_brush); } -std::shared_ptr<platform::native::ICursor> GetSystemCursor( +std::shared_ptr<platform::gui::ICursor> GetSystemCursor( SystemCursorType type) { return GetUiApplication()->GetCursorManager()->GetSystemCursor(type); } diff --git a/src/ui/controls/Container.cpp b/src/ui/controls/Container.cpp index de58ee64..8b15c566 100644 --- a/src/ui/controls/Container.cpp +++ b/src/ui/controls/Container.cpp @@ -1,6 +1,6 @@ #include "cru/ui/controls/Container.hpp" -#include "cru/platform/graph/Factory.hpp" +#include "cru/platform/graphics/Factory.hpp" #include "cru/ui/render/BorderRenderObject.hpp" namespace cru::ui::controls { diff --git a/src/ui/controls/TextControlService.hpp b/src/ui/controls/TextControlService.hpp index 3c082bad..8ad87416 100644 --- a/src/ui/controls/TextControlService.hpp +++ b/src/ui/controls/TextControlService.hpp @@ -2,11 +2,11 @@ #include "../Helper.hpp" #include "cru/common/Logger.hpp" #include "cru/common/StringUtil.hpp" -#include "cru/platform/graph/Font.hpp" -#include "cru/platform/graph/Painter.hpp" -#include "cru/platform/native/InputMethod.hpp" -#include "cru/platform/native/UiApplication.hpp" -#include "cru/platform/native/Window.hpp" +#include "cru/platform/graphics/Font.hpp" +#include "cru/platform/graphics/Painter.hpp" +#include "cru/platform/gui/InputMethod.hpp" +#include "cru/platform/gui/UiApplication.hpp" +#include "cru/platform/gui/Window.hpp" #include "cru/ui/Base.hpp" #include "cru/ui/Control.hpp" #include "cru/ui/DebugFlags.hpp" @@ -135,10 +135,10 @@ class TextControlService : public Object { this->SyncTextRenderObject(); } - platform::native::IInputMethodContext* GetInputMethodContext() { + platform::gui::IInputMethodContext* GetInputMethodContext() { WindowHost* host = this->control_->GetWindowHost(); if (!host) return nullptr; - platform::native::INativeWindow* native_window = host->GetNativeWindow(); + platform::gui::INativeWindow* native_window = host->GetNativeWindow(); if (!native_window) return nullptr; return native_window->GetInputMethodContext(); } @@ -149,7 +149,7 @@ class TextControlService : public Object { input_method_context->CancelComposition(); } - std::optional<platform::native::CompositionText> GetCompositionInfo() { + std::optional<platform::gui::CompositionText> GetCompositionInfo() { auto input_method_context = GetInputMethodContext(); if (input_method_context == nullptr) return std::nullopt; auto composition_info = input_method_context->GetCompositionText(); @@ -360,8 +360,8 @@ class TextControlService : public Object { void KeyDownHandler(event::KeyEventArgs& args) { const auto key_code = args.GetKeyCode(); - using cru::platform::native::KeyCode; - using cru::platform::native::KeyModifiers; + using cru::platform::gui::KeyCode; + using cru::platform::gui::KeyModifiers; switch (key_code) { case KeyCode::Backspace: { @@ -469,7 +469,7 @@ class TextControlService : public Object { bool editable_ = false; bool caret_visible_ = false; - platform::native::TimerAutoCanceler caret_timer_canceler_; + platform::gui::TimerAutoCanceler caret_timer_canceler_; int caret_blink_duration_ = k_default_caret_blink_duration; ShortcutHub shortcut_hub_; diff --git a/src/ui/render/BorderRenderObject.cpp b/src/ui/render/BorderRenderObject.cpp index b7e1e709..8e16d8cb 100644 --- a/src/ui/render/BorderRenderObject.cpp +++ b/src/ui/render/BorderRenderObject.cpp @@ -2,9 +2,9 @@ #include "../Helper.hpp" #include "cru/common/Logger.hpp" -#include "cru/platform/graph/Factory.hpp" -#include "cru/platform/graph/Geometry.hpp" -#include "cru/platform/graph/util/Painter.hpp" +#include "cru/platform/graphics/Factory.hpp" +#include "cru/platform/graphics/Geometry.hpp" +#include "cru/platform/graphics/util/Painter.hpp" #include <algorithm> @@ -51,7 +51,7 @@ RenderObject* BorderRenderObject::HitTest(const Point& point) { } } -void BorderRenderObject::OnDrawCore(platform::graph::IPainter* painter) { +void BorderRenderObject::OnDrawCore(platform::graphics::IPainter* painter) { if (background_brush_ != nullptr) painter->FillGeometry(border_inner_geometry_.get(), background_brush_.get()); @@ -235,7 +235,7 @@ void BorderRenderObject::RecreateGeometry() { r.left_bottom - Point{t.left, t.bottom}, r.right_bottom - Point{t.right, t.bottom}); - auto f = [](platform::graph::IGeometryBuilder* builder, const Rect& rect, + auto f = [](platform::graphics::IGeometryBuilder* builder, const Rect& rect, const CornerRadius& corner) { builder->BeginFigure(Point(rect.left + corner.left_top.x, rect.top)); builder->LineTo(Point(rect.GetRight() - corner.right_top.x, rect.top)); @@ -263,7 +263,7 @@ void BorderRenderObject::RecreateGeometry() { size.width - margin.GetHorizontalTotal(), size.height - margin.GetVerticalTotal()}; const auto graph_factory = GetGraphFactory(); - std::unique_ptr<platform::graph::IGeometryBuilder> builder{ + std::unique_ptr<platform::graphics::IGeometryBuilder> builder{ graph_factory->CreateGeometryBuilder()}; f(builder.get(), outer_rect, outer_radius); border_outer_geometry_ = builder->Build(); diff --git a/src/ui/render/CanvasRenderObject.cpp b/src/ui/render/CanvasRenderObject.cpp index 967fdcec..bf1155e1 100644 --- a/src/ui/render/CanvasRenderObject.cpp +++ b/src/ui/render/CanvasRenderObject.cpp @@ -10,7 +10,7 @@ RenderObject* CanvasRenderObject::HitTest(const Point& point) { return padding_rect.IsPointInside(point) ? this : nullptr; } -void CanvasRenderObject::OnDrawContent(platform::graph::IPainter* painter) { +void CanvasRenderObject::OnDrawContent(platform::graphics::IPainter* painter) { const auto rect = GetContentRect(); CanvasPaintEventArgs args{painter, rect.GetSize()}; paint_event_.Raise(args); diff --git a/src/ui/render/FlexLayoutRenderObject.cpp b/src/ui/render/FlexLayoutRenderObject.cpp index 36a2dcea..b1ef69ee 100644 --- a/src/ui/render/FlexLayoutRenderObject.cpp +++ b/src/ui/render/FlexLayoutRenderObject.cpp @@ -1,7 +1,7 @@ #include "cru/ui/render/FlexLayoutRenderObject.hpp" #include "cru/common/Logger.hpp" -#include "cru/platform/graph/util/Painter.hpp" +#include "cru/platform/graphics/util/Painter.hpp" #include "cru/ui/render/LayoutHelper.hpp" #include <algorithm> diff --git a/src/ui/render/RenderObject.cpp b/src/ui/render/RenderObject.cpp index 57929a21..09410113 100644 --- a/src/ui/render/RenderObject.cpp +++ b/src/ui/render/RenderObject.cpp @@ -1,7 +1,7 @@ #include "cru/ui/render/RenderObject.hpp" #include "cru/common/Logger.hpp" -#include "cru/platform/graph/util/Painter.hpp" +#include "cru/platform/graphics/util/Painter.hpp" #include "cru/ui/DebugFlags.hpp" #include "cru/ui/WindowHost.hpp" @@ -103,7 +103,7 @@ void RenderObject::Layout(const Point& offset) { OnLayoutCore(); } -void RenderObject::Draw(platform::graph::IPainter* painter) { +void RenderObject::Draw(platform::graphics::IPainter* painter) { OnDrawCore(painter); } @@ -138,29 +138,29 @@ void RenderObject::OnRemoveChild(RenderObject* removed_child, Index position) { InvalidatePaint(); } -void RenderObject::DefaultDrawChildren(platform::graph::IPainter* painter) { +void RenderObject::DefaultDrawChildren(platform::graphics::IPainter* painter) { for (const auto child : GetChildren()) { auto offset = child->GetOffset(); - platform::graph::util::WithTransform( + platform::graphics::util::WithTransform( painter, platform::Matrix::Translation(offset.x, offset.y), [child](auto p) { child->Draw(p); }); } } -void RenderObject::DefaultDrawContent(platform::graph::IPainter* painter) { +void RenderObject::DefaultDrawContent(platform::graphics::IPainter* painter) { const auto content_rect = GetContentRect(); - platform::graph::util::WithTransform( + platform::graphics::util::WithTransform( painter, Matrix::Translation(content_rect.left, content_rect.top), [this](auto p) { this->OnDrawContent(p); }); } -void RenderObject::OnDrawCore(platform::graph::IPainter* painter) { +void RenderObject::OnDrawCore(platform::graphics::IPainter* painter) { DefaultDrawContent(painter); DefaultDrawChildren(painter); } -void RenderObject::OnDrawContent(platform::graph::IPainter* painter) { +void RenderObject::OnDrawContent(platform::graphics::IPainter* painter) { CRU_UNUSED(painter); } diff --git a/src/ui/render/ScrollRenderObject.cpp b/src/ui/render/ScrollRenderObject.cpp index 24ea351a..e621cd0c 100644 --- a/src/ui/render/ScrollRenderObject.cpp +++ b/src/ui/render/ScrollRenderObject.cpp @@ -1,7 +1,7 @@ #include "cru/ui/render/ScrollRenderObject.hpp" -#include "cru/platform/graph/Painter.hpp" -#include "cru/platform/graph/util/Painter.hpp" +#include "cru/platform/graphics/Painter.hpp" +#include "cru/platform/graphics/util/Painter.hpp" #include <algorithm> @@ -42,14 +42,14 @@ RenderObject* ScrollRenderObject::HitTest(const Point& point) { return rect.IsPointInside(point) ? this : nullptr; } // namespace cru::ui::render -void ScrollRenderObject::OnDrawCore(platform::graph::IPainter* painter) { +void ScrollRenderObject::OnDrawCore(platform::graphics::IPainter* painter) { DefaultDrawContent(painter); if (const auto child = GetSingleChild()) { painter->PushLayer(this->GetPaddingRect()); const auto offset = child->GetOffset(); - platform::graph::util::WithTransform( + platform::graphics::util::WithTransform( painter, Matrix::Translation(offset.x, offset.y), - [child](platform::graph::IPainter* p) { child->Draw(p); }); + [child](platform::graphics::IPainter* p) { child->Draw(p); }); painter->PopLayer(); } } diff --git a/src/ui/render/TextRenderObject.cpp b/src/ui/render/TextRenderObject.cpp index 466c5084..9faab622 100644 --- a/src/ui/render/TextRenderObject.cpp +++ b/src/ui/render/TextRenderObject.cpp @@ -2,19 +2,19 @@ #include "../Helper.hpp" #include "cru/common/Logger.hpp" -#include "cru/platform/graph/Factory.hpp" -#include "cru/platform/graph/TextLayout.hpp" -#include "cru/platform/graph/util/Painter.hpp" +#include "cru/platform/graphics/Factory.hpp" +#include "cru/platform/graphics/TextLayout.hpp" +#include "cru/platform/graphics/util/Painter.hpp" #include <algorithm> #include <limits> namespace cru::ui::render { TextRenderObject::TextRenderObject( - std::shared_ptr<platform::graph::IBrush> brush, - std::shared_ptr<platform::graph::IFont> font, - std::shared_ptr<platform::graph::IBrush> selection_brush, - std::shared_ptr<platform::graph::IBrush> caret_brush) { + std::shared_ptr<platform::graphics::IBrush> brush, + std::shared_ptr<platform::graphics::IFont> font, + std::shared_ptr<platform::graphics::IBrush> selection_brush, + std::shared_ptr<platform::graphics::IBrush> caret_brush) { Expects(brush); Expects(font); Expects(selection_brush); @@ -47,17 +47,17 @@ void TextRenderObject::SetText(std::u16string new_text) { } void TextRenderObject::SetBrush( - std::shared_ptr<platform::graph::IBrush> new_brush) { + std::shared_ptr<platform::graphics::IBrush> new_brush) { Expects(new_brush); new_brush.swap(brush_); InvalidatePaint(); } -std::shared_ptr<platform::graph::IFont> TextRenderObject::GetFont() const { +std::shared_ptr<platform::graphics::IFont> TextRenderObject::GetFont() const { return text_layout_->GetFont(); } -void TextRenderObject::SetFont(std::shared_ptr<platform::graph::IFont> font) { +void TextRenderObject::SetFont(std::shared_ptr<platform::graphics::IFont> font) { Expects(font); text_layout_->SetFont(std::move(font)); } @@ -70,7 +70,7 @@ Point TextRenderObject::TextSinglePoint(gsl::index position, bool trailing) { return text_layout_->TextSinglePoint(position, trailing); } -platform::graph::TextHitTestResult TextRenderObject::TextHitTest( +platform::graphics::TextHitTestResult TextRenderObject::TextHitTest( const Point& point) { return text_layout_->HitTest(point); } @@ -81,7 +81,7 @@ void TextRenderObject::SetSelectionRange(std::optional<TextRange> new_range) { } void TextRenderObject::SetSelectionBrush( - std::shared_ptr<platform::graph::IBrush> new_brush) { + std::shared_ptr<platform::graphics::IBrush> new_brush) { Expects(new_brush); new_brush.swap(selection_brush_); if (selection_range_ && selection_range_->count) { @@ -106,7 +106,7 @@ void TextRenderObject::SetCaretPosition(gsl::index position) { } void TextRenderObject::GetCaretBrush( - std::shared_ptr<platform::graph::IBrush> brush) { + std::shared_ptr<platform::graphics::IBrush> brush) { Expects(brush); brush.swap(caret_brush_); if (draw_caret_) { @@ -159,7 +159,7 @@ RenderObject* TextRenderObject::HitTest(const Point& point) { return padding_rect.IsPointInside(point) ? this : nullptr; } -void TextRenderObject::OnDrawContent(platform::graph::IPainter* painter) { +void TextRenderObject::OnDrawContent(platform::graphics::IPainter* painter) { if (this->selection_range_.has_value()) { const auto&& rects = text_layout_->TextRangeRect(this->selection_range_.value()); |