mirror of
https://github.com/RGBCube/serenity
synced 2025-07-06 17:37:35 +00:00
GTextEditor: Add on_selection_changed callback.
This is probably a bit eager and won't coalesce all updates or even ignore no-op changes to the selection.
This commit is contained in:
parent
09339fa912
commit
32e5c8c689
2 changed files with 54 additions and 13 deletions
|
@ -75,6 +75,7 @@ public:
|
|||
void set_ruler_visible(bool b) { m_ruler_visible = b; }
|
||||
|
||||
Function<void()> on_cursor_change;
|
||||
Function<void()> on_selection_change;
|
||||
|
||||
void set_text(const String&);
|
||||
void scroll_cursor_into_view();
|
||||
|
@ -160,6 +161,7 @@ private:
|
|||
void toggle_selection_if_needed_for_event(const GKeyEvent&);
|
||||
void insert_at_cursor_or_replace_selection(const String&);
|
||||
void delete_selection();
|
||||
void did_update_selection();
|
||||
|
||||
Type m_type { MultiLine };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue