Implement undo and redo for wxTextCtrl under Mac

Use the parent undo manager to implement these functions.
This commit is contained in:
Dan Korn
2021-08-18 23:06:35 +02:00
committed by Vadim Zeitlin
parent 7501deb5fe
commit 6c292d264c
2 changed files with 44 additions and 0 deletions

View File

@@ -136,12 +136,18 @@ public:
virtual void controlTextDidChange() wxOVERRIDE;
virtual bool CanUndo() const wxOVERRIDE;
virtual void Undo() wxOVERRIDE;
virtual bool CanRedo() const wxOVERRIDE;
virtual void Redo() wxOVERRIDE;
protected:
void DoUpdateTextStyle();
NSScrollView* m_scrollView;
NSTextView* m_textView;
bool m_useCharWrapping;
NSUndoManager* m_undoManager;
};
class wxNSComboBoxControl : public wxNSTextFieldControl, public wxComboWidgetImpl