mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 11:58:13 +00:00
LibGUI: Use UndoStack::on_state_change inside TextDocument/TextEditor
Have TextDocument listen for state changes on the internal undo stack, and forward those to all clients via a new virtual function. This simplifies updating the can_undo / can_redo states of TextEditor.
This commit is contained in:
parent
0cb6103928
commit
ee19f7c0aa
5 changed files with 17 additions and 2 deletions
|
@ -47,6 +47,7 @@ public:
|
|||
virtual void document_did_change() = 0;
|
||||
virtual void document_did_set_text() = 0;
|
||||
virtual void document_did_set_cursor(const TextPosition&) = 0;
|
||||
virtual void document_did_update_undo_stack() = 0;
|
||||
|
||||
virtual bool is_automatic_indentation_enabled() const = 0;
|
||||
virtual int soft_tab_width() const = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue