TextArea Struct Reference

Page text helper object, used to search for specific strings to find their location. More...

#include <TextPart.h>

List of all members.

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.

Detailed Description

Page text helper object, used to search for specific strings to find their location.

Definition at line 166 of file TextPart.h.


Member Function Documentation

void TextArea::AddLine ( const TextLine line  ) 

Add a new text line to the object.

Parameters:
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.

Parameters:
words The exression to search for
put] rectArea The page location of the expression
Returns:
true if found the expression, false if failed

Definition at line 283 of file TextPart.cpp.

References m_iLine, and m_iWord.

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.

Parameters:
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
Returns:
true if the expression was found, false if not

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.

Parameters:
[out] rectArea Location of next URL
[out] sURL The URL found
Returns:
true if a URL was found, false if none were found

Definition at line 373 of file TextPart.cpp.

References m_iLine, and m_iWord.

Referenced by OEMSendPage().


The documentation for this struct was generated from the following files:

Generated on Mon Jun 18 12:40:44 2012 for CC PDF Converter by doxygen 1.6.1