aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/render/TextRenderObject.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-07-08 17:14:42 +0800
committercrupest <crupest@outlook.com>2020-07-08 17:14:42 +0800
commit83736f1208a613d2457147c2df3f493228bab3cb (patch)
tree5bd44c7d1676c040f4cd61b9862a418d5b8ba29c /include/cru/ui/render/TextRenderObject.hpp
parent3a49e87637e2493f3e5854bbcb8ab804bae5a46e (diff)
downloadcru-83736f1208a613d2457147c2df3f493228bab3cb.tar.gz
cru-83736f1208a613d2457147c2df3f493228bab3cb.tar.bz2
cru-83736f1208a613d2457147c2df3f493228bab3cb.zip
...
Diffstat (limited to 'include/cru/ui/render/TextRenderObject.hpp')
-rw-r--r--include/cru/ui/render/TextRenderObject.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/cru/ui/render/TextRenderObject.hpp b/include/cru/ui/render/TextRenderObject.hpp
index 32d96797..0b276415 100644
--- a/include/cru/ui/render/TextRenderObject.hpp
+++ b/include/cru/ui/render/TextRenderObject.hpp
@@ -66,6 +66,11 @@ class TextRenderObject : public RenderObject {
gsl::index GetCaretPosition() const { return caret_position_; }
void SetCaretPosition(gsl::index position);
+ // Lefttop relative to content lefttop.
+ Rect GetCaretRectInContent();
+ // Lefttop relative to render object lefttop.
+ Rect GetCaretRect();
+
std::shared_ptr<platform::graph::IBrush> GetCaretBrush() const {
return caret_brush_;
}