/* Copyright (C) 2014-2019 de4dot@gmail.com This file is part of dnSpy dnSpy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. dnSpy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with dnSpy. If not, see . */ using System; using System.Collections.Generic; using dnSpy.Contracts.Menus; namespace dnSpy.Contracts.Tabs { /// /// Contains 0 or more tabs /// public interface ITabGroup { /// /// Any value can be written here. It's ignored by this instance. /// object? Tag { get; set; } /// /// Gets the owner instance /// ITabGroupService TabGroupService { get; } /// /// Gets all instances /// IEnumerable TabContents { get; } /// /// Gets the active or null if is empty /// ITabContent? ActiveTabContent { get; set; } /// /// Raised when a is attached/detached /// event EventHandler TabContentAttached; /// /// true if keyboard focus is within the tab /// bool IsKeyboardFocusWithin { get; } /// /// Sets keyboard focus /// /// Content void SetFocus(ITabContent content); /// /// Closes the tab /// /// Content void Close(ITabContent content); /// /// Adds tab content /// /// Content void Add(ITabContent content); /// /// true if can execute /// /// bool CloseActiveTabCanExecute { get; } /// /// Closes the active tab /// void CloseActiveTab(); /// /// true if can execute /// bool CloseAllTabsCanExecute { get; } /// /// Closes all tabs /// void CloseAllTabs(); /// /// true if can execute /// bool CloseAllButActiveTabCanExecute { get; } /// /// Closes all tabs except the active tab /// void CloseAllButActiveTab(); /// /// true if can execute /// bool SelectNextTabCanExecute { get; } /// /// Selects the next tab /// void SelectNextTab(); /// /// true if can execute /// bool SelectPreviousTabCanExecute { get; } /// /// Selects the previous tab /// void SelectPreviousTab(); /// /// Gets the context menu provider /// IContextMenuProvider ContextMenuProvider { get; } } }