PoDoFo 0.9.6
Public Member Functions | Protected Member Functions | List of all members
PoDoFo::PdfOutlineItem Class Reference

#include <PdfOutlines.h>

Inheritance diagram for PoDoFo::PdfOutlineItem:
PoDoFo::PdfElement PoDoFo::PdfOutlines

Public Member Functions

PdfOutlineItemCreateChild (const PdfString &sTitle, const PdfDestination &rDest)
 
PdfOutlineItemCreateNext (const PdfString &sTitle, const PdfDestination &rDest)
 
PdfOutlineItemCreateNext (const PdfString &sTitle, const PdfAction &rAction)
 
void InsertChild (PdfOutlineItem *pItem)
 
PdfOutlineItemPrev () const
 
PdfOutlineItemNext () const
 
PdfOutlineItemFirst () const
 
PdfOutlineItemLast () const
 
PdfOutlineItemGetParentOutline () const
 
void Erase ()
 
void SetDestination (const PdfDestination &rDest)
 
PdfDestinationGetDestination (PdfDocument *pDoc)
 
void SetAction (const PdfAction &rAction)
 
PdfActionGetAction (void)
 
void SetTitle (const PdfString &sTitle)
 
const PdfStringGetTitle () const
 
void SetTextFormat (EPdfOutlineFormat eFormat)
 
EPdfOutlineFormat GetTextFormat () const
 
void SetTextColor (double r, double g, double b)
 
double GetTextColorRed () const
 
double GetTextColorBlue () const
 
double GetTextColorGreen () const
 
- Public Member Functions inherited from PoDoFo::PdfElement
PdfObjectGetObject ()
 
const PdfObjectGetObject () const
 

Protected Member Functions

 PdfOutlineItem (PdfVecObjects *pParent)
 
 PdfOutlineItem (const PdfString &sTitle, const PdfDestination &rDest, PdfOutlineItem *pParentOutline, PdfVecObjects *pParent)
 
 PdfOutlineItem (const PdfString &sTitle, const PdfAction &rAction, PdfOutlineItem *pParentOutline, PdfVecObjects *pParent)
 
 PdfOutlineItem (PdfObject *pObject, PdfOutlineItem *pParentOutline, PdfOutlineItem *pPrevious)
 
- Protected Member Functions inherited from PoDoFo::PdfElement
 PdfElement (const char *pszType, PdfVecObjects *pParent)
 
 PdfElement (const char *pszType, PdfDocument *pParent)
 
 PdfElement (const char *pszType, PdfObject *pObject)
 
 PdfElement (EPdfDataType eExpectedDataType, PdfObject *pObject)
 
const char * TypeNameForIndex (int i, const char **ppTypes, long lLen) const
 
int TypeNameToIndex (const char *pszType, const char **ppTypes, long lLen, int nUnknownValue) const
 
PdfObjectCreateObject (const char *pszType=NULL)
 
PdfObjectGetNonConstObject () const
 

Detailed Description

A PDF outline item has an title and a destination. It is an element in the documents outline which shows its hierarchical structure.

See also
PdfDocument
PdfOutlines
PdfDestination

Constructor & Destructor Documentation

◆ PdfOutlineItem() [1/4]

PoDoFo::PdfOutlineItem::PdfOutlineItem ( PdfVecObjects pParent)
protected

Create a new PdfOutlineItem dictionary

Parameters
pParentparent vector of objects

◆ PdfOutlineItem() [2/4]

PoDoFo::PdfOutlineItem::PdfOutlineItem ( const PdfString sTitle,
const PdfDestination rDest,
PdfOutlineItem pParentOutline,
PdfVecObjects pParent 
)
protected

Create a new PdfOutlineItem from scratch

Parameters
sTitletitle of this item
rDestdestination of this item
pParentOutlineparent of this outline item in the outline item hierarchie
pParentparent vector of objects which is required to create new objects

◆ PdfOutlineItem() [3/4]

PoDoFo::PdfOutlineItem::PdfOutlineItem ( const PdfString sTitle,
const PdfAction rAction,
PdfOutlineItem pParentOutline,
PdfVecObjects pParent 
)
protected

Create a new PdfOutlineItem from scratch

Parameters
sTitletitle of this item
rActionaction of this item
pParentOutlineparent of this outline item in the outline item hierarchie
pParentparent vector of objects which is required to create new objects

◆ PdfOutlineItem() [4/4]

PoDoFo::PdfOutlineItem::PdfOutlineItem ( PdfObject pObject,
PdfOutlineItem pParentOutline,
PdfOutlineItem pPrevious 
)
protected

Create a PdfOutlineItem from an existing PdfObject

Parameters
pObjectan existing outline item
pParentOutlineparent of this outline item in the outline item hierarchie
pPreviousprevious item of this item

Member Function Documentation

◆ CreateChild()

PdfOutlineItem * PoDoFo::PdfOutlineItem::CreateChild ( const PdfString sTitle,
const PdfDestination rDest 
)

Create a PdfOutlineItem that is a child of this item

Parameters
sTitletitle of this item
rDestdestination of this item

◆ CreateNext() [1/2]

PdfOutlineItem * PoDoFo::PdfOutlineItem::CreateNext ( const PdfString sTitle,
const PdfAction rAction 
)

Create a PdfOutlineItem that is on the same level and follows the current item.

Parameters
sTitletitle of this item
rActionaction of this item

◆ CreateNext() [2/2]

PdfOutlineItem * PoDoFo::PdfOutlineItem::CreateNext ( const PdfString sTitle,
const PdfDestination rDest 
)

Create a PdfOutlineItem that is on the same level and follows the current item.

Parameters
sTitletitle of this item
rDestdestination of this item

◆ Erase()

void PoDoFo::PdfOutlineItem::Erase ( )

Deletes this outline item and all its children from the outline hierarchy and removes all objects from the list of PdfObjects All pointers to this item will be invalid after this function call.

◆ First()

PdfOutlineItem * PoDoFo::PdfOutlineItem::First ( ) const
inline
Returns
the first outline item that is a child of this item

◆ GetAction()

PdfAction * PoDoFo::PdfOutlineItem::GetAction ( void  )

Get the action of this outline.

Returns
the action, if there is one, or NULL

◆ GetDestination()

PdfDestination * PoDoFo::PdfOutlineItem::GetDestination ( PdfDocument pDoc)

Get the destination of this outline.

Parameters
pDoca PdfDocument owning this annotation. This is required to resolve names and pages.
Returns
the destination, if there is one, or NULL

◆ GetParentOutline()

PdfOutlineItem * PoDoFo::PdfOutlineItem::GetParentOutline ( ) const
inline
Returns
the parent item of this item or NULL if it is the top level outlines dictionary

◆ GetTextColorBlue()

double PoDoFo::PdfOutlineItem::GetTextColorBlue ( ) const

Get the color of the title of this item. Supported since PDF 1.4.

Returns
the red color component
See also
SetTextColor

◆ GetTextColorGreen()

double PoDoFo::PdfOutlineItem::GetTextColorGreen ( ) const

Get the color of the title of this item. Supported since PDF 1.4.

Returns
the red color component
See also
SetTextColor

◆ GetTextColorRed()

double PoDoFo::PdfOutlineItem::GetTextColorRed ( ) const

Get the color of the title of this item. Supported since PDF 1.4.

Returns
the red color component
See also
SetTextColor

◆ GetTextFormat()

EPdfOutlineFormat PoDoFo::PdfOutlineItem::GetTextFormat ( ) const

Get the text format of the title

Returns
the text format of the title

◆ GetTitle()

const PdfString & PoDoFo::PdfOutlineItem::GetTitle ( ) const

Get the title of this item

Returns
the title as PdfString

◆ InsertChild()

void PoDoFo::PdfOutlineItem::InsertChild ( PdfOutlineItem pItem)

Inserts a new PdfOutlineItem as a child of this outline item. The former can't be in the same tree as this one, as the tree property would be broken. If this prerequisite is violated, a PdfError exception (code ePdfError_OutlineItemAlreadyPresent) is thrown and nothing is changed. The item inserted is not copied, i.e. Erase() calls affect the original! Therefore also shared ownership is in effect, i.e. deletion by where it comes from damages the data structure it's inserted into.

Parameters
pIteman existing outline item

◆ Last()

PdfOutlineItem * PoDoFo::PdfOutlineItem::Last ( ) const
inline
Returns
the last outline item that is a child of this item

◆ Next()

PdfOutlineItem * PoDoFo::PdfOutlineItem::Next ( ) const
inline
Returns
the next item or NULL if this is the last on the current level

◆ Prev()

PdfOutlineItem * PoDoFo::PdfOutlineItem::Prev ( ) const
inline
Returns
the previous item or NULL if this is the first on the current level

◆ SetAction()

void PoDoFo::PdfOutlineItem::SetAction ( const PdfAction rAction)

Set the action of this outline.

Parameters
rActionthe action

◆ SetDestination()

void PoDoFo::PdfOutlineItem::SetDestination ( const PdfDestination rDest)

Set the destination of this outline.

Parameters
rDestthe destination

◆ SetTextColor()

void PoDoFo::PdfOutlineItem::SetTextColor ( double  r,
double  g,
double  b 
)

Set the color of the title of this item. This property is supported since PDF 1.4.

Parameters
rred color component
ggreen color component
bblue color component

◆ SetTextFormat()

void PoDoFo::PdfOutlineItem::SetTextFormat ( EPdfOutlineFormat  eFormat)

Set the text format of the title. Supported since PDF 1.4.

Parameters
eFormatthe formatting options for the title

◆ SetTitle()

void PoDoFo::PdfOutlineItem::SetTitle ( const PdfString sTitle)

Set the title of this outline item

Parameters
sTitlethe title to use