pdftron::PDF::Annots::Link Class Reference

A link annotation represents either a hypertext link to a destination elsewhere in the document or an action to be performed. More...

#include <Link.h>

Inheritance diagram for pdftron::PDF::Annots::Link:

Inheritance graph
[legend]
Collaboration diagram for pdftron::PDF::Annots::Link:

Collaboration graph
[legend]

List of all members.

Public Types

enum  HighlightingMode { e_none, e_invert, e_outline, e_push }
 This enum specifies the highlighting mode of the Link Annotation. More...

Public Member Functions

 Link (SDF::Obj d=0)
 Creates a Link annotation and initializes it using given Cos/SDF object.
 Link (const Annot &ann)
 Creates a Link annotation and initializes it using given annotation object.
void RemoveAction ()
 Removes this annotation's action.
Action GetAction () const
 Returns the Action of the Link Annotation.
void SetAction (const Action &action)
 Sets the Action of the Link Annotation.
HighlightingMode GetHighlightingMode () const
 Returns the highlighting mode of this Link annotation.
void SetHighlightingMode (HighlightingMode mode)
 Sets the highlighting mode for this Link annotation.
int GetQuadPointCount () const
 Returns the number of QuadPoints in the 'QuadPoints' array of the Link annotation.
QuadPoint GetQuadPoint (int idx) const
 Returns the QuadPoint located at a certain index of the QuadPoint array of the Link annotation.
void SetQuadPoint (int idx, const QuadPoint &qp)
 Set the QuadPoint to be located at a certain index of the QuadPoint array of the Link annotation.

Static Public Member Functions

static Link Create (SDF::SDFDoc &doc, const Rect &pos)
 Creates a new Link annotation in the specified document.
static Link Create (SDF::SDFDoc &doc, const Rect &pos, const Action &action)
 Creates a new Link annotation.


Detailed Description

A link annotation represents either a hypertext link to a destination elsewhere in the document or an action to be performed.

Member Enumeration Documentation

This enum specifies the highlighting mode of the Link Annotation.

The annotation’s highlighting mode is the visual effect that shall be used when the mouse button is pressed or held down inside its active area, possible values as follows:

e_none - No highlighting. e_invert - Invert the contents of the annotation rectangle. e_outline - Invert the annotation's border. e_push - Display the annotation as if it were being pushed below the surface of the page.

Enumerator:
e_none 
e_invert 
e_outline 
e_push 


Constructor & Destructor Documentation

pdftron::PDF::Annots::Link::Link ( SDF::Obj  d = 0  ) 

Creates a Link annotation and initializes it using given Cos/SDF object.

Note:
The constructor does not copy any data, but is instead the logical equivalent of a type cast.

pdftron::PDF::Annots::Link::Link ( const Annot ann  )  [inline]

Creates a Link annotation and initializes it using given annotation object.

Note:
The constructor does not copy any data, but is instead the logical equivalent of a type cast.


Member Function Documentation

static Link pdftron::PDF::Annots::Link::Create ( SDF::SDFDoc doc,
const Rect pos 
) [static]

Creates a new Link annotation in the specified document.

Parameters:
doc A document to which the Link annotation is added.
pos A rectangle specifying the Link annotation's bounds in default user space units.
Returns:
A newly created blank Link annotation.

static Link pdftron::PDF::Annots::Link::Create ( SDF::SDFDoc doc,
const Rect pos,
const Action action 
) [static]

Creates a new Link annotation.

Parameters:
doc A document to which the annotation is added.
pos A rectangle specifying the annotation's bounds in default user space units.
action Action for the link annotation.
Returns:
A new Link annotation.

void pdftron::PDF::Annots::Link::RemoveAction (  ) 

Removes this annotation's action.

Action pdftron::PDF::Annots::Link::GetAction (  )  const

Returns the Action of the Link Annotation.

Returns:
An Action object of the Link annotation.
Note:
The return value is an action that shall be performed when the link annotation is activated

void pdftron::PDF::Annots::Link::SetAction ( const Action action  ) 

Sets the Action of the Link Annotation.

(Optional; PDF 1.1 )

Parameters:
action An Action object that shall be associated with this Link annotation.
Note:
The parameter is an action that shall be performed when the link annotation is activated.

HighlightingMode pdftron::PDF::Annots::Link::GetHighlightingMode (  )  const

Returns the highlighting mode of this Link annotation.

Returns:
the highLighting mode as a value of the enum "HighlightingMode".
Note:
The annotation’s highlighting mode is the visual effect that shall be used when the mouse button is pressed or held down inside its active area.

void pdftron::PDF::Annots::Link::SetHighlightingMode ( HighlightingMode  mode  ) 

Sets the highlighting mode for this Link annotation.

(Optional; PDF 1.2 )

Parameters:
mode the mode as a value of the enum "HighlightingMode".
Note:
The annotation’s highlighting mode is the visual effect that shall be used when the mouse button is pressed or held down inside its active area.

int pdftron::PDF::Annots::Link::GetQuadPointCount (  )  const

Returns the number of QuadPoints in the 'QuadPoints' array of the Link annotation.

Returns:
The number of QuadPoints.
Note:
An array of n QuadPoints specifying the coordinates of n quadrilaterals in default user space that comprise the region in which the link should be active. The coordinates specifying the four vertices of the quadrilateral are in counterclockwise order. For orientation purposes, the bottom of a quadrilateral is the line formed by p1 and p2 of the QuadPoint. QuadPoints shall be ignored if any coordinate in the array lies outside the region specified by Rect.

QuadPoint pdftron::PDF::Annots::Link::GetQuadPoint ( int  idx  )  const

Returns the QuadPoint located at a certain index of the QuadPoint array of the Link annotation.

Parameters:
idx The index of the QuadPoint, starts at zero and should be less than the return value of GetQuadPointCount().
Returns:
The QuadPoint located at a certain index of the QuadPoint array of the Link annotation.
Note:
An array of n QuadPoints specifying the coordinates of n quadrilaterals in default user space that comprise the region in which the link should be active. The coordinates specifying the four vertices of the quadrilateral are in counterclockwise order. For orientation purposes, the bottom of a quadrilateral is the line formed by p1 and p2 of the QuadPoint. QuadPoints shall be ignored if any coordinate in the array lies outside the region specified by Rect.

void pdftron::PDF::Annots::Link::SetQuadPoint ( int  idx,
const QuadPoint qp 
)

Set the QuadPoint to be located at a certain index of the QuadPoint array of the Link annotation.

(Optional; PDF 1.6 )

Parameters:
idx The index of the QuadPoint, starts at zero and should be less than the return value of GetQuadPointCount().
qp The QuadPoint to be stored in the annotation.
Note:
An array of n QuadPoints specifying the coordinates of n quadrilaterals in default user space that comprise the region in which the link should be active. The coordinates specifying the four vertices of the quadrilateral are in counterclockwise order. For orientation purposes, the bottom of a quadrilateral is the line formed by p1 and p2 of the QuadPoint. QuadPoints shall be ignored if any coordinate in the array lies outside the region specified by Rect.


© 2002-2010 PDFTron Systems Inc.