aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/graph/text_layout.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/platform/graph/text_layout.hpp')
-rw-r--r--include/cru/platform/graph/text_layout.hpp28
1 files changed, 7 insertions, 21 deletions
diff --git a/include/cru/platform/graph/text_layout.hpp b/include/cru/platform/graph/text_layout.hpp
index 56943098..4f6e81e1 100644
--- a/include/cru/platform/graph/text_layout.hpp
+++ b/include/cru/platform/graph/text_layout.hpp
@@ -1,33 +1,19 @@
#pragma once
-#include "../graphic_base.hpp"
-#include "../native_resource.hpp"
+#include "resource.hpp"
#include <memory>
#include <string>
#include <vector>
namespace cru::platform::graph {
-class Font;
+struct IFont;
-class TextLayout : public NativeResource {
- protected:
- TextLayout() = default;
+struct ITextLayout : virtual IGraphResource {
+ virtual std::string GetText() = 0;
+ virtual void SetText(std::string new_text) = 0;
- public:
- TextLayout(const TextLayout& other) = delete;
- TextLayout& operator=(const TextLayout& other) = delete;
-
- TextLayout(TextLayout&& other) = delete;
- TextLayout& operator=(TextLayout&& other) = delete;
-
- ~TextLayout() override = default;
-
- public:
- virtual std::wstring GetText() = 0;
- virtual void SetText(std::wstring new_text) = 0;
-
- virtual std::shared_ptr<Font> GetFont() = 0;
- virtual void SetFont(std::shared_ptr<Font> font) = 0;
+ virtual std::shared_ptr<IFont> GetFont() = 0;
+ virtual void SetFont(std::shared_ptr<IFont> font) = 0;
virtual void SetMaxWidth(float max_width) = 0;
virtual void SetMaxHeight(float max_height) = 0;