void TabGroupCollectionChanged(ToolWindowUI ui) { if (!ui.ToolWindowGroupManager.TabGroups.Any()) { Hide(ui); } }
void Hide(ToolWindowUI ui) { Debug.Assert(!ui.ToolWindowGroupManager.TabGroups.Any()); SaveLength(ui); ui.StackedContent.Remove(ui.StackedContentChild); ui.IsAdded = false; }
void SaveLength(ToolWindowUI ui) { var length = ui.StackedContent.GetLength(ui.StackedContentChild); Debug.Assert(length.IsAbsolute); ui.Length = length.Value; }
internal bool TryAdd(ToolWindowUI ui, IToolWindowGroup g, Guid guid) { var content = Create(guid); if (content == null) { return(false); } if (GetToolWindowGroup(content) != null) { return(false); } g.Add(content); return(true); }
internal void Show(ToolWindowUI ui) { if (ui.IsAdded) { return; } SaveUILengths(); int index = ui.InsertLast ? ui.StackedContent.Count : 0; if (ui.StackedContentChild == null) { ui.StackedContentChild = StackedContentChildImpl.GetOrCreate(ui.ToolWindowGroupManager, ui.ToolWindowGroupManager.UIObject); } ui.StackedContent.AddChild(ui.StackedContentChild, ui.GetSizeInfo(), index); ui.IsAdded = true; }
void TabGroupCollectionChanged(ToolWindowUI ui) { if (!ui.ToolWindowGroupManager.TabGroups.Any()) Hide(ui); }
void SaveLength(ToolWindowUI ui) { var length = ui.StackedContent.GetLength(ui.StackedContentChild); Debug.Assert(length.IsAbsolute); ui.Length = length.Value; }
void Hide(ToolWindowUI ui) { Debug.Assert(!ui.ToolWindowGroupManager.TabGroups.Any()); SaveLength(ui); ui.StackedContent.Remove(ui.StackedContentChild); ui.IsAdded = false; }
internal bool TryAdd(ToolWindowUI ui, IToolWindowGroup g, Guid guid) { var content = Create(guid); if (content == null) return false; if (GetToolWindowGroup(content) != null) return false; g.Add(content); return true; }
internal void Show(ToolWindowUI ui) { if (ui.IsAdded) return; SaveUILengths(); int index = ui.InsertLast ? ui.StackedContent.Count : 0; if (ui.StackedContentChild == null) ui.StackedContentChild = StackedContentChildImpl.GetOrCreate(ui.ToolWindowGroupManager, ui.ToolWindowGroupManager.UIObject); ui.StackedContent.AddChild(ui.StackedContentChild, ui.GetSizeInfo(), index); ui.IsAdded = true; }