C# Class ICSharpCode.AvalonEdit.TextEditor

Afficher le fichier Open project: gilgame/SEWorkbench Class Usage Examples

Méthodes publiques

Свойство Type Description
DocumentProperty System.Windows.DependencyProperty
HorizontalScrollBarVisibilityProperty System.Windows.DependencyProperty
IsModifiedProperty System.Windows.DependencyProperty
IsReadOnlyProperty System.Windows.DependencyProperty
LineNumbersForegroundProperty System.Windows.DependencyProperty
MouseHoverEvent System.Windows.RoutedEvent
MouseHoverStoppedEvent System.Windows.RoutedEvent
OptionsProperty System.Windows.DependencyProperty
PreviewMouseHoverEvent System.Windows.RoutedEvent
PreviewMouseHoverStoppedEvent System.Windows.RoutedEvent
ShowLineNumbersProperty System.Windows.DependencyProperty
SyntaxHighlightingProperty System.Windows.DependencyProperty
VerticalScrollBarVisibilityProperty System.Windows.DependencyProperty
WordWrapProperty System.Windows.DependencyProperty

Private Properties

Свойство Type Description
CanExecute bool
Execute void
GetDocument ICSharpCode.AvalonEdit.Document.TextDocument
HandleIsOriginalChanged bool
IServiceProvider object
IWeakEventListener bool
OnDocumentChanged void
OnDocumentChanged void
OnIsModifiedChanged void
OnIsReadOnlyChanged void
OnLineNumbersForegroundChanged void
OnOptionsChanged void
OnOptionsChanged void
OnShowLineNumbersChanged void
OnSyntaxHighlightingChanged void
OnSyntaxHighlightingChanged void
SetCurrentValue void
TextArea_SelectionChanged void
TextEditor System

Méthodes publiques

Méthode Description
AppendText ( string textData ) : void

Appends text to the end of the document.

BeginChange ( ) : void

Begins a group of document changes.

Clear ( ) : void

Clears the text.

Copy ( ) : void

Copies the current selection to the clipboard.

Cut ( ) : void

Removes the current selection and copies it to the clipboard.

DeclareChangeBlock ( ) : IDisposable

Begins a group of document changes and returns an object that ends the group of document changes when it is disposed.

EndChange ( ) : void

Ends the current group of document changes.

GetPositionFromPoint ( Point point ) : TextViewPosition?

Gets the text view position from a point inside the editor.

LineDown ( ) : void

Scrolls one line down.

LineLeft ( ) : void

Scrolls to the left.

LineRight ( ) : void

Scrolls to the right.

LineUp ( ) : void

Scrolls one line up.

Load ( System.Stream stream ) : void

Loads the text from the stream, auto-detecting the encoding.

This method sets IsModified to false.

Load ( string fileName ) : void

Loads the text from the stream, auto-detecting the encoding.

OnApplyTemplate ( ) : void

Is called after the template was applied.

PageDown ( ) : void

Scrolls one page down.

PageLeft ( ) : void

Scrolls one page left.

PageRight ( ) : void

Scrolls one page right.

PageUp ( ) : void

Scrolls one page up.

Paste ( ) : void

Pastes the clipboard content.

Redo ( ) : bool

Redoes the most recent undone command.

Save ( System.Stream stream ) : void

Saves the text to the stream.

This method sets IsModified to false.

Save ( string fileName ) : void

Saves the text to the file.

ScrollTo ( int line, int column ) : void

Scrolls to the specified line/column. This method requires that the TextEditor was already assigned a size (WPF layout must have run prior).

ScrollToEnd ( ) : void

Scrolls to the end of the document.

ScrollToHome ( ) : void

Scrolls to the start of the document.

ScrollToHorizontalOffset ( double offset ) : void

Scrolls to the specified position in the document.

ScrollToLine ( int line ) : void

Scrolls to the specified line. This method requires that the TextEditor was already assigned a size (WPF layout must have run prior).

ScrollToVerticalOffset ( double offset ) : void

Scrolls to the specified position in the document.

Select ( int start, int length ) : void

Selects the specified text section.

SelectAll ( ) : void

Selects the entire text.

Undo ( ) : bool

Undoes the most recent command.

Méthodes protégées

Méthode Description
CreateColorizer ( IHighlightingDefinition highlightingDefinition ) : IVisualLineTransformer

Creates the highlighting colorizer for the specified highlighting definition. Allows derived classes to provide custom colorizer implementations for special highlighting definitions.

OnCreateAutomationPeer ( ) : System.Windows.Automation.Peers.AutomationPeer
OnDocumentChanged ( EventArgs e ) : void

Raises the DocumentChanged event.

OnGotKeyboardFocus ( KeyboardFocusChangedEventArgs e ) : void
OnMouseRightButtonDown ( MouseButtonEventArgs e ) : void
OnOptionChanged ( PropertyChangedEventArgs e ) : void

Raises the OptionChanged event.

OnTextChanged ( EventArgs e ) : void

Raises the TextChanged event.

ReceiveWeakEvent ( Type managerType, object sender, EventArgs e ) : bool
TextEditor ( TextArea textArea ) : System

Creates a new TextEditor instance.

Private Methods

Méthode Description
CanExecute ( RoutedUICommand command ) : bool
Execute ( RoutedUICommand command ) : void
GetDocument ( ) : TextDocument
HandleIsOriginalChanged ( PropertyChangedEventArgs e ) : bool
IServiceProvider ( Type serviceType ) : object
IWeakEventListener ( Type managerType, object sender, EventArgs e ) : bool
OnDocumentChanged ( DependencyObject dp, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnDocumentChanged ( TextDocument oldValue, TextDocument newValue ) : void
OnIsModifiedChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnIsReadOnlyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnLineNumbersForegroundChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnOptionsChanged ( DependencyObject dp, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnOptionsChanged ( TextEditorOptions oldValue, TextEditorOptions newValue ) : void
OnShowLineNumbersChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnSyntaxHighlightingChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnSyntaxHighlightingChanged ( IHighlightingDefinition newValue ) : void
SetCurrentValue ( DependencyProperty property, object value ) : void
TextArea_SelectionChanged ( object sender, EventArgs e ) : void
TextEditor ( ) : System

Method Details

AppendText() public méthode

Appends text to the end of the document.
public AppendText ( string textData ) : void
textData string
Résultat void

BeginChange() public méthode

Begins a group of document changes.
public BeginChange ( ) : void
Résultat void

Clear() public méthode

Clears the text.
public Clear ( ) : void
Résultat void

Copy() public méthode

Copies the current selection to the clipboard.
public Copy ( ) : void
Résultat void

CreateColorizer() protected méthode

Creates the highlighting colorizer for the specified highlighting definition. Allows derived classes to provide custom colorizer implementations for special highlighting definitions.
protected CreateColorizer ( IHighlightingDefinition highlightingDefinition ) : IVisualLineTransformer
highlightingDefinition IHighlightingDefinition
Résultat IVisualLineTransformer

Cut() public méthode

Removes the current selection and copies it to the clipboard.
public Cut ( ) : void
Résultat void

DeclareChangeBlock() public méthode

Begins a group of document changes and returns an object that ends the group of document changes when it is disposed.
public DeclareChangeBlock ( ) : IDisposable
Résultat IDisposable

EndChange() public méthode

Ends the current group of document changes.
public EndChange ( ) : void
Résultat void

GetPositionFromPoint() public méthode

Gets the text view position from a point inside the editor.
public GetPositionFromPoint ( Point point ) : TextViewPosition?
point Point The position, relative to top left /// corner of TextEditor control
Résultat TextViewPosition?

LineDown() public méthode

Scrolls one line down.
public LineDown ( ) : void
Résultat void

LineLeft() public méthode

Scrolls to the left.
public LineLeft ( ) : void
Résultat void

LineRight() public méthode

Scrolls to the right.
public LineRight ( ) : void
Résultat void

LineUp() public méthode

Scrolls one line up.
public LineUp ( ) : void
Résultat void

Load() public méthode

Loads the text from the stream, auto-detecting the encoding.
This method sets IsModified to false.
public Load ( System.Stream stream ) : void
stream System.Stream
Résultat void

Load() public méthode

Loads the text from the stream, auto-detecting the encoding.
public Load ( string fileName ) : void
fileName string
Résultat void

OnApplyTemplate() public méthode

Is called after the template was applied.
public OnApplyTemplate ( ) : void
Résultat void

OnCreateAutomationPeer() protected méthode

protected OnCreateAutomationPeer ( ) : System.Windows.Automation.Peers.AutomationPeer
Résultat System.Windows.Automation.Peers.AutomationPeer

OnDocumentChanged() protected méthode

Raises the DocumentChanged event.
protected OnDocumentChanged ( EventArgs e ) : void
e System.EventArgs
Résultat void

OnGotKeyboardFocus() protected méthode

protected OnGotKeyboardFocus ( KeyboardFocusChangedEventArgs e ) : void
e KeyboardFocusChangedEventArgs
Résultat void

OnMouseRightButtonDown() protected méthode

protected OnMouseRightButtonDown ( MouseButtonEventArgs e ) : void
e MouseButtonEventArgs
Résultat void

OnOptionChanged() protected méthode

Raises the OptionChanged event.
protected OnOptionChanged ( PropertyChangedEventArgs e ) : void
e System.ComponentModel.PropertyChangedEventArgs
Résultat void

OnTextChanged() protected méthode

Raises the TextChanged event.
protected OnTextChanged ( EventArgs e ) : void
e System.EventArgs
Résultat void

PageDown() public méthode

Scrolls one page down.
public PageDown ( ) : void
Résultat void

PageLeft() public méthode

Scrolls one page left.
public PageLeft ( ) : void
Résultat void

PageRight() public méthode

Scrolls one page right.
public PageRight ( ) : void
Résultat void

PageUp() public méthode

Scrolls one page up.
public PageUp ( ) : void
Résultat void

Paste() public méthode

Pastes the clipboard content.
public Paste ( ) : void
Résultat void

ReceiveWeakEvent() protected méthode

protected ReceiveWeakEvent ( Type managerType, object sender, EventArgs e ) : bool
managerType System.Type
sender object
e System.EventArgs
Résultat bool

Redo() public méthode

Redoes the most recent undone command.
public Redo ( ) : bool
Résultat bool

Save() public méthode

Saves the text to the stream.
This method sets IsModified to false.
public Save ( System.Stream stream ) : void
stream System.Stream
Résultat void

Save() public méthode

Saves the text to the file.
public Save ( string fileName ) : void
fileName string
Résultat void

ScrollTo() public méthode

Scrolls to the specified line/column. This method requires that the TextEditor was already assigned a size (WPF layout must have run prior).
public ScrollTo ( int line, int column ) : void
line int
column int
Résultat void

ScrollToEnd() public méthode

Scrolls to the end of the document.
public ScrollToEnd ( ) : void
Résultat void

ScrollToHome() public méthode

Scrolls to the start of the document.
public ScrollToHome ( ) : void
Résultat void

ScrollToHorizontalOffset() public méthode

Scrolls to the specified position in the document.
public ScrollToHorizontalOffset ( double offset ) : void
offset double
Résultat void

ScrollToLine() public méthode

Scrolls to the specified line. This method requires that the TextEditor was already assigned a size (WPF layout must have run prior).
public ScrollToLine ( int line ) : void
line int
Résultat void

ScrollToVerticalOffset() public méthode

Scrolls to the specified position in the document.
public ScrollToVerticalOffset ( double offset ) : void
offset double
Résultat void

Select() public méthode

Selects the specified text section.
public Select ( int start, int length ) : void
start int
length int
Résultat void

SelectAll() public méthode

Selects the entire text.
public SelectAll ( ) : void
Résultat void

TextEditor() protected méthode

Creates a new TextEditor instance.
protected TextEditor ( TextArea textArea ) : System
textArea TextArea
Résultat System

Undo() public méthode

Undoes the most recent command.
public Undo ( ) : bool
Résultat bool

Property Details

DocumentProperty public_oe static_oe property

Document property.
public static DependencyProperty,System.Windows DocumentProperty
Résultat System.Windows.DependencyProperty

HorizontalScrollBarVisibilityProperty public_oe static_oe property

Dependency property for HorizontalScrollBarVisibility
public static DependencyProperty,System.Windows HorizontalScrollBarVisibilityProperty
Résultat System.Windows.DependencyProperty

IsModifiedProperty public_oe static_oe property

Dependency property for IsModified
public static DependencyProperty,System.Windows IsModifiedProperty
Résultat System.Windows.DependencyProperty

IsReadOnlyProperty public_oe static_oe property

IsReadOnly dependency property.
public static DependencyProperty,System.Windows IsReadOnlyProperty
Résultat System.Windows.DependencyProperty

LineNumbersForegroundProperty public_oe static_oe property

LineNumbersForeground dependency property.
public static DependencyProperty,System.Windows LineNumbersForegroundProperty
Résultat System.Windows.DependencyProperty

MouseHoverEvent public_oe static_oe property

The MouseHover event.
public static RoutedEvent,System.Windows MouseHoverEvent
Résultat System.Windows.RoutedEvent

MouseHoverStoppedEvent public_oe static_oe property

The MouseHoverStopped event.
public static RoutedEvent,System.Windows MouseHoverStoppedEvent
Résultat System.Windows.RoutedEvent

OptionsProperty public_oe static_oe property

Options property.
public static DependencyProperty,System.Windows OptionsProperty
Résultat System.Windows.DependencyProperty

PreviewMouseHoverEvent public_oe static_oe property

The PreviewMouseHover event.
public static RoutedEvent,System.Windows PreviewMouseHoverEvent
Résultat System.Windows.RoutedEvent

PreviewMouseHoverStoppedEvent public_oe static_oe property

The PreviewMouseHoverStopped event.
public static RoutedEvent,System.Windows PreviewMouseHoverStoppedEvent
Résultat System.Windows.RoutedEvent

ShowLineNumbersProperty public_oe static_oe property

ShowLineNumbers dependency property.
public static DependencyProperty,System.Windows ShowLineNumbersProperty
Résultat System.Windows.DependencyProperty

SyntaxHighlightingProperty public_oe static_oe property

The SyntaxHighlighting property.
public static DependencyProperty,System.Windows SyntaxHighlightingProperty
Résultat System.Windows.DependencyProperty

VerticalScrollBarVisibilityProperty public_oe static_oe property

Dependency property for VerticalScrollBarVisibility
public static DependencyProperty,System.Windows VerticalScrollBarVisibilityProperty
Résultat System.Windows.DependencyProperty

WordWrapProperty public_oe static_oe property

Word wrap dependency property.
public static DependencyProperty,System.Windows WordWrapProperty
Résultat System.Windows.DependencyProperty