#include <Bookmark.h>
Public Member Functions | |
Bookmark () | |
Bookmark (SDF::Obj in_bookmark_dict) | |
Bookmark (const Bookmark &in_bookmark) | |
Bookmark & | operator= (const Bookmark &in_bookmark) |
bool | operator== (const Bookmark &in_bookmark) |
bool | IsValid () const |
bool | HasChildren () |
Bookmark | GetNext () |
Bookmark | GetPrev () |
Bookmark | GetFirstChild () |
Bookmark | GetLastChild () |
Bookmark | GetParent () |
Bookmark | Find (const UString &in_title) |
Bookmark | AddChild (const UString &in_title) |
Bookmark | AddChild (Bookmark in_bookmark) |
Bookmark | AddNext (const UString &in_title) |
void | AddNext (Bookmark in_bookmark) |
Bookmark | AddPrev (const UString &in_title) |
void | AddPrev (Bookmark in_bookmark) |
void | Delete () |
void | Unlink () |
int | GetIndent () |
bool | IsOpen () |
void | SetOpen (bool in_open) |
int | GetOpenCount () |
UString | GetTitle () |
SDF::Obj | GetTitleObj () |
void | SetTitle (const UString &title) |
Action | GetAction () |
void | SetAction (Action in_action) |
void | RemoveAction () |
int | GetFlags () |
void | SetFlags (int in_flags) |
std::vector< double > | GetColor () |
void | GetColor (double &out_r, double &out_g, double &out_b) |
void | SetColor (double in_r=0.0, double in_g=0.0, double in_b=0.0) |
SDF::Obj | GetSDFObj () const |
ptrdiff_t | GetHandleInternal () |
Static Public Member Functions | |
static Bookmark | Create (class PDFDoc &in_doc, const UString &in_title) |
static Bookmark * | CreateInternal (ptrdiff_t impl) |
A PDF document may optionally display a document outline on the screen, allowing the user to navigate interactively from one part of the document to another. The outline consists of a tree-structured hierarchy of Bookmarks (sometimes called outline items), which serve as a 'visual table of contents' to display the document's structure to the user.
Each Bookmark has a title that appears on screen, and an Action that specifies what happens when a user clicks on the Bookmark. The typical action for a user-created Bookmark is to move to another location in the current document, although any action (see PDF::Action) can be specified.
Bookmark is a utility class used to simplify work with PDF bookmarks (or outlines; see section 8.2.2 'Document Outline' in PDF Reference Manual for more details).
Definition at line 31 of file Bookmark.h.
pdftron::PDF::Bookmark::Bookmark | ( | ) |
A constructor. Creates a null (non-valid) bookmark.
pdftron::PDF::Bookmark::Bookmark | ( | SDF::Obj | in_bookmark_dict | ) |
pdftron::PDF::Bookmark::Bookmark | ( | const Bookmark & | in_bookmark | ) |
void pdftron::PDF::Bookmark::AddNext | ( | Bookmark | in_bookmark | ) |
void pdftron::PDF::Bookmark::AddPrev | ( | Bookmark | in_bookmark | ) |
|
static |
Creates a new valid Bookmark with given title in the specified document.
in_doc | The document in which a Bookmark is to be created. |
in_title | The title string value of the new Bookmark. |
|
static |
void pdftron::PDF::Bookmark::Delete | ( | ) |
Removes the Bookmark's subtree from the bookmark tree containing it.
Action pdftron::PDF::Bookmark::GetAction | ( | ) |
std::vector<double> pdftron::PDF::Bookmark::GetColor | ( | ) |
Returns the Bookmark's RGB color value.
out_r | Reference to a variable that receives the red component of the color. |
out_g | Reference to a variable that receives the green component of the color. |
out_b | Reference to a variable that receives the blue component of the color. |
Example:
void pdftron::PDF::Bookmark::GetColor | ( | double & | out_r, |
double & | out_g, | ||
double & | out_b | ||
) |
Bookmark pdftron::PDF::Bookmark::GetFirstChild | ( | ) |
int pdftron::PDF::Bookmark::GetFlags | ( | ) |
ptrdiff_t pdftron::PDF::Bookmark::GetHandleInternal | ( | ) |
int pdftron::PDF::Bookmark::GetIndent | ( | ) |
Bookmark pdftron::PDF::Bookmark::GetLastChild | ( | ) |
Bookmark pdftron::PDF::Bookmark::GetNext | ( | ) |
int pdftron::PDF::Bookmark::GetOpenCount | ( | ) |
Returns the number of opened bookmarks in this subtree.
Bookmark pdftron::PDF::Bookmark::GetParent | ( | ) |
Bookmark pdftron::PDF::Bookmark::GetPrev | ( | ) |
SDF::Obj pdftron::PDF::Bookmark::GetSDFObj | ( | ) | const |
Returns the underlying SDF/Cos object.
UString pdftron::PDF::Bookmark::GetTitle | ( | ) |
SDF::Obj pdftron::PDF::Bookmark::GetTitleObj | ( | ) |
bool pdftron::PDF::Bookmark::HasChildren | ( | ) |
bool pdftron::PDF::Bookmark::IsOpen | ( | ) |
bool pdftron::PDF::Bookmark::IsValid | ( | ) | const |
bool pdftron::PDF::Bookmark::operator== | ( | const Bookmark & | in_bookmark | ) |
void pdftron::PDF::Bookmark::RemoveAction | ( | ) |
Removes the Bookmark's action.
void pdftron::PDF::Bookmark::SetAction | ( | Action | in_action | ) |
void pdftron::PDF::Bookmark::SetColor | ( | double | in_r = 0.0 , |
double | in_g = 0.0 , |
||
double | in_b = 0.0 |
||
) |
Sets the Bookmark's color value.
in_r | The red component of the color. |
in_g | The green component of the color. |
in_b | The blue component of the color. |
void pdftron::PDF::Bookmark::SetFlags | ( | int | in_flags | ) |
Sets the Bookmark's flags.
in_flags | The new bookmark flags. Bit 1 (the least-significant bit) indicates italic font whereas bit 2 indicates bold font. Therefore, 0 indicates normal, 1 is italic, 2 is bold, and 3 is bold-italic. |
void pdftron::PDF::Bookmark::SetOpen | ( | bool | in_open | ) |
void pdftron::PDF::Bookmark::SetTitle | ( | const UString & | title | ) |
Sets the Bookmark's title string.
title | The new title string for the bookmark. |
void pdftron::PDF::Bookmark::Unlink | ( | ) |
Unlinks this Bookmark from the bookmark tree that contains it, and adjusts the tree appropriately.