public sealed class PreviewCodeEditorViewA code editor with a pane beside it showing what the file describes.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Doc 11's "CodeEditor + live preview pane", for the two file types that have something to show. The two halves are genuinely different — see MarkupDocument and StyleSheetDocument for why a stylesheet's preview is the real cascade and a component's is its static structure — so the pane says which of the two it is drawing rather than letting them look the same.
⚠ The preview has its own document, and it must. Loading the file's stylesheet into the editor's own UiDocument would restyle the editor with the user's game CSS — an author testing a rule that hides everything would hide the editor. A nested document is not something Vixen.Ui supports, so the preview is a subtree with the sheet loaded at author origin and every selector scoped under the pane's own class, which is the containment this can actually offer today. A rule with !important at user-agent origin still escapes it; that is a real hole and the fix is a second UiDocument rendered into a texture.
Fields and properties (4)
Methods (4)
protected override void OnCreated()Builds whatever this element is made of, once, as it joins a document.
public override void Show(CodeDocument code)Shows a document.
public void Rebuild()Rebuilds the preview from the document as it stands.
protected override void Restate(CodeDocument code)Called after the document has been analysed.
Used by (2)
- EditorViewTestsVixen.Editor.AssetEditors.Tests
- MarkupEditorFactoryVixen.Editor.AssetEditors