diff options
author | crupest <crupest@outlook.com> | 2020-11-10 15:12:19 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-11-10 15:12:19 +0800 |
commit | 02ed6999e9db0c20c3f55ab9c695f939aacb110c (patch) | |
tree | 10b4f1cf2d8956ed5dcdd5580eadc64d0d5dbd0d /include/cru/ui | |
parent | 460a45df8be4613053c6a097d9c699c70dbe1a2c (diff) | |
download | cru-02ed6999e9db0c20c3f55ab9c695f939aacb110c.tar.gz cru-02ed6999e9db0c20c3f55ab9c695f939aacb110c.tar.bz2 cru-02ed6999e9db0c20c3f55ab9c695f939aacb110c.zip |
...
Diffstat (limited to 'include/cru/ui')
-rw-r--r-- | include/cru/ui/controls/TextBlock.hpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/cru/ui/controls/TextBlock.hpp b/include/cru/ui/controls/TextBlock.hpp index fdfdb2fa..66ebe476 100644 --- a/include/cru/ui/controls/TextBlock.hpp +++ b/include/cru/ui/controls/TextBlock.hpp @@ -9,7 +9,8 @@ class TextBlock : public NoChildControl { public: static constexpr std::u16string_view control_type = u"TextBlock"; - static TextBlock* Create() { return new TextBlock(); } + static TextBlock* Create(); + static TextBlock* Create(std::u16string text, bool selectable = false); protected: TextBlock(); @@ -28,6 +29,9 @@ class TextBlock : public NoChildControl { std::u16string GetText() const; void SetText(std::u16string text); + bool IsSelectable() const; + void SetSelectable(bool value); + gsl::not_null<render::TextRenderObject*> GetTextRenderObject(); render::ScrollRenderObject* GetScrollRenderObject() { return nullptr; } |