/*
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;
namespace dnSpy.Contracts.ToolWindows.App {
///
/// Allows adding tool windows
///
public interface IDsToolWindowService {
///
/// Adds to a tool window and gives it keyboard focus. If it's
/// already been added, it becomes active and gets keyboard focus.
///
/// Content
/// Location or null to use the default location
/// (). It's ignored if the content is already
/// present in the UI.
void Show(ToolWindowContent content, AppToolWindowLocation? location = null);
///
/// Adds content to a tool window and gives it keyboard focus. If it's already been added,
/// it becomes active and gets keyboard focus.
///
/// Guid of content, see
/// Location or null to use the default location
/// (). It's ignored if the content is already
/// present in the UI.
///
ToolWindowContent? Show(Guid guid, AppToolWindowLocation? location = null);
///
/// Removes from the UI
///
/// Content
void Close(ToolWindowContent content);
///
/// Removes the tool window from the UI
///
/// Guid
void Close(Guid guid);
///
/// Returns true if is shown in the UI
///
/// Content
///
bool IsShown(ToolWindowContent content);
///
/// Returns true if the content is shown in the UI
///
/// Guid of content, see
///
bool IsShown(Guid guid);
///
/// Returns true if it owns
///
/// Group
///
bool Owns(IToolWindowGroup toolWindowGroup);
///
/// Returns true if can execute
///
/// Content
/// Location
///
bool CanMove(ToolWindowContent? content, AppToolWindowLocation location);
///
/// Moves to a new location
///
/// Content
/// Location
void Move(ToolWindowContent? content, AppToolWindowLocation location);
///
/// Returns true if can execute
///
/// Group
/// Location
///
bool CanMove(IToolWindowGroup group, AppToolWindowLocation location);
///
/// Moves to a new location
///
/// Group
/// Location
void Move(IToolWindowGroup group, AppToolWindowLocation location);
}
}