C# Class ICSharpCode.TextEditor.Document.SelectionManager

This class manages the selections in a document.
Inheritance: IDisposable
Show file Open project: jumpinjackie/fdotoolbox Class Usage Examples

Public Methods

Method Description
ClearSelection ( ) : void Clears the selection.
Dispose ( ) : void
ExtendSelection ( Point oldPosition, Point newPosition ) : void
FireSelectionChanged ( ) : void
GetSelectionAt ( int offset ) : ISelection Returns a ISelection object giving the selection in which the offset points to.
GetSelectionAtLine ( int lineNumber ) : ICSharpCode.TextEditor.Document.ColumnRange
GreaterEqPos ( Point p1, Point p2 ) : bool
IsSelected ( int offset ) : bool Returns true if the given offset points to a section which is selected.
NextValidPosition ( int line ) : Point
RemoveSelectedText ( ) : void Removes the selected text from the buffer and clears the selection.
SelectionManager ( IDocument document ) : System

Creates a new instance of SelectionManager

SelectionManager ( IDocument document, TextArea textArea ) : System

Creates a new instance of SelectionManager

SetSelection ( ISelection selection ) : void Clears the selection and sets a new selection using the given ISelection object.
SetSelection ( Point startPosition, Point endPosition ) : void

Protected Methods

Method Description
OnSelectionChanged ( EventArgs e ) : void

Private Methods

Method Description
ClearWithoutUpdate ( ) : void
DocumentChanged ( object sender, ICSharpCode.TextEditor.Document.DocumentEventArgs e ) : void
Insert ( int offset, string text ) : void Used internally, do not call.
Remove ( int offset, int length ) : void Used internally, do not call.
Replace ( int offset, int length, string text ) : void Used internally, do not call.
SelectionsOverlap ( ISelection s1, ISelection s2 ) : bool

Method Details

ClearSelection() public method

Clears the selection.
public ClearSelection ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

ExtendSelection() public method

public ExtendSelection ( Point oldPosition, Point newPosition ) : void
oldPosition Point
newPosition Point
return void

FireSelectionChanged() public method

public FireSelectionChanged ( ) : void
return void

GetSelectionAt() public method

Returns a ISelection object giving the selection in which the offset points to.
public GetSelectionAt ( int offset ) : ISelection
offset int
return ISelection

GetSelectionAtLine() public method

public GetSelectionAtLine ( int lineNumber ) : ICSharpCode.TextEditor.Document.ColumnRange
lineNumber int
return ICSharpCode.TextEditor.Document.ColumnRange

GreaterEqPos() public method

public GreaterEqPos ( Point p1, Point p2 ) : bool
p1 Point
p2 Point
return bool

IsSelected() public method

Returns true if the given offset points to a section which is selected.
public IsSelected ( int offset ) : bool
offset int
return bool

NextValidPosition() public method

public NextValidPosition ( int line ) : Point
line int
return Point

OnSelectionChanged() protected method

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

RemoveSelectedText() public method

Removes the selected text from the buffer and clears the selection.
public RemoveSelectedText ( ) : void
return void

SelectionManager() public method

Creates a new instance of SelectionManager
public SelectionManager ( IDocument document ) : System
document IDocument
return System

SelectionManager() public method

Creates a new instance of SelectionManager
public SelectionManager ( IDocument document, TextArea textArea ) : System
document IDocument
textArea TextArea
return System

SetSelection() public method

Clears the selection and sets a new selection using the given ISelection object.
public SetSelection ( ISelection selection ) : void
selection ISelection
return void

SetSelection() public method

public SetSelection ( Point startPosition, Point endPosition ) : void
startPosition Point
endPosition Point
return void