aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/controls/text_block.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-12-13 01:02:47 +0800
committercrupest <crupest@outlook.com>2019-12-13 01:02:47 +0800
commit9110574bb51e9e2959842a7641f598d34c3cd847 (patch)
tree96ee1f5b3c40095e4e923fc763de0663ee6a01aa /include/cru/ui/controls/text_block.hpp
parentf2aa96fba0b72eeeadf5160ea5df2c8143ec8aa0 (diff)
downloadcru-9110574bb51e9e2959842a7641f598d34c3cd847.tar.gz
cru-9110574bb51e9e2959842a7641f598d34c3cd847.tar.bz2
cru-9110574bb51e9e2959842a7641f598d34c3cd847.zip
...
Diffstat (limited to 'include/cru/ui/controls/text_block.hpp')
-rw-r--r--include/cru/ui/controls/text_block.hpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/cru/ui/controls/text_block.hpp b/include/cru/ui/controls/text_block.hpp
index 45cd12b9..708b62f1 100644
--- a/include/cru/ui/controls/text_block.hpp
+++ b/include/cru/ui/controls/text_block.hpp
@@ -10,7 +10,7 @@ class TextRenderObject;
namespace cru::ui::controls {
class TextBlock : public NoChildControl {
public:
- static constexpr auto control_type = L"TextBlock";
+ static constexpr std::string_view control_type = "TextBlock";
static TextBlock* Create() { return new TextBlock(); }
@@ -22,18 +22,18 @@ class TextBlock : public NoChildControl {
TextBlock(TextBlock&& other) = delete;
TextBlock& operator=(const TextBlock& other) = delete;
TextBlock& operator=(TextBlock&& other) = delete;
- ~TextBlock() override = default;
+ ~TextBlock() override;
- std::wstring_view GetControlType() const override final {
+ std::string_view GetControlType() const final {
return control_type;
}
render::RenderObject* GetRenderObject() const override;
- std::wstring GetText() const;
- void SetText(std::wstring text);
+ std::string GetText() const;
+ void SetText(std::string text);
private:
- std::shared_ptr<render::TextRenderObject> render_object_;
+ std::unique_ptr<render::TextRenderObject> render_object_;
};
} // namespace cru::ui::controls