public void Select(DocumentTab tab) { int index = tabs.IndexOf(tab); if (index != -1) { Select(index); } }
public void RemoveTab(DocumentTab tab) { int index = tabs.IndexOf(tab); if (index != -1) { RemoveTab(index); } }
void IDocumentViewerHelper.SetFocus() { Debug.Assert(!isDisposed); if (isDisposed) { return; } DocumentTab.TrySetFocus(); }
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); }
public void AddTab(DocumentTab tab, bool select) { tabs.Add(tab); if (select) { selectedIndex = tabs.Count - 1; SelectedTabChanged?.Invoke(this, new EventArgs()); } Invalidate(); }
void IDocumentViewerHelper.FollowReference(TextReference textRef, bool newTab) { Debug.Assert(!isDisposed); if (isDisposed) { return; } Debug.Assert(DocumentTab != null); if (DocumentTab == null) { return; } DocumentTab.FollowReference(textRef, newTab); }
public void InsertTab(int index, DocumentTab tab, bool select) { if (index < 0 || index > tabs.Count) { throw new ArgumentOutOfRangeException(nameof(index), index, "Index must be within the bounds of " + nameof(Tabs)); } tabs.Insert(index, tab); if (select) { selectedIndex = index; SelectedTabChanged?.Invoke(this, new EventArgs()); } Invalidate(); }
public SaveAction(DocumentTab tab) : base("Save", AssetManager.ICON_SAVE) { this.tab = tab; }
public void DocumentTab_Ctor() { var actual = new DocumentTab(); Assert.NotNull(actual); }