Page text helper object, used to search for specific strings to find their location. More...
#include <TextPart.h>
Public Member Functions | |
void | AddLine (const TextLine &line) |
Add a new text line to the object. | |
void | InitSearch () |
Start a new search. | |
bool | SearchFor (const STRLIST &words, RECTL &rectArea, int nRepeat) |
Search for an expression (a list of words in the exact order) in the page text; must be on the same line. | |
bool | SearchFor (const STRLIST &words, RECTL &rectArea) |
Search for an expression (a list of words in the exact order) in the page text; must be on the same line. | |
bool | SearchForURL (RECTL &rectArea, std::wstring &sWord) |
Search for the next string that starts with http:// or https:// and return its location. | |
Protected Attributes | |
const_iterator | m_iLine |
Current search line. | |
TextLine::const_iterator | m_iWord |
Current search word. |
Page text helper object, used to search for specific strings to find their location.
Definition at line 166 of file TextPart.h.
void TextArea::AddLine | ( | const TextLine & | line | ) |
Add a new text line to the object.
line | The line to add |
Definition at line 247 of file TextPart.cpp.
References TextLine::AddTextSameLine().
Referenced by OEMTextOut().
bool TextArea::SearchFor | ( | const STRLIST & | words, | |
RECTL & | rectArea | |||
) |
Search for an expression (a list of words in the exact order) in the page text; must be on the same line.
words | The exression to search for | |
put] | rectArea The page location of the expression |
Definition at line 283 of file TextPart.cpp.
bool TextArea::SearchFor | ( | const STRLIST & | words, | |
RECTL & | rectArea, | |||
int | nRepeat | |||
) | [inline] |
Search for an expression (a list of words in the exact order) in the page text; must be on the same line.
words | The words to search for | |
[out] | rectArea | The page location in which the words were found |
nRepeat | The amount of times to jump over the expression before reporting success |
Use the nRepeat to jump over the first nRepeat times the expression is found. Note that this is a forward only search, so after the first false result, you have to re-initialize the search to start from the beginning
Definition at line 193 of file TextPart.h.
References SearchFor().
Referenced by OEMSendPage(), and SearchFor().
bool TextArea::SearchForURL | ( | RECTL & | rectArea, | |
std::wstring & | sURL | |||
) |
Search for the next string that starts with http:// or https:// and return its location.
[out] | rectArea | Location of next URL |
[out] | sURL | The URL found |
Definition at line 373 of file TextPart.cpp.
References m_iLine, and m_iWord.
Referenced by OEMSendPage().