TextSearchIterator

Atalasoft.Controls.WebDocumentViewer~TextController~ TextSearchIterator

new TextSearchIterator()

WebDocumentViewer Search Results Iterator.

Members

wrap :boolean

Indicates whether search should be wrapped around when first or last document page is match is reached.

Methods

getCurrentLineText() → {string}

Returns the formatted text for the whole line containing current match.

Returns:
Type
string

getQuery() → {string}

Gets the query text for this iterator.

Returns:
Type
string

isSearching() → {boolean}

Indicates whether this is executing background search. If true, subsequent next/prev calls are stored into the search queue.

Method could be used, for example, to determine whether search will be continued after particular callback call, and thus to hide or preserve search loading mask.

Returns:
Type
boolean

isValid() → {boolean}

Indicates whether this iterator corresponds to the active search.

If false, next/prev methods are always returning null match.

Returns:
Type
boolean

next(callback)

Advances current item to the next query match or adds operation to the queue in case if next match is currently awaited.

Parameters:
Name Type Description
callback TextSearchCallback

function that that is called when next match is found.

prev(callback)

Advances current item to the previous query match or adds operation to the queue in case if next match is currently awaited.

Parameters:
Name Type Description
callback TextSearchCallback

Function that that is called when previous match is found.