aboutsummaryrefslogtreecommitdiff
path: root/include/cru
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-11-19 15:57:49 +0800
committercrupest <crupest@outlook.com>2021-11-19 15:57:49 +0800
commit2ad748a0fcb66398299886970cc9c40cc50b3cd0 (patch)
treef89f283c771c66cdf79a7e54bebb05fc5f53ee18 /include/cru
parent814be0155a567328f95c3e1a2b7becf4f0b5b977 (diff)
downloadcru-2ad748a0fcb66398299886970cc9c40cc50b3cd0.tar.gz
cru-2ad748a0fcb66398299886970cc9c40cc50b3cd0.tar.bz2
cru-2ad748a0fcb66398299886970cc9c40cc50b3cd0.zip
...
Diffstat (limited to 'include/cru')
-rw-r--r--include/cru/ui/controls/TextHostControlService.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/cru/ui/controls/TextHostControlService.hpp b/include/cru/ui/controls/TextHostControlService.hpp
index 1b0908ce..6ebe2a27 100644
--- a/include/cru/ui/controls/TextHostControlService.hpp
+++ b/include/cru/ui/controls/TextHostControlService.hpp
@@ -116,6 +116,8 @@ class TextHostControlService : public Object {
gsl::index GetCaretPosition() { return selection_.GetEnd(); }
TextRange GetSelection() { return selection_; }
+ StringView GetSelectedText();
+
void SetSelection(gsl::index caret_position);
void SetSelection(TextRange selection, bool scroll_to_caret = true);
@@ -131,6 +133,10 @@ class TextHostControlService : public Object {
void ScrollToCaret();
+ void Cut();
+ void Copy();
+ void Paste();
+
gsl::not_null<render::TextRenderObject*> GetTextRenderObject();
render::ScrollRenderObject* GetScrollRenderObject();