mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 17:55:09 +00:00
TextEditor: Replaced 'Find' button with 'Prev' and 'Next' buttons.
This commit is contained in:
parent
952baf32cd
commit
e75e33eb46
4 changed files with 87 additions and 11 deletions
|
@ -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&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue