diff options
| author | crupest <crupest@outlook.com> | 2019-04-04 17:12:25 +0800 |
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2019-04-04 17:12:25 +0800 |
| commit | a410e2048db6f5ef6fb50e401a59b4b98b979050 (patch) | |
| tree | 500680c63b074e8c3eefd756fd6a1d0f41840c1a /include/cru/platform/text_layout.hpp | |
| parent | fcaf471275a67d718887430ee63a53890915c4c7 (diff) | |
| download | cru-a410e2048db6f5ef6fb50e401a59b4b98b979050.tar.gz cru-a410e2048db6f5ef6fb50e401a59b4b98b979050.tar.bz2 cru-a410e2048db6f5ef6fb50e401a59b4b98b979050.zip | |
...
Diffstat (limited to 'include/cru/platform/text_layout.hpp')
| -rw-r--r-- | include/cru/platform/text_layout.hpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/cru/platform/text_layout.hpp b/include/cru/platform/text_layout.hpp index 7bcf01fe..e43adfde 100644 --- a/include/cru/platform/text_layout.hpp +++ b/include/cru/platform/text_layout.hpp @@ -3,16 +3,22 @@ #include "cru/common/ui_base.hpp" -#include <vector> +#include <memory> #include <string> +#include <vector> namespace cru::platform { +struct FontDescriptor; + struct TextLayout : virtual Interface { virtual std::wstring GetText() = 0; virtual void SetText(std::wstring new_text) = 0; + virtual std::shared_ptr<FontDescriptor> GetFont() = 0; + virtual void SetFont(std::shared_ptr<FontDescriptor> font) = 0; virtual void SetMaxWidth(float max_width) = 0; virtual void SetMaxHeight(float max_height) = 0; virtual ui::Rect GetTextBounds() = 0; - virtual std::vector<ui::Rect> TextRangeRect(const ui::TextRange& text_range) = 0; + virtual std::vector<ui::Rect> TextRangeRect( + const ui::TextRange& text_range) = 0; }; } // namespace cru::platform |
