You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
186 lines
4.6 KiB
186 lines
4.6 KiB
// <file> |
|
// <copyright see="prj:///doc/copyright.txt"/> |
|
// <license see="prj:///doc/license.txt"/> |
|
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/> |
|
// <version>$Revision$</version> |
|
// </file> |
|
|
|
using System; |
|
using System.Collections.Generic; |
|
using System.Windows.Forms; |
|
using ICSharpCode.Core; |
|
|
|
namespace ICSharpCode.SharpDevelop.Gui |
|
{ |
|
/// <summary> |
|
/// This is the basic interface to the workspace. |
|
/// </summary> |
|
public interface IWorkbench : IMementoCapable |
|
{ |
|
/// <summary> |
|
/// Gets the main form for the work bench. |
|
/// </summary> |
|
Form MainForm { |
|
get; |
|
} |
|
|
|
/// <summary> |
|
/// The title shown in the title bar. |
|
/// </summary> |
|
string Title { |
|
get; |
|
set; |
|
} |
|
|
|
/// <summary> |
|
/// A collection in which all opened view contents (including all secondary view contents) are saved. |
|
/// </summary> |
|
ICollection<IViewContent> ViewContentCollection { |
|
get; |
|
} |
|
|
|
/// <summary> |
|
/// A collection in which all opened primary view contents are saved. |
|
/// </summary> |
|
ICollection<IViewContent> PrimaryViewContents { |
|
get; |
|
} |
|
|
|
/// <summary> |
|
/// A collection in which all active workspace windows are saved. |
|
/// </summary> |
|
IList<IWorkbenchWindow> WorkbenchWindowCollection { |
|
get; |
|
} |
|
|
|
/// <summary> |
|
/// A collection in which all active workspace windows are saved. |
|
/// </summary> |
|
IList<PadDescriptor> PadContentCollection { |
|
get; |
|
} |
|
|
|
/// <summary> |
|
/// The active workbench window. |
|
/// This is the window containing the active view content. |
|
/// </summary> |
|
IWorkbenchWindow ActiveWorkbenchWindow { |
|
get; |
|
} |
|
|
|
/// <summary> |
|
/// Is called, when the ActiveWorkbenchWindow property changes. |
|
/// </summary> |
|
event EventHandler ActiveWorkbenchWindowChanged; |
|
|
|
/// <summary> |
|
/// The active view content inside the active workbench window. |
|
/// </summary> |
|
IViewContent ActiveViewContent { |
|
get; |
|
} |
|
|
|
/// <summary> |
|
/// Is called, when the active view content has changed. |
|
/// </summary> |
|
event EventHandler ActiveViewContentChanged; |
|
|
|
/// <summary> |
|
/// The active content, depending on where the focus currently is. |
|
/// If a document is currently active, this will be equal to ActiveViewContent, |
|
/// if a pad has the focus, this property will return the IPadContent instance. |
|
/// </summary> |
|
object ActiveContent { |
|
get; |
|
} |
|
|
|
/// <summary> |
|
/// Is called, when the active content has changed. |
|
/// </summary> |
|
event EventHandler ActiveContentChanged; |
|
|
|
IWorkbenchLayout WorkbenchLayout { |
|
get; |
|
set; |
|
} |
|
|
|
/// <summary> |
|
/// Gets whether SharpDevelop is the active application in Windows. |
|
/// </summary> |
|
bool IsActiveWindow { |
|
get; |
|
} |
|
|
|
/// <summary> |
|
/// Initializes the workbench. |
|
/// </summary> |
|
void Initialize(); |
|
|
|
/// <summary> |
|
/// Inserts a new <see cref="IViewContent"/> object in the workspace and switches to the new view. |
|
/// </summary> |
|
void ShowView(IViewContent content); |
|
|
|
/// <summary> |
|
/// Inserts a new <see cref="IViewContent"/> object in the workspace. |
|
/// </summary> |
|
void ShowView(IViewContent content, bool switchToOpenedView); |
|
|
|
/// <summary> |
|
/// Inserts a new <see cref="IPadContent"/> object in the workspace. |
|
/// </summary> |
|
void ShowPad(PadDescriptor content); |
|
|
|
/// <summary> |
|
/// Closes and disposes a <see cref="IPadContent"/>. |
|
/// </summary> |
|
void UnloadPad(PadDescriptor content); |
|
|
|
/// <summary> |
|
/// Returns a pad from a specific type. |
|
/// </summary> |
|
PadDescriptor GetPad(Type type); |
|
|
|
/// <summary> |
|
/// Closes the IViewContent content when content is open. |
|
/// </summary> |
|
void CloseContent(IViewContent content); |
|
|
|
/// <summary> |
|
/// Closes all views inside the workbench. |
|
/// </summary> |
|
void CloseAllViews(); |
|
|
|
/// <summary> |
|
/// Re-initializes all components of the workbench, should be called |
|
/// when a special property is changed that affects layout stuff. |
|
/// (like language change) |
|
/// </summary> |
|
void RedrawAllComponents(); |
|
|
|
/// <summary> |
|
/// Updates the toolstrip renderer. |
|
/// </summary> |
|
void UpdateRenderer(); |
|
|
|
/// <summary> |
|
/// Is called, when a workbench view was opened |
|
/// </summary> |
|
/// <example> |
|
/// WorkbenchSingleton.WorkbenchCreated += delegate { |
|
/// WorkbenchSingleton.Workbench.ViewOpened += ...; |
|
/// }; |
|
/// </example> |
|
event ViewContentEventHandler ViewOpened; |
|
|
|
/// <summary> |
|
/// Is called, when a workbench view was closed |
|
/// </summary> |
|
event ViewContentEventHandler ViewClosed; |
|
|
|
/// <summary> |
|
/// Is called when a key is pressed. Can be used to intercept command keys. |
|
/// </summary> |
|
event System.Windows.Forms.KeyEventHandler ProcessCommandKey; |
|
} |
|
}
|
|
|