public interface IWorkspaceWhere a document is shown: the registered views, and the one call that builds one into a panel.
Remarks
Doc 50 § D4's Workspace half. IDocumentHost.TryOpen resolves the kind and hands back a document; Show resolves its view. A module reaches it with Require<IWorkspace>() to register a view, or to hear one built with Shown — which is how a module joins its own views to its own services without the application naming either.
And the arrangement's own verbs (#1294): where a document's panel goes (Place), keeping the arrangement (SaveLayout) and the theme the user has written over the shipped one (ThemeTokens, ReloadStyles). Those were EditorApplication's, and they are the Workspace context's words — a panel id, a layout, a stylesheet — so this is their home.
⚠ Not § F1's other parked fields, and not for want of moving them. This assembly refuses Vixen.Editor.Core on purpose, and the browser, the outliner, the inspectors and the viewport's cameras are types of Vixen.Editor.App, .Inspector and .SceneView, which a Workspace interface here cannot name. Doc 50 gives each its own context's model (IContentLibrary.Shown, IDiagnostics.Console, the viewport's views) rather than this one.
Fields and properties (3)
IReadOnlyList<DocumentView> ViewsEvery registered view, in registration order.
RecentDocuments RecentThe documents recently opened in a tab or saved, by location, newest first (#656).
string ThemeTokensThe theme tokens the user has written over the shipped palette, as the YAML they are kept in.
Events (1)
Action<UiElement, IEditableDocument>? ShownRaised after Show built a view, with the view's root and its document.
Methods (10)
IDisposable Add(DocumentView view)Registers a view, and hands back the removal.
bool TryGetView(IEditableDocument document, out DocumentView? view)Finds the view for a document.
bool TryGetView(Type documentType, out DocumentView? view)Finds a view registered for a type or for one of its bases, without a document to ask.
UiElement? Show(IEditableDocument document, UiElement panel)Builds a document's view into a panel, which then hosts the document.
bool Open(AssetId asset)Opens an asset in a panel of its own — the document a double-click opens, in the tab a double-click brings forward.
T ViewState<T>(string view) where T : class, new()The durable state of one view — what it is looking at, which must outlive the panel showing it.
void Place(string panelId)Puts a document's panel where documents go — beside the scene — before it is opened.
string SaveLayout()Keeps the arrangement on screen in the user's store, named after the preset it came from.
bool ApplyThemeTokens(string text)Keeps new theme tokens and restyles the editor with them; an empty text is the shipped palette.
void ReloadStyles()Reads the theme tokens again and restyles the editor, so a hand edit of the file shows without a restart.
Used by (21)
- AssetEditorsModuleVixen.Editor.AssetEditors
- AssetEditorsModuleReachTestsVixen.Editor.App.Tests
- DocumentHostTestsVixen.Editor.AssetEditors.Tests
- DocumentPairingTestsVixen.Editor.App.Tests
- EditorAddingModuleVixen.Editor.AssetEditors.Tests
- EditorApplicationVixen.Editor.App
- EditorWorkspaceVixen.Editor.Ui
- EditorWriteEchoTestsVixen.Editor.App.Tests
- HelpAndWorkspaceModuleTestsVixen.Editor.App.Tests
- LibraryModuleVixen.Editor.App
- OutOfTreePluginTestsVixen.Editor.App.Tests
- OutlinerTestsVixen.Editor.App.Tests
- RecentDocumentsMenuTestsVixen.Editor.App.Tests
- SceneModuleVixen.Editor.App
- ServiceReachTestsVixen.Editor.App.Tests
- StandardEditorsVixen.Editor.AssetEditors
- TexturingFixtureVixen.Editor.Texturing.Tests
- TexturingModuleVixen.Editor.Texturing
- ViewStateTestsVixen.Editor.Ui.Tests
- ViewportTestsVixen.Editor.App.Tests
- WorkspaceModuleVixen.Editor.App