Class CodeEditor
An advanced widget used for displaying and editing source code.
Assembly: Ritchie.Toolbox.dll
public sealed class CodeEditor : Widget, IFontFamilyProvider, IInspectable, IUpdateThemeProperties, IGainFocusHandler, ILoseFocusHandler, IMouseClickHandler, IMouseHandler, IKeyCharHandler, IKeyDownHandler, IVisual<CodeEditor.VisualState>
Constructors
Declaration
Properties
Declaration
public bool HasSelection { get; }
Property Value
Gets a read-only reference to the visual properties associated with the widget.
Declaration
public ref readonly CodeEditor.VisualState VisualProperties { get; }
Property Value
Methods
ArrangeChildren(IGuiContext, LayoutRect)
Declaration
protected override void ArrangeChildren(IGuiContext context, LayoutRect availableSpace)
Parameters
Overrides
Declaration
protected override void BeforeRender()
Overrides
Declaration
public void DeselectAll()
GetContentSize(Point)
Declaration
protected override Point GetContentSize(Point availableSize)
Parameters
Type |
Name |
Description |
Point |
availableSize |
|
Returns
Overrides
GetDocumentTExt()
Declaration
public string GetDocumentTExt()
Returns
GetSelectionText()
Declaration
public string GetSelectionText()
Returns
LoadDocumentAsync(Stream, Encoding)
Declaration
public Task LoadDocumentAsync(Stream stream, Encoding encoding)
Parameters
Returns
Declaration
public void OnFocusGained(FocusEvent e)
Parameters
Declaration
public void OnFocusLost(FocusEvent e)
Parameters
Declaration
public void OnKeyChar(KeyCharEvent e)
Parameters
Declaration
public void OnKeyDown(KeyEvent e)
Parameters
Declaration
public void OnMouseClick(MouseButtonEvent e)
Parameters
Declaration
protected override void RebuildClippingZone(GeometryHelper geometry)
Parameters
Overrides
Declaration
protected override void RebuildGeometry(GeometryHelper geometry)
Parameters
Overrides
SaveTo(Stream, Encoding)
Declaration
public void SaveTo(Stream stream, Encoding encoding)
Parameters
SaveTo(StringBuilder)
Declaration
public void SaveTo(StringBuilder stringBuilder)
Parameters
SaveToAsync(Stream, Encoding)
Declaration
public Task SaveToAsync(Stream stream, Encoding encoding)
Parameters
Returns
Declaration
SetDocumentTExt(string)
Declaration
public void SetDocumentTExt(string text)
Parameters
Type |
Name |
Description |
string |
text |
|
Declaration
public void StartNewDocument()
Retrieves layout properties from the visual style. Called by the UI system on every
frame before layout updates occur. If layout properties change during this method call,
the widget will automatically invalidate its own layout.
Declaration
public void UpdateThemeProperties()
Implements
Extension Methods