C# Class ICSharpCode.TextEditor.Document.SelectionManager

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

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
OnSelectionChanged ( EventArgs e ) : void

Private Methods

Méthode 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 méthode

Clears the selection.
public ClearSelection ( ) : void
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

ExtendSelection() public méthode

public ExtendSelection ( Point oldPosition, Point newPosition ) : void
oldPosition Point
newPosition Point
Résultat void

FireSelectionChanged() public méthode

public FireSelectionChanged ( ) : void
Résultat void

GetSelectionAt() public méthode

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

GetSelectionAtLine() public méthode

public GetSelectionAtLine ( int lineNumber ) : ICSharpCode.TextEditor.Document.ColumnRange
lineNumber int
Résultat ICSharpCode.TextEditor.Document.ColumnRange

GreaterEqPos() public méthode

public GreaterEqPos ( Point p1, Point p2 ) : bool
p1 Point
p2 Point
Résultat bool

IsSelected() public méthode

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

NextValidPosition() public méthode

public NextValidPosition ( int line ) : Point
line int
Résultat Point

OnSelectionChanged() protected méthode

protected OnSelectionChanged ( EventArgs e ) : void
e System.EventArgs
Résultat void

RemoveSelectedText() public méthode

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

SelectionManager() public méthode

Creates a new instance of SelectionManager
public SelectionManager ( IDocument document ) : System
document IDocument
Résultat System

SelectionManager() public méthode

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

SetSelection() public méthode

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

SetSelection() public méthode

public SetSelection ( Point startPosition, Point endPosition ) : void
startPosition Point
endPosition Point
Résultat void