summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/GTextEditor.h
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibGUI/GTextEditor.h')
-rw-r--r--Libraries/LibGUI/GTextEditor.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/Libraries/LibGUI/GTextEditor.h b/Libraries/LibGUI/GTextEditor.h
index be9468644b..dfa26ef57f 100644
--- a/Libraries/LibGUI/GTextEditor.h
+++ b/Libraries/LibGUI/GTextEditor.h
@@ -12,6 +12,7 @@ class GScrollBar;
class Painter;
enum class ShouldWrapAtEndOfDocument { No = 0, Yes };
+enum class ShouldWrapAtStartOfDocument { No = 0, Yes };
class GTextPosition {
public:
@@ -126,9 +127,12 @@ public:
bool write_to_file(const StringView& path);
- GTextRange find(const StringView&, const GTextPosition& start = {});
- GTextPosition next_position_after(const GTextPosition&, ShouldWrapAtEndOfDocument = ShouldWrapAtEndOfDocument::Yes);
+ GTextRange find_next(const StringView&, const GTextPosition& start = {});
+ GTextRange find_prev(const StringView&, const GTextPosition& start = {});
+ GTextPosition next_position_after(const GTextPosition&, ShouldWrapAtEndOfDocument = ShouldWrapAtEndOfDocument::Yes);
+ GTextPosition prev_position_before(const GTextPosition&, ShouldWrapAtStartOfDocument = ShouldWrapAtStartOfDocument::Yes);
+
bool has_selection() const { return m_selection.is_valid(); }
String selected_text() const;
void set_selection(const GTextRange&);