aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls/text_block.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-03-24 19:44:31 +0800
committercrupest <crupest@outlook.com>2019-03-24 19:44:31 +0800
commitb76e435faca204f830644047077ab08930dc8f9c (patch)
tree8bca146bc7443a704d3cb4b71b36e632cb505c25 /src/ui/controls/text_block.hpp
parent79d1d76509dbf6cf9c79f8eb55968535982975aa (diff)
downloadcru-b76e435faca204f830644047077ab08930dc8f9c.tar.gz
cru-b76e435faca204f830644047077ab08930dc8f9c.tar.bz2
cru-b76e435faca204f830644047077ab08930dc8f9c.zip
...
Diffstat (limited to 'src/ui/controls/text_block.hpp')
-rw-r--r--src/ui/controls/text_block.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ui/controls/text_block.hpp b/src/ui/controls/text_block.hpp
index 4c443020..0d65dd67 100644
--- a/src/ui/controls/text_block.hpp
+++ b/src/ui/controls/text_block.hpp
@@ -1,6 +1,8 @@
#pragma once
#include "pre.hpp"
+#include <memory>
+
#include "ui/no_child_control.hpp"
namespace cru::ui::render {
@@ -22,7 +24,7 @@ class TextBlock : public NoChildControl {
TextBlock(TextBlock&& other) = delete;
TextBlock& operator=(const TextBlock& other) = delete;
TextBlock& operator=(TextBlock&& other) = delete;
- ~TextBlock() override;
+ ~TextBlock() override = default;
StringView GetControlType() const override final { return control_type; }
@@ -32,6 +34,6 @@ class TextBlock : public NoChildControl {
void SetText(const String& text);
private:
- render::TextRenderObject* render_object_;
+ std::shared_ptr<render::TextRenderObject> render_object_;
};
} // namespace cru::ui::controls