Table of Contents

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.
[Obsolete("Use transforms and pickers to interact with the store instead.")]
public interface IWorkspaceManager : IEnumerable<IWorkspace>, IEnumerable, IDisposable
Inherited Members

Properties

ActiveWorkspace

The active workspace.
[Obsolete("Use the picker PickActiveWorkspace instead.")]
IWorkspace ActiveWorkspace { get; }

Property Value

IWorkspace

CreateLayoutEngines

Creates the default layout engines to add to a workspace.
[Obsolete("Use the picker PickCreateLeafLayoutEngines or the transform SetCreateLayoutEnginesTransform instead.")]
Func<CreateLeafLayoutEngine[]> CreateLayoutEngines { get; set; }

Property Value

Func<CreateLeafLayoutEngine[]>

this[string]

Tries to get a workspace by the given name.
[Obsolete("Use the picker PickWorkspaceByName instead.")]
IWorkspace? this[string workspaceName] { get; }

Parameters

workspaceName string
The workspace name to try and get.

Property Value

IWorkspace

Methods

Add(string?, IEnumerable<CreateLeafLayoutEngine>?)

Add a new workspace.
[Obsolete("Use the transform AddWorkspaceTransform instead.")]
Guid? 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

Guid?
  • 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 ID of 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.
[Obsolete("Use the transform AddProxyLayoutEngineTransform instead.")]
void AddProxyLayoutEngine(ProxyLayoutEngineCreator proxyLayoutEngineCreator)

Parameters

proxyLayoutEngineCreator ProxyLayoutEngineCreator
The proxy layout engine to add.

Contains(IWorkspace)

Whether the manager contains the given workspace.
[Obsolete("Use the picker PickWorkspaces instead.")]
bool Contains(IWorkspace workspace)

Parameters

workspace IWorkspace

Returns

bool

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.
[Obsolete("Use the transform RemoveWorkspaceByNameTransform instead.")]
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.
[Obsolete("Use the transform RemoveWorkspaceTransform instead.")]
bool Remove(IWorkspace workspace)

Parameters

workspace IWorkspace
The workspace to remove.

Returns

bool

TryGet(string)

Tries to get a workspace by the given name.
[Obsolete("Use the picker PickWorkspaceByName instead.")]
IWorkspace? TryGet(string workspaceName)

Parameters

workspaceName string
The workspace name to try and get.

Returns

IWorkspace

Events

ActiveLayoutEngineChanged

Event for when a workspace's active layout engine has changed.
[Obsolete("Use the IStore.IWorkspaceSectorEvents.ActiveLayoutEngineChanged event instead.")]
event EventHandler<ActiveLayoutEngineChangedEventArgs>? ActiveLayoutEngineChanged

Event Type

EventHandler<ActiveLayoutEngineChangedEventArgs>

WorkspaceAdded

Event for when a workspace is added.
[Obsolete("Use the IStore.IWorkspaceSectorEvents.WorkspaceAdded event instead.")]
event EventHandler<WorkspaceAddedEventArgs>? WorkspaceAdded

Event Type

EventHandler<WorkspaceAddedEventArgs>

WorkspaceLayoutCompleted

Event for when DoLayout() has completed.
[Obsolete("Use the IStore.IWorkspaceSectorEvents.WorkspaceLayoutCompleted event instead.")]
event EventHandler<WorkspaceLayoutCompletedEventArgs>? WorkspaceLayoutCompleted

Event Type

EventHandler<WorkspaceLayoutCompletedEventArgs>

WorkspaceLayoutStarted

Event for when DoLayout() has started.
[Obsolete("Use the IStore.IWorkspaceSectorEvents.WorkspaceLayoutStarted event instead.")]
event EventHandler<WorkspaceLayoutStartedEventArgs>? WorkspaceLayoutStarted

Event Type

EventHandler<WorkspaceLayoutStartedEventArgs>

WorkspaceRemoved

Event for when a workspace is removed.
[Obsolete("Use the IStore.IWorkspaceSectorEvents.WorkspaceRemoved event instead.")]
event EventHandler<WorkspaceRemovedEventArgs>? WorkspaceRemoved

Event Type

EventHandler<WorkspaceRemovedEventArgs>

WorkspaceRenamed

Event for when a workspace is renamed.
[Obsolete("Use the IStore.IWorkspaceSectorEvents.WorkspaceRenamed event instead.")]
event EventHandler<WorkspaceRenamedEventArgs>? WorkspaceRenamed

Event Type

EventHandler<WorkspaceRenamedEventArgs>