public DocumentBuffer() : base(new DocumentTagTable()) { undo_manager = new DocumentUndoManager(this); InsertText += OnInsertText; DeleteRange += OnDeleteRange; TagRemoved += OnRemoved; document_loaded = false; }
public DocumentBuffer () : base (new DocumentTagTable ()) { undo_manager = new DocumentUndoManager (this); InsertText += OnInsertText; DeleteRange += OnDeleteRange; TagRemoved += OnRemoved; document_loaded = false; }
private void AddTab () { current_tab = new DocumentTab (nb_tabs); current_manager = current_tab.Buffer.Undoer; current_manager.UndoChanged += UndoChanged; nb_tabs.AppendPage (current_tab, current_tab.TabLabel); nb_tabs.ShowTabs = (nb_tabs.NPages > 1); nb_tabs.ShowAll (); nb_tabs.CurrentPage = nb_tabs.PageNum (current_tab); nb_tabs.SwitchPage += new SwitchPageHandler (OnChangeTab); }
private void OnChangeTab (object sender, SwitchPageArgs args) { current_tab = (DocumentTab) nb_tabs.GetNthPage((int) args.PageNum); current_manager = current_tab.Buffer.Undoer; Undo.Sensitive = current_manager.CanUndo; Redo.Sensitive = current_manager.CanRedo; }