Interface IWorkspaceManager
- Namespace
- Whim
- Assembly
- Whim.dll
Container responsible for the creation and removal of IWorkspaces. Events for
workspaces are exposed here.
To activate a workspace, or change the mapping between workspaces and monitors, use the
IButler.
public interface IWorkspaceManager : IEnumerable<IWorkspace>, IEnumerable, IDisposable
- Inherited Members
- Extension Methods
Properties
ActiveWorkspace
The active workspace.
IWorkspace ActiveWorkspace { get; }
Property Value
CreateLayoutEngines
Creates the default layout engines to add to a workspace.
Func<CreateLeafLayoutEngine[]> CreateLayoutEngines { get; set; }
Property Value
this[string]
Tries to get a workspace by the given name.
IWorkspace? this[string workspaceName] { get; }
Parameters
workspaceName
string- The workspace name to try and get.
Property Value
Methods
Add(string?, IEnumerable<CreateLeafLayoutEngine>?)
Add a new workspace.
IWorkspace? Add(string? name = null, IEnumerable<CreateLeafLayoutEngine>? createLayoutEngines = null)
Parameters
name
string- The name of the workspace. Defaults to null, which will generate the name
Workspace {n}
. createLayoutEngines
IEnumerable<CreateLeafLayoutEngine>- The layout engines to add to the workspace. Defaults to null, which will use the CreateLayoutEngines function.
Returns
- IWorkspace
- If Initialize() has not been called, returns null. (i.e., will) return null while running in the config phase.
-
If a workspace cannot be created due to
createLayoutEngines
being null and CreateLayoutEngines returning no layout engines, returns null. - Otherwise, returns the created workspace.
AddProxyLayoutEngine(ProxyLayoutEngineCreator)
Adds a proxy layout engine to the workspace manager.
A proxy layout engine is used by plugins to add layout functionality to
all workspaces.
This should be used by IPlugins.
void AddProxyLayoutEngine(ProxyLayoutEngineCreator proxyLayoutEngineCreator)
Parameters
proxyLayoutEngineCreator
ProxyLayoutEngineCreator- The proxy layout engine to add.
Contains(IWorkspace)
Whether the manager contains the given workspace.
bool Contains(IWorkspace workspace)
Parameters
workspace
IWorkspace
Returns
Initialize()
Creates the workspaces from the provided names and CreateLayoutEngines function.
Do not call this directly - Whim will call this when it is ready.
void Initialize()
Remove(string)
Try remove a workspace, by the workspace name.
bool Remove(string workspaceName)
Parameters
workspaceName
string- The workspace name to try and remove.
Returns
- bool
true
when the workspace has been removed.
Remove(IWorkspace)
Tries to remove the given workspace.
bool Remove(IWorkspace workspace)
Parameters
workspace
IWorkspace- The workspace to remove.
Returns
TryGet(string)
Tries to get a workspace by the given name.
IWorkspace? TryGet(string workspaceName)
Parameters
workspaceName
string- The workspace name to try and get.
Returns
Events
ActiveLayoutEngineChanged
Event for when a workspace's active layout engine has changed.
event EventHandler<ActiveLayoutEngineChangedEventArgs>? ActiveLayoutEngineChanged
Event Type
WorkspaceAdded
Event for when a workspace is added.
event EventHandler<WorkspaceAddedEventArgs>? WorkspaceAdded
Event Type
WorkspaceLayoutCompleted
Event for when DoLayout() has completed.
event EventHandler<WorkspaceLayoutCompletedEventArgs>? WorkspaceLayoutCompleted
Event Type
WorkspaceLayoutStarted
Event for when DoLayout() has started.
event EventHandler<WorkspaceLayoutStartedEventArgs>? WorkspaceLayoutStarted
Event Type
WorkspaceRemoved
Event for when a workspace is removed.
event EventHandler<WorkspaceRemovedEventArgs>? WorkspaceRemoved
Event Type
WorkspaceRenamed
Event for when a workspace is renamed.
event EventHandler<WorkspaceRenamedEventArgs>? WorkspaceRenamed