diff options
Diffstat (limited to 'include/cru/ui/controls/TextBlock.h')
-rw-r--r-- | include/cru/ui/controls/TextBlock.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/cru/ui/controls/TextBlock.h b/include/cru/ui/controls/TextBlock.h index feb5cfa3..dc47d00a 100644 --- a/include/cru/ui/controls/TextBlock.h +++ b/include/cru/ui/controls/TextBlock.h @@ -10,19 +10,19 @@ class CRU_UI_API TextBlock : public NoChildControl, public: static constexpr StringView kControlType = u"TextBlock"; - static TextBlock* Create(); - static TextBlock* Create(String text, bool selectable = false); - - protected: - TextBlock(); - public: + TextBlock(); TextBlock(const TextBlock& other) = delete; TextBlock(TextBlock&& other) = delete; TextBlock& operator=(const TextBlock& other) = delete; TextBlock& operator=(TextBlock&& other) = delete; ~TextBlock() override; + TextBlock(String text, bool selectable = false) : TextBlock() { + SetText(std::move(text)); + SetSelectable(selectable); + } + String GetControlType() const final { return kControlType.ToString(); } render::RenderObject* GetRenderObject() const override; |