Table of Contents

Class ValidatingTextEditor

Namespace
NanoByte.StructureEditor.EtoForms
Assembly
NanoByte.StructureEditor.EtoForms.dll

A text editor that automatically validates changes using an external callback after a short period of no input.

public class ValidatingTextEditor : Panel, IHandlerSource, IDisposable, IBindable, IMouseInputSource, IKeyboardInputSource, ICallbackSource, IBindableWidgetContainer, IPendingChanges
Inheritance
object
Widget
BindableWidget
Control
Container
Panel
ValidatingTextEditor
Implements
IHandlerSource
IBindable
IMouseInputSource
IKeyboardInputSource
ICallbackSource
IBindableWidgetContainer
Inherited Members
Panel.Remove(Control)
Panel.Controls
Panel.Padding
Panel.MinimumSize
Panel.ContextMenu
Panel.Content
Container.RemoveAll()
Container.RemoveParent(Control)
Container.SetLogicalParent(Control)
Container.RemoveLogicalParent(Control)
Container.ClientSize
Container.Children
Container.VisualChildren
Container.StyleProvider
Container.Styles
Control.SizeChangedEvent
Control.KeyDownEvent
Control.KeyUpEvent
Control.TextInputEvent
Control.MouseDownEvent
Control.MouseUpEvent
Control.MouseMoveEvent
Control.MouseLeaveEvent
Control.MouseEnterEvent
Control.MouseDoubleClickEvent
Control.MouseWheelEvent
Control.GotFocusEvent
Control.LostFocusEvent
Control.ShownEvent
Control.ThemeChangedEvent
Control.DragDropEvent
Control.DragOverEvent
Control.DragEnterEvent
Control.DragLeaveEvent
Control.DragEndEvent
Control.EnabledChangedEvent
Control.OnKeyDown(KeyEventArgs)
Control.OnKeyUp(KeyEventArgs)
Control.OnTextInput(TextInputEventArgs)
Control.OnMouseDown(MouseEventArgs)
Control.OnMouseUp(MouseEventArgs)
Control.OnMouseMove(MouseEventArgs)
Control.OnMouseLeave(MouseEventArgs)
Control.OnMouseEnter(MouseEventArgs)
Control.OnMouseDoubleClick(MouseEventArgs)
Control.OnMouseWheel(MouseEventArgs)
Control.OnDragDrop(DragEventArgs)
Control.OnDragOver(DragEventArgs)
Control.OnDragEnter(DragEventArgs)
Control.OnDragLeave(DragEventArgs)
Control.OnDragEnd(DragEventArgs)
Control.Invalidate()
Control.Invalidate(Rectangle)
Control.UpdateLayout()
Control.GetPreferredSize()
Control.GetPreferredSize(SizeF)
Control.CaptureMouse()
Control.ReleaseMouseCapture()
Control.Detach()
Control.AttachNative()
Control.DetachNative()
Control.Focus()
Control.SuspendLayout()
Control.ResumeLayout()
Control.PointFromScreen(PointF)
Control.PointToScreen(PointF)
Control.RectangleToScreen(RectangleF)
Control.RectangleFromScreen(RectangleF)
Control.DoDragDrop(DataObject, DragEffects)
Control.DoDragDrop(DataObject, DragEffects, Image, PointF)
Control.TriggerStyleChanged()
Control.OnApplyCascadingStyles()
Control.Print()
Control.GetCallback()
Control.IsDesignMode
Control.Handler
Control.Gestures
Control.Loaded
Control.VisualControls
Control.Tag
Control.LogicalParent
Control.IsVisualControl
Control.Size
Control.IsMouseCaptured
Control.Width
Control.Height
Control.Enabled
Control.Visible
Control.Parent
Control.VisualParent
Control.IsAttached
Control.BackgroundColor
Control.HasFocus
Control.IsSuspended
Control.ParentWindow
Control.SupportedPlatformCommands
Control.Bounds
Control.Location
Control.Cursor
Control.ToolTip
Control.TabIndex
Control.TabStop
Control.AllowDrop
Control.SizeChanged
Control.KeyDown
Control.KeyUp
Control.TextInput
Control.MouseDown
Control.MouseUp
Control.MouseMove
Control.MouseLeave
Control.MouseEnter
Control.MouseDoubleClick
Control.MouseWheel
Control.GotFocus
Control.LostFocus
Control.Shown
Control.ThemeChanged
Control.PreLoad
Control.Load
Control.LoadComplete
Control.UnLoad
Control.DragDrop
Control.DragOver
Control.DragEnter
Control.DragLeave
Control.DragEnd
Control.EnabledChanged
BindableWidget.Unbind()
BindableWidget.UpdateBindings(BindingUpdateMode)
BindableWidget.Parents
BindableWidget.DataContext
BindableWidget.Bindings
BindableWidget.IsDataContextChanging
BindableWidget.DataContextChanged
Widget.Initialize()
Widget.Dispose()
Widget.ToString()
Widget.Platform
Widget.NativeHandle
Widget.Properties
Widget.ID
Widget.Style
Widget.ControlObject
Widget.IsDisposed
Widget.StyleChanged

Constructors

ValidatingTextEditor()

Creates a new validating text editor using Default.

public ValidatingTextEditor()

ValidatingTextEditor(ITextEditor)

Creates a new validating text editor.

public ValidatingTextEditor(ITextEditor textEditor)

Parameters

textEditor ITextEditor

The text editor control to use internally.

Properties

TextEditor

The text editor control used internally.

public ITextEditor TextEditor { get; }

Property Value

ITextEditor

Methods

CommitPendingChanges()

Validates any changes immediately instead of waiting for a period of no input.

public void CommitPendingChanges()

Dispose(bool)

protected override void Dispose(bool disposing)

Parameters

disposing bool

SetContent(string, IStructureSerializer)

Sets a new text to be edited.

public void SetContent(string text, IStructureSerializer serializer)

Parameters

text string

The text to set.

serializer IStructureSerializer

The serializer that produced the text. Determines the highlighting scheme and is used to locate errors.

Events

ContentChanged

Raised when changes have accumulated after a short period of no input.

public event Action<string>? ContentChanged

Event Type

Action<string>

Remarks

Handlers should throw an exception if the text is invalid. It is then displayed as an error.