Enhanced C#
Language of your choice: library documentation

Documentation moved to ecsharp.net

GitHub doesn't support HTTP redirects, so you'll be redirected in 3 seconds.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Public fields | Properties | Public Member Functions | List of all members
TextEditor.TextEditorSearcher Class Reference

This class finds occurrances of a search string in a text editor's IDocument... it's like Find box without a GUI. More...


Source file:
Inheritance diagram for TextEditor.TextEditorSearcher:

Remarks

This class finds occurrances of a search string in a text editor's IDocument... it's like Find box without a GUI.

Public fields

bool MatchCase
 
bool MatchWholeWordOnly
 

Properties

IDocument Document [get, set]
 
bool HasScanRegion [get]
 
int BeginOffset [get]
 Begins the start offset for searching More...
 
int EndOffset [get]
 Begins the end offset for searching More...
 
string LookFor [get, set]
 

Public Member Functions

void SetScanRegion (ISelection sel)
 Sets the region to search. The region is updated automatically as the document changes. More...
 
void SetScanRegion (int offset, int length)
 Sets the region to search. The region is updated automatically as the document changes. More...
 
void ClearScanRegion ()
 
void Dispose ()
 
TextRange FindNext (int beginAtOffset, bool searchBackward, out bool loopedAround)
 Finds next instance of LookFor, according to the search rules (MatchCase, MatchWholeWordOnly). More...
 

Member Function Documentation

TextRange TextEditor.TextEditorSearcher.FindNext ( int  beginAtOffset,
bool  searchBackward,
out bool  loopedAround 
)
inline

Finds next instance of LookFor, according to the search rules (MatchCase, MatchWholeWordOnly).

Parameters
beginAtOffsetOffset in Document at which to begin the search

If there is a match at beginAtOffset precisely, it will be returned.

Returns
Region of document that matches the search string

References TextEditor.TextEditorSearcher.BeginOffset, and TextEditor.TextEditorSearcher.EndOffset.

void TextEditor.TextEditorSearcher.SetScanRegion ( ISelection  sel)
inline

Sets the region to search. The region is updated automatically as the document changes.

void TextEditor.TextEditorSearcher.SetScanRegion ( int  offset,
int  length 
)
inline

Sets the region to search. The region is updated automatically as the document changes.

Property Documentation

int TextEditor.TextEditorSearcher.BeginOffset
get

Begins the start offset for searching

Referenced by TextEditor.TextEditorSearcher.FindNext().

int TextEditor.TextEditorSearcher.EndOffset
get

Begins the end offset for searching

Referenced by TextEditor.TextEditorSearcher.FindNext().