CCPrintData::LinkData Struct Reference

Internal helper class for link data. More...

#include <CCPrintData.h>

List of all members.

Public Member Functions

 LinkData ()
 Default constructor.
 LinkData (const LinkData &other)
 Copy constructor.
 LinkData (const std::tstring &sU, const std::tstring &sT, int n, LPCTSTR lpTitle=NULL)
 Create a text-based link data.
 LinkData (const std::tstring &sU, const RECTL &rect, LPCTSTR lpTitle=NULL)
 Creates a location-based link data.
 LinkData (const RECTL &rect, int nP, long lX, long lY, LPCTSTR lpTitle=NULL)
 Creates a location-based internal link data.
bool ToFile (std::tstring &sData, int nNum) const
 Write the data in an INI file format.
bool FromFile (const TCHARSTR2STR &data, int nNum)
 Read the data from a key/value set.
bool IsLocation () const
 Check if it is a location (vs. text-based) link.
bool IsInner () const
 Checks if this is an internal link.
void CleanText ()
 Cleans the text-link representation.

Public Attributes

std::tstring sText
 Text of link; empty for location links.
std::tstring sURL
 URL for external links, text for internal links.
std::tstring sTitle
 Tooltip text (can be empty).
int nRepeat
 Repeast count for text links.
RECTL rectLocation
 Location of link (location links only).
int nPage
 Page for internal location links.
POINTL ptOffset
 Offset in page (internal links only).

Detailed Description

Internal helper class for link data.

Definition at line 48 of file CCPrintData.h.


Constructor & Destructor Documentation

CCPrintData::LinkData::LinkData ( const LinkData other  )  [inline]

Copy constructor.

Parameters:
other The link data to copy

Definition at line 58 of file CCPrintData.h.

CCPrintData::LinkData::LinkData ( const std::tstring &  sU,
const std::tstring &  sT,
int  n,
LPCTSTR  lpTitle = NULL 
) [inline]

Create a text-based link data.

Parameters:
sU The URL
sT The text to find
n The repeat count
lpTitle The link tooltip (future)

Definition at line 66 of file CCPrintData.h.

References CleanText().

CCPrintData::LinkData::LinkData ( const std::tstring &  sU,
const RECTL &  rect,
LPCTSTR  lpTitle = NULL 
) [inline]

Creates a location-based link data.

Parameters:
sU The URL
rect The location
lpTitle The link tooltip (future)

Definition at line 73 of file CCPrintData.h.

CCPrintData::LinkData::LinkData ( const RECTL &  rect,
int  nP,
long  lX,
long  lY,
LPCTSTR  lpTitle = NULL 
) [inline]

Creates a location-based internal link data.

Parameters:
rect The link location
nP The page to link to
lX The X offset to link to
lY The Y offset to link to
lpTitle The link tooltip (future)

Definition at line 82 of file CCPrintData.h.


Member Function Documentation

bool CCPrintData::LinkData::FromFile ( const TCHARSTR2STR data,
int  nNum 
)

Read the data from a key/value set.

Parameters:
data The key/value set to read the data from
nNum The number of the link to read the data of
Returns:
true if loaded successfully, false if failed

Definition at line 173 of file CCPrintData.cpp.

References DATAFILE_LINK_LOC_BOTTOM, DATAFILE_LINK_LOC_LEFT, DATAFILE_LINK_LOC_RIGHT, DATAFILE_LINK_LOC_TOP, DATAFILE_LINK_OFFSET_X, DATAFILE_LINK_OFFSET_Y, DATAFILE_LINK_PAGE, DATAFILE_LINK_REPEAT, DATAFILE_LINK_TEXT, DATAFILE_LINK_TITLE, DATAFILE_LINK_URL, nPage, nRepeat, ptOffset, rectLocation, sText, sTitle, and sURL.

Referenced by CCPrintData::PageData::FromFile().

bool CCPrintData::LinkData::IsInner (  )  const [inline]

Checks if this is an internal link.

Returns:
true if this is an internal link, false for external (URL) links

Definition at line 113 of file CCPrintData.h.

References IsLocation(), and nPage.

Referenced by OEMSendPage(), and ToFile().

bool CCPrintData::LinkData::IsLocation (  )  const [inline]

Check if it is a location (vs. text-based) link.

Returns:
true if this is a location link, false for text links

Definition at line 108 of file CCPrintData.h.

References sText.

Referenced by IsInner(), OEMSendPage(), and ToFile().

bool CCPrintData::LinkData::ToFile ( std::tstring &  sData,
int  nNum 
) const

Write the data in an INI file format.

Parameters:
sData String to write data to
nNum The number of this link
Returns:
true if writen successfully, false if failed

Definition at line 258 of file CCPrintData.cpp.

References DATAFILE_LINK_LOC_BOTTOM_WRITE, DATAFILE_LINK_LOC_LEFT_WRITE, DATAFILE_LINK_LOC_RIGHT_WRITE, DATAFILE_LINK_LOC_TOP_WRITE, DATAFILE_LINK_OFFSET_X_WRITE, DATAFILE_LINK_OFFSET_Y_WRITE, DATAFILE_LINK_PAGE_WRITE, DATAFILE_LINK_REPEAT_WRITE, DATAFILE_LINK_TEXT, DATAFILE_LINK_TITLE, DATAFILE_LINK_URL, IsInner(), IsLocation(), nPage, nRepeat, ptOffset, rectLocation, sText, sTitle, and sURL.


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

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