Vixen
02b45cc4
csharp
public class CodeEditorView

A code editor over a document, with its diagnostics in the gutter.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The pane, not the editor. CodeEditor is the control — lines, folding, completion, a caret — and this is what joins one to a CodeDocument: the buffer, the tokenizer, and putting the analysis back on it after it runs.

⚠ Analysis is driven from here and is not automatic. Analyse is called by whatever decides when a pause has happened — the host's frame loop, a timer, a Save — because parsing per keystroke is a parse per keystroke and a document that did it for you could not be talked out of it.

Fields and properties (5)

  • protected override string TagName

    The element name this type answers to when a caller does not choose one.

  • protected override bool AcceptsFocus

    Whether the focus can rest on this kind of control at all.

  • public CodeEditor Editor

    The editor.

  • public CodeDocument? Edited

    The document being edited, or .

  • public int Errors

    How many errors the last analysis found.

Methods (4)

  • protected override void OnCreated()

    Builds whatever this element is made of, once, as it joins a document.

  • public virtual void Show(CodeDocument code)

    Shows a document.

  • public int Analyse()

    Runs the document's analysis and puts the result in the gutter.

  • protected virtual void Restate(CodeDocument code)

    Called after the document has been analysed.

Used by (2)

  • PreviewCodeEditorViewVixen.Editor.AssetEditors
  • ShaderEditorFactoryVixen.Editor.AssetEditors