diff options
Diffstat (limited to 'include/cru')
-rw-r--r-- | include/cru/ui/UiManager.hpp | 2 | ||||
-rw-r--r-- | include/cru/ui/controls/TextHostControlService.hpp | 8 | ||||
-rw-r--r-- | include/cru/ui/render/TextRenderObject.hpp | 8 |
3 files changed, 6 insertions, 12 deletions
diff --git a/include/cru/ui/UiManager.hpp b/include/cru/ui/UiManager.hpp index 10b12e87..6b1083b2 100644 --- a/include/cru/ui/UiManager.hpp +++ b/include/cru/ui/UiManager.hpp @@ -13,7 +13,7 @@ namespace cru::ui { struct ThemeResources { - std::u16string default_font_family; + String default_font_family; std::shared_ptr<platform::graphics::IFont> default_font; std::shared_ptr<platform::graphics::IBrush> text_brush; std::shared_ptr<platform::graphics::IBrush> text_selection_brush; diff --git a/include/cru/ui/controls/TextHostControlService.hpp b/include/cru/ui/controls/TextHostControlService.hpp index f39d9456..84c226ca 100644 --- a/include/cru/ui/controls/TextHostControlService.hpp +++ b/include/cru/ui/controls/TextHostControlService.hpp @@ -7,7 +7,6 @@ #include "cru/ui/controls/Control.hpp" #include "cru/ui/helper/ShortcutHub.hpp" - #include <functional> #include <string> @@ -43,9 +42,8 @@ class TextHostControlService : public Object { bool IsEditable() { return this->editable_; } void SetEditable(bool editable); - std::u16string GetText() { return this->text_; } - std::u16string_view GetTextView() { return this->text_; } - void SetText(std::u16string text, bool stop_composition = false); + String GetText() { return this->text_; } + void SetText(String text, bool stop_composition = false); void InsertText(gsl::index position, std::u16string_view text, bool stop_composition = false); @@ -121,7 +119,7 @@ class TextHostControlService : public Object { EventRevokerListGuard event_guard_; EventRevokerListGuard input_method_context_event_guard_; - std::u16string text_; + String text_; TextRange selection_; bool enable_ = false; diff --git a/include/cru/ui/render/TextRenderObject.hpp b/include/cru/ui/render/TextRenderObject.hpp index cf585d6f..ef39b7a6 100644 --- a/include/cru/ui/render/TextRenderObject.hpp +++ b/include/cru/ui/render/TextRenderObject.hpp @@ -34,13 +34,9 @@ class TextRenderObject : public RenderObject { TextRenderObject& operator=(TextRenderObject&& other) = delete; ~TextRenderObject() override; - std::u16string GetText() const; - std::u16string_view GetTextView() const; - void SetText(std::u16string new_text); + String GetText() const; + void SetText(String new_text); - std::shared_ptr<platform::graphics::IBrush> GetBrush() const { - return brush_; - } void SetBrush(std::shared_ptr<platform::graphics::IBrush> new_brush); std::shared_ptr<platform::graphics::IFont> GetFont() const; |