TextWord Struct Reference

Helper object for printed word location. More...

#include <TextPart.h>

List of all members.

Public Member Functions

 TextWord ()
 Default constructor.
 TextWord (const TextWord &other)
 Copy constructor.
 TextWord (const std::wstring &s, const PGLYPHPOS &arGlyphPos, const POINTQF *pWidths, std::tstring::size_type nStart, std::tstring::size_type nEnd=-1)
 Constructor: create from a variable-width font string.
 TextWord (const std::wstring &s, int nCharWidth, std::tstring::size_type nStart, std::tstring::size_type nEnd=-1)
 Constructor: create from a fixed-width font string.
long GetStart (size_type nLetter) const
 Returns the left border of the requested letter.
long GetEnd (size_type nLetter) const
 Returns the right border of the requested letter.
std::wstring GetText () const
 Returns the word's contents.
const TextWordoperator+= (const TextWord &other)
 Adds another word's letters after the current letters.

Detailed Description

Helper object for printed word location.

Definition at line 72 of file TextPart.h.


Constructor & Destructor Documentation

TextWord::TextWord ( const TextWord other  )  [inline]

Copy constructor.

Parameters:
other Printer work location object to copy

Definition at line 83 of file TextPart.h.

TextWord::TextWord ( const std::wstring &  s,
const PGLYPHPOS &  arGlyphPos,
const POINTQF *  pWidths,
std::tstring::size_type  nStart,
std::tstring::size_type  nEnd = -1 
)

Constructor: create from a variable-width font string.

Parameters:
s The sentence's text
arGlyphPos The location of each letter
pWidths The widths of each letter
nStart The first letter to use
nEnd The last letter to use

Definition at line 39 of file TextPart.cpp.

TextWord::TextWord ( const std::wstring &  s,
int  nCharWidth,
std::tstring::size_type  nStart,
std::tstring::size_type  nEnd = -1 
)

Constructor: create from a fixed-width font string.

Parameters:
s The sentence's text
nCharWidth The width of each glyph
nStart The first letter to use
nEnd The last letter to use

Definition at line 59 of file TextPart.cpp.


Member Function Documentation

long TextWord::GetEnd ( size_type  nLetter  )  const [inline]

Returns the right border of the requested letter.

Parameters:
nLetter The letter to get the location of
Returns:
Location of the requested letter

Definition at line 108 of file TextPart.h.

Referenced by TextLine::SetSides().

long TextWord::GetStart ( size_type  nLetter  )  const [inline]

Returns the left border of the requested letter.

Parameters:
nLetter The letter to get the location of
Returns:
Location of the requested letter

Definition at line 95 of file TextPart.h.

std::wstring TextWord::GetText (  )  const [inline]

Returns the word's contents.

Returns:
The text

Definition at line 120 of file TextPart.h.

const TextWord& TextWord::operator+= ( const TextWord other  )  [inline]

Adds another word's letters after the current letters.

Parameters:
other The word to add
Returns:
This object

Definition at line 128 of file TextPart.h.


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