/*
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;
namespace dnSpy.Contracts.Tabs {
///
/// manager
///
public interface ITabGroupService {
///
/// Any value can be written here. It's ignored by this instance.
///
object? Tag { get; set; }
///
/// Gets the instance
///
ITabService TabService { get; }
///
/// Gets all instances
///
IEnumerable TabGroups { get; }
///
/// Gets the active or null if is empty
///
ITabGroup? ActiveTabGroup { get; set; }
///
/// true if the s are lined up horizontally, else vertically
///
bool IsHorizontal { get; set; }
///
/// Creates a new instance
///
///
ITabGroup Create();
///
/// Gets the UI object
///
object? UIObject { get; }
///
/// Raised when a new tab has been selected
///
event EventHandler TabSelectionChanged;
///
/// Raised when a new tab group has been selected
///
event EventHandler TabGroupSelectionChanged;
///
/// Raised when a tab group has been added or removed
///
event EventHandler TabGroupCollectionChanged;
///
/// Closes the tab group
///
/// Tab group
void Close(ITabGroup tabGroup);
///
/// true if can execute
///
bool CloseAllTabsCanExecute { get; }
///
/// Closes all tabs
///
void CloseAllTabs();
///
/// true if can execute
///
bool NewHorizontalTabGroupCanExecute { get; }
///
/// Moves the active tab to a new horizontal tab group
///
/// Called after the instance has been created
void NewHorizontalTabGroup(Action? onCreated = null);
///
/// true if can execute
///
bool NewVerticalTabGroupCanExecute { get; }
///
/// Moves the active tab to a new vertical tab group
///
/// Called after the instance has been created
void NewVerticalTabGroup(Action? onCreated = null);
///
/// true if can execute
///
bool MoveToNextTabGroupCanExecute { get; }
///
/// Moves active tab to the next tab group
///
void MoveToNextTabGroup();
///
/// true if can execute
///
bool MoveToPreviousTabGroupCanExecute { get; }
///
/// Moves the active tab to the previous tab group
///
void MoveToPreviousTabGroup();
///
/// true if can execute
///
bool MoveAllToNextTabGroupCanExecute { get; }
///
/// Moves all tabs in the current tab group to the next tab group
///
void MoveAllToNextTabGroup();
///
/// true if can execute
///
bool MoveAllToPreviousTabGroupCanExecute { get; }
///
/// Moves all tabs in the current tab group to the previous tab group
///
void MoveAllToPreviousTabGroup();
///
/// true if can execute
///
bool CloseTabGroupCanExecute { get; }
///
/// Closes the tab group and all its tabs
///
void CloseTabGroup();
///
/// true if can execute
///
bool CloseAllTabGroupsButThisCanExecute { get; }
///
/// Closes all tab groups except the active one
///
void CloseAllTabGroupsButThis();
///
/// true if can execute
///
bool MoveTabGroupAfterNextTabGroupCanExecute { get; }
///
/// Moves the active tab group after the next one
///
void MoveTabGroupAfterNextTabGroup();
///
/// true if can execute
///
bool MoveTabGroupBeforePreviousTabGroupCanExecute { get; }
///
/// Moves the active tab group before the previous one
///
void MoveTabGroupBeforePreviousTabGroup();
///
/// true if can execute
///
bool MergeAllTabGroupsCanExecute { get; }
///
/// Moves all tabs to one tab group and closes the remaining (empty) tab groups
///
void MergeAllTabGroups();
///
/// true if can execute
///
bool UseVerticalTabGroupsCanExecute { get; }
///
/// Stacks all tab groups vertically
///
void UseVerticalTabGroups();
///
/// true if can execute
///
bool UseHorizontalTabGroupsCanExecute { get; }
///
/// Stacks all tab groups horizontally
///
void UseHorizontalTabGroups();
}
}