mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
LibGUI+TextEditor: Add the calculation of selected words
This moves the calculation of selected words that was originally in the TextEditor application to TextEditor in LibGUI. This allows all applications with text editors to get this number without having to calculating it themselves.
This commit is contained in:
parent
074813e441
commit
8146543a43
Notes:
sideshowbarker
2024-07-18 17:20:41 +09:00
Author: https://github.com/ry-sev
Commit: 8146543a43
Pull-request: https://github.com/SerenityOS/serenity/pull/7473
3 changed files with 25 additions and 13 deletions
|
@ -115,6 +115,7 @@ public:
|
|||
bool write_to_file(const String& path);
|
||||
bool has_selection() const { return m_selection.is_valid(); }
|
||||
String selected_text() const;
|
||||
size_t number_of_selected_words() const;
|
||||
void set_selection(const TextRange&);
|
||||
void clear_selection();
|
||||
bool can_undo() const { return document().can_undo(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue