diff options
author | crupest <crupest@outlook.com> | 2021-11-17 18:53:48 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-11-17 18:53:48 +0800 |
commit | 7be210036e363f2105ace761451448507d4b06d8 (patch) | |
tree | f1facc5899f35dd02efdb9e0aadd26155d5499d5 /include | |
parent | 17e35c8ebb51c2679421330056615fa8678b939e (diff) | |
download | cru-7be210036e363f2105ace761451448507d4b06d8.tar.gz cru-7be210036e363f2105ace761451448507d4b06d8.tar.bz2 cru-7be210036e363f2105ace761451448507d4b06d8.zip |
...
Diffstat (limited to 'include')
-rw-r--r-- | include/cru/ui/controls/Button.hpp | 4 | ||||
-rw-r--r-- | include/cru/ui/controls/Container.hpp | 4 | ||||
-rw-r--r-- | include/cru/ui/controls/Control.hpp | 2 | ||||
-rw-r--r-- | include/cru/ui/controls/FlexLayout.hpp | 4 | ||||
-rw-r--r-- | include/cru/ui/controls/ScrollView.hpp | 4 | ||||
-rw-r--r-- | include/cru/ui/controls/StackLayout.hpp | 4 | ||||
-rw-r--r-- | include/cru/ui/controls/TextBlock.hpp | 4 | ||||
-rw-r--r-- | include/cru/ui/controls/TextBox.hpp | 4 | ||||
-rw-r--r-- | include/cru/ui/controls/Window.hpp | 4 |
9 files changed, 17 insertions, 17 deletions
diff --git a/include/cru/ui/controls/Button.hpp b/include/cru/ui/controls/Button.hpp index 1c9b1216..9e324c62 100644 --- a/include/cru/ui/controls/Button.hpp +++ b/include/cru/ui/controls/Button.hpp @@ -12,7 +12,7 @@ class Button : public ContentControl, public virtual IClickableControl, public virtual IBorderControl { public: - static constexpr std::u16string_view control_type = u"Button"; + static constexpr StringView control_type = u"Button"; static Button* Create() { return new Button(); } @@ -26,7 +26,7 @@ class Button : public ContentControl, Button& operator=(Button&& other) = delete; ~Button() override; - std::u16string_view GetControlType() const final { return control_type; } + String GetControlType() const final { return control_type.ToString(); } render::RenderObject* GetRenderObject() const override; diff --git a/include/cru/ui/controls/Container.hpp b/include/cru/ui/controls/Container.hpp index 18958837..f992c152 100644 --- a/include/cru/ui/controls/Container.hpp +++ b/include/cru/ui/controls/Container.hpp @@ -3,7 +3,7 @@ namespace cru::ui::controls { class Container : public ContentControl { - static constexpr std::u16string_view control_type = u"Container"; + static constexpr StringView control_type = u"Container"; protected: Container(); @@ -15,7 +15,7 @@ class Container : public ContentControl { ~Container() override; public: - std::u16string_view GetControlType() const final { return control_type; } + String GetControlType() const final { return control_type.ToString(); } render::RenderObject* GetRenderObject() const override; diff --git a/include/cru/ui/controls/Control.hpp b/include/cru/ui/controls/Control.hpp index 341b6ef2..c6101370 100644 --- a/include/cru/ui/controls/Control.hpp +++ b/include/cru/ui/controls/Control.hpp @@ -22,7 +22,7 @@ class Control : public Object { ~Control() override; public: - virtual std::u16string_view GetControlType() const = 0; + virtual String GetControlType() const = 0; //*************** region: tree *************** public: diff --git a/include/cru/ui/controls/FlexLayout.hpp b/include/cru/ui/controls/FlexLayout.hpp index 4f6abfdb..f4e186db 100644 --- a/include/cru/ui/controls/FlexLayout.hpp +++ b/include/cru/ui/controls/FlexLayout.hpp @@ -4,7 +4,7 @@ namespace cru::ui::controls { class FlexLayout : public LayoutControl { public: - static constexpr std::u16string_view control_type = u"FlexLayout"; + static constexpr StringView control_type = u"FlexLayout"; static FlexLayout* Create() { return new FlexLayout(); } @@ -18,7 +18,7 @@ class FlexLayout : public LayoutControl { FlexLayout& operator=(FlexLayout&& other) = delete; ~FlexLayout() override; - std::u16string_view GetControlType() const final { return control_type; } + String GetControlType() const final { return control_type.ToString(); } render::RenderObject* GetRenderObject() const override; diff --git a/include/cru/ui/controls/ScrollView.hpp b/include/cru/ui/controls/ScrollView.hpp index 93fd1712..4edf1706 100644 --- a/include/cru/ui/controls/ScrollView.hpp +++ b/include/cru/ui/controls/ScrollView.hpp @@ -12,7 +12,7 @@ class ScrollView : public ContentControl { public: static ScrollView* Create() { return new ScrollView(); } - static constexpr std::u16string_view control_type = u"ScrollView"; + static constexpr StringView control_type = u"ScrollView"; ScrollView(); @@ -22,7 +22,7 @@ class ScrollView : public ContentControl { ~ScrollView() override = default; public: - std::u16string_view GetControlType() const override { return control_type; } + String GetControlType() const override { return control_type.ToString(); } render::RenderObject* GetRenderObject() const override; diff --git a/include/cru/ui/controls/StackLayout.hpp b/include/cru/ui/controls/StackLayout.hpp index aa9440c2..6128f4ef 100644 --- a/include/cru/ui/controls/StackLayout.hpp +++ b/include/cru/ui/controls/StackLayout.hpp @@ -4,7 +4,7 @@ namespace cru::ui::controls { class StackLayout : public LayoutControl { public: - static constexpr std::u16string_view control_type = u"StackLayout"; + static constexpr StringView control_type = u"StackLayout"; static StackLayout* Create() { return new StackLayout(); } @@ -17,7 +17,7 @@ class StackLayout : public LayoutControl { ~StackLayout() override; - std::u16string_view GetControlType() const final { return control_type; } + String GetControlType() const final { return control_type.ToString(); } render::RenderObject* GetRenderObject() const override; diff --git a/include/cru/ui/controls/TextBlock.hpp b/include/cru/ui/controls/TextBlock.hpp index b3ce21c5..710a39d8 100644 --- a/include/cru/ui/controls/TextBlock.hpp +++ b/include/cru/ui/controls/TextBlock.hpp @@ -6,7 +6,7 @@ namespace cru::ui::controls { class TextBlock : public NoChildControl, public virtual ITextHostControl { public: - static constexpr std::u16string_view control_type = u"TextBlock"; + static constexpr StringView control_type = u"TextBlock"; static TextBlock* Create(); static TextBlock* Create(String text, bool selectable = false); @@ -21,7 +21,7 @@ class TextBlock : public NoChildControl, public virtual ITextHostControl { TextBlock& operator=(TextBlock&& other) = delete; ~TextBlock() override; - std::u16string_view GetControlType() const final { return control_type; } + String GetControlType() const final { return control_type.ToString(); } render::RenderObject* GetRenderObject() const override; diff --git a/include/cru/ui/controls/TextBox.hpp b/include/cru/ui/controls/TextBox.hpp index 5693b315..f3925c88 100644 --- a/include/cru/ui/controls/TextBox.hpp +++ b/include/cru/ui/controls/TextBox.hpp @@ -14,7 +14,7 @@ class TextBox : public NoChildControl, public virtual IBorderControl, public virtual ITextHostControl { public: - static constexpr std::u16string_view control_type = u"TextBox"; + static constexpr StringView control_type = u"TextBox"; static TextBox* Create() { return new TextBox(); } @@ -27,7 +27,7 @@ class TextBox : public NoChildControl, ~TextBox() override; - std::u16string_view GetControlType() const final { return control_type; } + String GetControlType() const final { return control_type.ToString(); } render::RenderObject* GetRenderObject() const override; diff --git a/include/cru/ui/controls/Window.hpp b/include/cru/ui/controls/Window.hpp index cca56b64..63b4d1e3 100644 --- a/include/cru/ui/controls/Window.hpp +++ b/include/cru/ui/controls/Window.hpp @@ -7,7 +7,7 @@ namespace cru::ui::controls { class Window final : public RootControl { public: - static constexpr std::u16string_view control_type = u"Window"; + static constexpr StringView control_type = u"Window"; public: static Window* Create(Control* attached_control = nullptr); @@ -22,7 +22,7 @@ class Window final : public RootControl { ~Window() override; public: - std::u16string_view GetControlType() const final { return control_type; } + String GetControlType() const final { return control_type.ToString(); } protected: gsl::not_null<platform::gui::INativeWindow*> CreateNativeWindow( |