diff options
author | crupest <crupest@outlook.com> | 2019-04-02 21:57:01 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2019-04-02 21:57:01 +0800 |
commit | ec201783e4b4733770648c2f92c3ffb9629bb7f7 (patch) | |
tree | 2257b0110b499b73832efbb6dc8d583869d98cf8 /include/cru/platform/text_layout.hpp | |
parent | 1e0a77c9fd9ffe1423b2e02c989a15071d3205a4 (diff) | |
download | cru-ec201783e4b4733770648c2f92c3ffb9629bb7f7.tar.gz cru-ec201783e4b4733770648c2f92c3ffb9629bb7f7.tar.bz2 cru-ec201783e4b4733770648c2f92c3ffb9629bb7f7.zip |
...
Diffstat (limited to 'include/cru/platform/text_layout.hpp')
-rw-r--r-- | include/cru/platform/text_layout.hpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/cru/platform/text_layout.hpp b/include/cru/platform/text_layout.hpp new file mode 100644 index 00000000..fce6ce5f --- /dev/null +++ b/include/cru/platform/text_layout.hpp @@ -0,0 +1,15 @@ +#pragma once +#include "cru/common/base.hpp" + +#include "cru/common/ui_base.hpp" + +#include <vector> + +namespace cru::platform { +struct TextLayout : virtual Interface { + 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; +}; +} // namespace cru::platform |