PoDoFo 0.9.20
|
#include <PdfOutlines.h>
Public Member Functions | |
PdfOutlineItem * | CreateChild (const PdfString &title, const std::shared_ptr< PdfDestination > &dest) |
PdfOutlineItem * | CreateNext (const PdfString &title, const std::shared_ptr< PdfDestination > &dest) |
PdfOutlineItem * | CreateNext (const PdfString &title, const std::shared_ptr< PdfAction > &action) |
void | InsertChild (PdfOutlineItem *item) |
PdfOutlineItem * | Prev () const |
PdfOutlineItem * | Next () const |
PdfOutlineItem * | First () const |
PdfOutlineItem * | Last () const |
PdfOutlineItem * | GetParentOutline () const |
void | Erase () |
void | SetDestination (const std::shared_ptr< PdfDestination > &dest) |
std::shared_ptr< PdfDestination > | GetDestination () const |
void | SetAction (const std::shared_ptr< PdfAction > &action) |
std::shared_ptr< PdfAction > | GetAction () const |
void | SetTitle (const PdfString &title) |
const PdfString & | GetTitle () const |
void | SetTextFormat (PdfOutlineFormat format) |
PdfOutlineFormat | GetTextFormat () const |
void | SetTextColor (double r, double g, double b) |
double | GetTextColorRed () const |
double | GetTextColorBlue () const |
double | GetTextColorGreen () const |
Protected Member Functions | |
PdfOutlineItem (PdfDocument &doc) | |
PdfOutlineItem (PdfDocument &doc, const PdfString &title, const std::shared_ptr< PdfDestination > &dest, PdfOutlineItem *parentOutline) | |
PdfOutlineItem (PdfDocument &doc, const PdfString &title, const std::shared_ptr< PdfAction > &action, PdfOutlineItem *parentOutline) | |
PdfOutlineItem (PdfObject &obj, PdfOutlineItem *parentOutline, PdfOutlineItem *previous) | |
A PDF outline item has an title and a destination. It is an element in the documents outline which shows its hierarchical structure.
|
protected |
Create a new PdfOutlineItem dictionary
parent | parent vector of objects |
|
protected |
Create a new PdfOutlineItem from scratch
title | title of this item |
dest | destination of this item |
parentOutline | parent of this outline item in the outline item hierarchie |
parent | parent vector of objects which is required to create new objects |
|
protected |
Create a new PdfOutlineItem from scratch
title | title of this item |
action | action of this item |
parentOutline | parent of this outline item in the outline item hierarchie |
parent | parent vector of objects which is required to create new objects |
|
protected |
Create a PdfOutlineItem from an existing PdfObject
obj | an existing outline item |
parentOutline | parent of this outline item in the outline item hierarchie |
previous | previous item of this item |
PdfOutlineItem * PdfOutlineItem::CreateChild | ( | const PdfString & | title, |
const std::shared_ptr< PdfDestination > & | dest ) |
Create a PdfOutlineItem that is a child of this item
title | title of this item |
dest | destination of this item |
PdfOutlineItem * PdfOutlineItem::CreateNext | ( | const PdfString & | title, |
const std::shared_ptr< PdfAction > & | action ) |
Create a PdfOutlineItem that is on the same level and follows the current item.
title | title of this item |
action | action of this item |
PdfOutlineItem * PdfOutlineItem::CreateNext | ( | const PdfString & | title, |
const std::shared_ptr< PdfDestination > & | dest ) |
Create a PdfOutlineItem that is on the same level and follows the current item.
title | title of this item |
dest | destination of this item |
void 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.
|
inline |
shared_ptr< PdfAction > PdfOutlineItem::GetAction | ( | ) | const |
Get the action of this outline.
shared_ptr< PdfDestination > PdfOutlineItem::GetDestination | ( | ) | const |
Get the destination of this outline.
|
inline |
double PdfOutlineItem::GetTextColorBlue | ( | ) | const |
Get the color of the title of this item. Supported since PDF 1.4.
double PdfOutlineItem::GetTextColorGreen | ( | ) | const |
Get the color of the title of this item. Supported since PDF 1.4.
double PdfOutlineItem::GetTextColorRed | ( | ) | const |
Get the color of the title of this item. Supported since PDF 1.4.
PdfOutlineFormat PdfOutlineItem::GetTextFormat | ( | ) | const |
Get the text format of the title
const PdfString & PdfOutlineItem::GetTitle | ( | ) | const |
Get the title of this item
void PdfOutlineItem::InsertChild | ( | PdfOutlineItem * | item | ) |
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 PdfErrorCode::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.
item | an existing outline item |
|
inline |
|
inline |
|
inline |
void PdfOutlineItem::SetAction | ( | const std::shared_ptr< PdfAction > & | action | ) |
Set the action of this outline.
action | the action |
void PdfOutlineItem::SetDestination | ( | const std::shared_ptr< PdfDestination > & | dest | ) |
Set the destination of this outline.
dest | the destination |
void 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.
r | red color component |
g | green color component |
b | blue color component |
void PdfOutlineItem::SetTextFormat | ( | PdfOutlineFormat | format | ) |
Set the text format of the title. Supported since PDF 1.4.
format | the formatting options for the title |
void PdfOutlineItem::SetTitle | ( | const PdfString & | title | ) |
Set the title of this outline item
title | the title to use |