C# Class Mono.TextEditor.TextEditorData

Inheritance: IDisposable
Mostrar archivo Open project: LogosBible/monodevelop Class Usage Examples

Public Properties

Property Type Description
HeightTree Mono.TextEditor.HeightTree

Public Methods

Method Description
AddTooltipProvider ( Mono.TextEditor.TooltipProvider provider ) : void
CanEdit ( int line ) : bool
CenterTo ( Mono.TextEditor.DocumentLocation p ) : void
CenterTo ( int offset ) : void
CenterTo ( int line, int column ) : void
CenterToCaret ( ) : void
ClearSelection ( ) : void
ClearTooltipProviders ( ) : void
CreateImmutable ( string input, bool suppressHighlighting = true ) : TextEditorData

Creates the a text editor data object which document can't be changed. This is useful for 'view' only documents.

The Document itself is very fast because it uses a special case buffer and line splitter implementation. Additionally highlighting is turned off as default.

DeleteSelectedText ( ) : void
DeleteSelectedText ( bool clearSelection ) : void
Dispose ( ) : void
EnsureCaretIsNotVirtual ( ) : int

Ensures the caret is not in a virtual position by adding whitespaces up to caret position. That method should always be called in an undo group.

ExtendSelectionTo ( Mono.TextEditor.DocumentLocation location ) : void
ExtendSelectionTo ( int offset ) : void
FindCurrentWordEnd ( int offset ) : int
FindCurrentWordStart ( int offset ) : int
FindNext ( bool setSelection ) : SearchResult
FindNextSubwordOffset ( int offset ) : int
FindNextWordOffset ( int offset ) : int
FindPrevSubwordOffset ( int offset ) : int
FindPrevWordOffset ( int offset ) : int
FindPrevious ( bool setSelection ) : SearchResult
FixVirtualIndentation ( ) : void

Removes the indent on the caret line, if the indent mode is set to virtual and the indent matches the current virtual indent in that line.

FixVirtualIndentation ( int lineNumber ) : void
FormatString ( Mono.TextEditor.DocumentLocation loc, string str ) : string
FormatString ( int offset, string str ) : string
GetCharAt ( Mono.TextEditor.DocumentLocation location ) : char
GetCharAt ( int offset ) : char
GetCharAt ( int line, int column ) : char
GetChunks ( Mono.TextEditor.DocumentLine line, int offset, int length ) : IEnumerable
GetIndentationString ( Mono.TextEditor.DocumentLocation loc ) : string
GetIndentationString ( int offset ) : string
GetIndentationString ( int lineNumber, int column ) : string
GetLine ( int lineNumber ) : Mono.TextEditor.DocumentLine
GetLineByOffset ( int offset ) : Mono.TextEditor.DocumentLine
GetLineHeight ( Mono.TextEditor.DocumentLine line ) : double
GetLineHeight ( int line ) : double
GetLineIndent ( Mono.TextEditor.DocumentLine segment ) : string
GetLineIndent ( int lineNumber ) : string
GetLineText ( int line ) : string
GetLineText ( int line, bool includeDelimiter ) : string
GetMarkup ( int offset, int length, bool removeIndent, bool useColors = true, bool replaceTabs = true ) : string
GetMatchAt ( int offset ) : SearchResult
GetTextAt ( DocumentRegion region ) : string
GetTextAt ( TextSegment segment ) : string
GetTextAt ( int offset, int count ) : string
GetTextBetween ( Mono.TextEditor.DocumentLocation start, Mono.TextEditor.DocumentLocation end ) : string
GetTextBetween ( int startOffset, int endOffset ) : string
GetTextBetween ( int startLine, int startColumn, int endLine, int endColumn ) : string
GetVirtualIndentationColumn ( Mono.TextEditor.DocumentLocation loc ) : int
GetVirtualIndentationColumn ( int offset ) : int
GetVirtualIndentationColumn ( int lineNumber, int column ) : int
Insert ( int offset, string value ) : int
InsertAtCaret ( string text ) : void
IsMatchAt ( int offset ) : bool
LocationToOffset ( Mono.TextEditor.DocumentLocation location ) : int
LocationToOffset ( int line, int column ) : int
LogicalToVisualLine ( int logicalLine ) : int
LogicalToVisualLocation ( Mono.TextEditor.DocumentLocation location ) : Mono.TextEditor.DocumentLocation
LogicalToVisualLocation ( int line, int column ) : Mono.TextEditor.DocumentLocation
OffsetToLineNumber ( int offset ) : int
OffsetToLocation ( int offset ) : Mono.TextEditor.DocumentLocation
OpenStream ( ) : Stream
OpenUndoGroup ( ) : IDisposable
OpenUndoGroup ( OperationType operationType ) : IDisposable
PasteText ( int offset, string text, byte copyData, IDisposable &undoGroup ) : int
RaiseUpdateAdjustmentsRequested ( ) : void
Remove ( DocumentRegion region ) : void
Remove ( TextSegment removeSegment ) : void
Remove ( int offset, int count ) : void
RemoveTooltipProvider ( Mono.TextEditor.TooltipProvider provider ) : void
Replace ( int offset, int count, string value ) : int
RequestRecenter ( ) : void
ScrollTo ( Mono.TextEditor.DocumentLocation loc ) : void
ScrollTo ( int offset ) : void
ScrollTo ( int line, int column ) : void
ScrollToCaret ( ) : void
SearchBackward ( int fromOffset ) : SearchResult
SearchForward ( int fromOffset ) : SearchResult
SearchReplace ( string withPattern, bool setSelection ) : bool
SearchReplaceAll ( string withPattern ) : int
SetCaretTo ( int line, int column ) : void
SetCaretTo ( int line, int column, bool highlight ) : void
SetCaretTo ( int line, int column, bool highlight, bool centerCaret ) : void
SetSelectLines ( int from, int to ) : void
SetSelection ( Mono.TextEditor.DocumentLocation anchor, Mono.TextEditor.DocumentLocation lead ) : void
SetSelection ( int anchorOffset, int leadOffset ) : void
SetSelection ( int anchorLine, int anchorColumn, int leadLine, int leadColumn ) : void
SetSkipChar ( int offset, char ch ) : void
TextEditorData ( ) : System
TextEditorData ( TextDocument doc ) : System
VisualToLogicalLine ( int visualLineNumber ) : int

Protected Methods

Method Description
OnSearchChanged ( EventArgs args ) : void
OnSelectionChanged ( EventArgs args ) : void
OnSelectionChanging ( EventArgs e ) : void
OnUpdateAdjustmentsRequested ( EventArgs e ) : void

Private Methods

Method Description
CaretPositionChanged ( object sender, Mono.TextEditor.DocumentLocationEventArgs args ) : void
ConvertToPangoMarkup ( string str, bool replaceTabs = true ) : string
DeleteSelection ( Selection selection ) : void
DetachDocument ( ) : void
DocumentHandleRedone ( object sender, TextDocument e ) : void
DocumentHandleUndone ( object sender, TextDocument e ) : void
EnsureIsNotVirtual ( Mono.TextEditor.DocumentLocation loc ) : int
EnsureIsNotVirtual ( int line, int column ) : int
HandleDocLineChanged ( object sender, Mono.TextEditor.LineEventArgs e ) : void
HandleDocTextSet ( object sender, EventArgs e ) : void
HandleFoldTreeUpdated ( object sender, EventArgs e ) : void
HandleTextEditorDataDocumentFolded ( object sender, Mono.TextEditor.FoldSegmentEventArgs e ) : void
HandleTextReplaced ( object sender, Mono.TextEditor.DocumentChangeEventArgs e ) : void
OnBeginUndo ( object sender, EventArgs args ) : void
OnEndUndo ( object sender, TextDocument e ) : void

Method Details

AddTooltipProvider() public method

public AddTooltipProvider ( Mono.TextEditor.TooltipProvider provider ) : void
provider Mono.TextEditor.TooltipProvider
return void

CanEdit() public method

public CanEdit ( int line ) : bool
line int
return bool

CenterTo() public method

public CenterTo ( Mono.TextEditor.DocumentLocation p ) : void
p Mono.TextEditor.DocumentLocation
return void

CenterTo() public method

public CenterTo ( int offset ) : void
offset int
return void

CenterTo() public method

public CenterTo ( int line, int column ) : void
line int
column int
return void

CenterToCaret() public method

public CenterToCaret ( ) : void
return void

ClearSelection() public method

public ClearSelection ( ) : void
return void

ClearTooltipProviders() public method

public ClearTooltipProviders ( ) : void
return void

CreateImmutable() public static method

Creates the a text editor data object which document can't be changed. This is useful for 'view' only documents.
The Document itself is very fast because it uses a special case buffer and line splitter implementation. Additionally highlighting is turned off as default.
public static CreateImmutable ( string input, bool suppressHighlighting = true ) : TextEditorData
input string
suppressHighlighting bool
return TextEditorData

DeleteSelectedText() public method

public DeleteSelectedText ( ) : void
return void

DeleteSelectedText() public method

public DeleteSelectedText ( bool clearSelection ) : void
clearSelection bool
return void

Dispose() public method

public Dispose ( ) : void
return void

EnsureCaretIsNotVirtual() public method

Ensures the caret is not in a virtual position by adding whitespaces up to caret position. That method should always be called in an undo group.
public EnsureCaretIsNotVirtual ( ) : int
return int

ExtendSelectionTo() public method

public ExtendSelectionTo ( Mono.TextEditor.DocumentLocation location ) : void
location Mono.TextEditor.DocumentLocation
return void

ExtendSelectionTo() public method

public ExtendSelectionTo ( int offset ) : void
offset int
return void

FindCurrentWordEnd() public method

public FindCurrentWordEnd ( int offset ) : int
offset int
return int

FindCurrentWordStart() public method

public FindCurrentWordStart ( int offset ) : int
offset int
return int

FindNext() public method

public FindNext ( bool setSelection ) : SearchResult
setSelection bool
return SearchResult

FindNextSubwordOffset() public method

public FindNextSubwordOffset ( int offset ) : int
offset int
return int

FindNextWordOffset() public method

public FindNextWordOffset ( int offset ) : int
offset int
return int

FindPrevSubwordOffset() public method

public FindPrevSubwordOffset ( int offset ) : int
offset int
return int

FindPrevWordOffset() public method

public FindPrevWordOffset ( int offset ) : int
offset int
return int

FindPrevious() public method

public FindPrevious ( bool setSelection ) : SearchResult
setSelection bool
return SearchResult

FixVirtualIndentation() public method

Removes the indent on the caret line, if the indent mode is set to virtual and the indent matches the current virtual indent in that line.
public FixVirtualIndentation ( ) : void
return void

FixVirtualIndentation() public method

public FixVirtualIndentation ( int lineNumber ) : void
lineNumber int
return void

FormatString() public method

public FormatString ( Mono.TextEditor.DocumentLocation loc, string str ) : string
loc Mono.TextEditor.DocumentLocation
str string
return string

FormatString() public method

public FormatString ( int offset, string str ) : string
offset int
str string
return string

GetCharAt() public method

public GetCharAt ( Mono.TextEditor.DocumentLocation location ) : char
location Mono.TextEditor.DocumentLocation
return char

GetCharAt() public method

public GetCharAt ( int offset ) : char
offset int
return char

GetCharAt() public method

public GetCharAt ( int line, int column ) : char
line int
column int
return char

GetChunks() public method

public GetChunks ( Mono.TextEditor.DocumentLine line, int offset, int length ) : IEnumerable
line Mono.TextEditor.DocumentLine
offset int
length int
return IEnumerable

GetIndentationString() public method

public GetIndentationString ( Mono.TextEditor.DocumentLocation loc ) : string
loc Mono.TextEditor.DocumentLocation
return string

GetIndentationString() public method

public GetIndentationString ( int offset ) : string
offset int
return string

GetIndentationString() public method

public GetIndentationString ( int lineNumber, int column ) : string
lineNumber int
column int
return string

GetLine() public method

public GetLine ( int lineNumber ) : Mono.TextEditor.DocumentLine
lineNumber int
return Mono.TextEditor.DocumentLine

GetLineByOffset() public method

public GetLineByOffset ( int offset ) : Mono.TextEditor.DocumentLine
offset int
return Mono.TextEditor.DocumentLine

GetLineHeight() public method

public GetLineHeight ( Mono.TextEditor.DocumentLine line ) : double
line Mono.TextEditor.DocumentLine
return double

GetLineHeight() public method

public GetLineHeight ( int line ) : double
line int
return double

GetLineIndent() public method

public GetLineIndent ( Mono.TextEditor.DocumentLine segment ) : string
segment Mono.TextEditor.DocumentLine
return string

GetLineIndent() public method

public GetLineIndent ( int lineNumber ) : string
lineNumber int
return string

GetLineText() public method

public GetLineText ( int line ) : string
line int
return string

GetLineText() public method

public GetLineText ( int line, bool includeDelimiter ) : string
line int
includeDelimiter bool
return string

GetMarkup() public method

public GetMarkup ( int offset, int length, bool removeIndent, bool useColors = true, bool replaceTabs = true ) : string
offset int
length int
removeIndent bool
useColors bool
replaceTabs bool
return string

GetMatchAt() public method

public GetMatchAt ( int offset ) : SearchResult
offset int
return SearchResult

GetTextAt() public method

public GetTextAt ( DocumentRegion region ) : string
region DocumentRegion
return string

GetTextAt() public method

public GetTextAt ( TextSegment segment ) : string
segment TextSegment
return string

GetTextAt() public method

public GetTextAt ( int offset, int count ) : string
offset int
count int
return string

GetTextBetween() public method

public GetTextBetween ( Mono.TextEditor.DocumentLocation start, Mono.TextEditor.DocumentLocation end ) : string
start Mono.TextEditor.DocumentLocation
end Mono.TextEditor.DocumentLocation
return string

GetTextBetween() public method

public GetTextBetween ( int startOffset, int endOffset ) : string
startOffset int
endOffset int
return string

GetTextBetween() public method

public GetTextBetween ( int startLine, int startColumn, int endLine, int endColumn ) : string
startLine int
startColumn int
endLine int
endColumn int
return string

GetVirtualIndentationColumn() public method

public GetVirtualIndentationColumn ( Mono.TextEditor.DocumentLocation loc ) : int
loc Mono.TextEditor.DocumentLocation
return int

GetVirtualIndentationColumn() public method

public GetVirtualIndentationColumn ( int offset ) : int
offset int
return int

GetVirtualIndentationColumn() public method

public GetVirtualIndentationColumn ( int lineNumber, int column ) : int
lineNumber int
column int
return int

Insert() public method

public Insert ( int offset, string value ) : int
offset int
value string
return int

InsertAtCaret() public method

public InsertAtCaret ( string text ) : void
text string
return void

IsMatchAt() public method

public IsMatchAt ( int offset ) : bool
offset int
return bool

LocationToOffset() public method

public LocationToOffset ( Mono.TextEditor.DocumentLocation location ) : int
location Mono.TextEditor.DocumentLocation
return int

LocationToOffset() public method

public LocationToOffset ( int line, int column ) : int
line int
column int
return int

LogicalToVisualLine() public method

public LogicalToVisualLine ( int logicalLine ) : int
logicalLine int
return int

LogicalToVisualLocation() public method

public LogicalToVisualLocation ( Mono.TextEditor.DocumentLocation location ) : Mono.TextEditor.DocumentLocation
location Mono.TextEditor.DocumentLocation
return Mono.TextEditor.DocumentLocation

LogicalToVisualLocation() public method

public LogicalToVisualLocation ( int line, int column ) : Mono.TextEditor.DocumentLocation
line int
column int
return Mono.TextEditor.DocumentLocation

OffsetToLineNumber() public method

public OffsetToLineNumber ( int offset ) : int
offset int
return int

OffsetToLocation() public method

public OffsetToLocation ( int offset ) : Mono.TextEditor.DocumentLocation
offset int
return Mono.TextEditor.DocumentLocation

OnSearchChanged() protected method

protected OnSearchChanged ( EventArgs args ) : void
args System.EventArgs
return void

OnSelectionChanged() protected method

protected OnSelectionChanged ( EventArgs args ) : void
args System.EventArgs
return void

OnSelectionChanging() protected method

protected OnSelectionChanging ( EventArgs e ) : void
e System.EventArgs
return void

OnUpdateAdjustmentsRequested() protected method

protected OnUpdateAdjustmentsRequested ( EventArgs e ) : void
e System.EventArgs
return void

OpenStream() public method

public OpenStream ( ) : Stream
return Stream

OpenUndoGroup() public method

public OpenUndoGroup ( ) : IDisposable
return IDisposable

OpenUndoGroup() public method

public OpenUndoGroup ( OperationType operationType ) : IDisposable
operationType OperationType
return IDisposable

PasteText() public method

public PasteText ( int offset, string text, byte copyData, IDisposable &undoGroup ) : int
offset int
text string
copyData byte
undoGroup IDisposable
return int

RaiseUpdateAdjustmentsRequested() public method

public RaiseUpdateAdjustmentsRequested ( ) : void
return void

Remove() public method

public Remove ( DocumentRegion region ) : void
region DocumentRegion
return void

Remove() public method

public Remove ( TextSegment removeSegment ) : void
removeSegment TextSegment
return void

Remove() public method

public Remove ( int offset, int count ) : void
offset int
count int
return void

RemoveTooltipProvider() public method

public RemoveTooltipProvider ( Mono.TextEditor.TooltipProvider provider ) : void
provider Mono.TextEditor.TooltipProvider
return void

Replace() public method

public Replace ( int offset, int count, string value ) : int
offset int
count int
value string
return int

RequestRecenter() public method

public RequestRecenter ( ) : void
return void

ScrollTo() public method

public ScrollTo ( Mono.TextEditor.DocumentLocation loc ) : void
loc Mono.TextEditor.DocumentLocation
return void

ScrollTo() public method

public ScrollTo ( int offset ) : void
offset int
return void

ScrollTo() public method

public ScrollTo ( int line, int column ) : void
line int
column int
return void

ScrollToCaret() public method

public ScrollToCaret ( ) : void
return void

SearchBackward() public method

public SearchBackward ( int fromOffset ) : SearchResult
fromOffset int
return SearchResult

SearchForward() public method

public SearchForward ( int fromOffset ) : SearchResult
fromOffset int
return SearchResult

SearchReplace() public method

public SearchReplace ( string withPattern, bool setSelection ) : bool
withPattern string
setSelection bool
return bool

SearchReplaceAll() public method

public SearchReplaceAll ( string withPattern ) : int
withPattern string
return int

SetCaretTo() public method

public SetCaretTo ( int line, int column ) : void
line int
column int
return void

SetCaretTo() public method

public SetCaretTo ( int line, int column, bool highlight ) : void
line int
column int
highlight bool
return void

SetCaretTo() public method

public SetCaretTo ( int line, int column, bool highlight, bool centerCaret ) : void
line int
column int
highlight bool
centerCaret bool
return void

SetSelectLines() public method

public SetSelectLines ( int from, int to ) : void
from int
to int
return void

SetSelection() public method

public SetSelection ( Mono.TextEditor.DocumentLocation anchor, Mono.TextEditor.DocumentLocation lead ) : void
anchor Mono.TextEditor.DocumentLocation
lead Mono.TextEditor.DocumentLocation
return void

SetSelection() public method

public SetSelection ( int anchorOffset, int leadOffset ) : void
anchorOffset int
leadOffset int
return void

SetSelection() public method

public SetSelection ( int anchorLine, int anchorColumn, int leadLine, int leadColumn ) : void
anchorLine int
anchorColumn int
leadLine int
leadColumn int
return void

SetSkipChar() public method

public SetSkipChar ( int offset, char ch ) : void
offset int
ch char
return void

TextEditorData() public method

public TextEditorData ( ) : System
return System

TextEditorData() public method

public TextEditorData ( TextDocument doc ) : System
doc TextDocument
return System

VisualToLogicalLine() public method

public VisualToLogicalLine ( int visualLineNumber ) : int
visualLineNumber int
return int

Property Details

HeightTree public_oe property

public HeightTree,Mono.TextEditor HeightTree
return Mono.TextEditor.HeightTree