aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls/text_block.hpp
diff options
context:
space:
mode:
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