![]() |
#include <Bookmark.h>
Public Member Functions | |
Bookmark () | |
A constructor. | |
Bookmark (SDF::Obj in_bookmark_dict) | |
A constructor. | |
Bookmark (const Bookmark &in_bookmark) | |
Copy constructor. | |
Bookmark & | operator= (const Bookmark &in_bookmark) |
Sets this Bookmark object equal to the specified Bookmark object. | |
bool | operator== (const Bookmark &in_bookmark) |
Compares two Bookmark objects for equality. | |
bool | IsValid () const |
Indicates whether the Bookmark is valid (non-null). | |
bool | HasChildren () |
Indicates whether the Bookmark has children. | |
Bookmark | GetNext () |
Returns the Bookmark's next (right) sibling. | |
Bookmark | GetPrev () |
Returns the Bookmark's previous (left) sibling. | |
Bookmark | GetFirstChild () |
Returns the Bookmark's first child. | |
Bookmark | GetLastChild () |
Returns the Bookmark's last child. | |
Bookmark | GetParent () |
Returns the Bookmark's parent Bookmark. | |
Bookmark | Find (const UString &in_title) |
Returns the Bookmark specified by the given title string. | |
Bookmark | AddChild (const UString &in_title) |
Adds a new Bookmark as the new last child of this Bookmark. | |
void | AddChild (Bookmark in_bookmark) |
Adds the specified Bookmark as the new last child of this Bookmark. | |
Bookmark | AddNext (const UString &in_title) |
Adds a new Bookmark to the tree containing this Bookmark, as the new right sibling. | |
void | AddNext (Bookmark in_bookmark) |
Adds the specified Bookmark as the new right sibling to this Bookmark, adjusting the tree containing this Bookmark appropriately. | |
Bookmark | AddPrev (const UString &in_title) |
Adds a new Bookmark to the tree containing this Bookmark, as the new left sibling. | |
void | AddPrev (Bookmark in_bookmark) |
Adds the specified Bookmark as the new left sibling to this Bookmark, adjusting the tree containing this Bookmark appropriately. | |
void | Delete () |
Removes the Bookmark's subtree from the bookmark tree containing it. | |
void | Unlink () |
Unlinks this Bookmark from the bookmark tree that contains it, and adjusts the tree appropriately. | |
int | GetIndent () |
Returns the indentation level of the Bookmark in its containing tree. | |
bool | IsOpen () |
Indicates whether the Bookmark is open. | |
void | SetOpen (bool in_open) |
Opens or closes the Bookmark. | |
int | GetOpenCount () |
Returns the number of opened bookmarks in this subtree. | |
UString | GetTitle () |
Returns the Bookmark's title string. | |
SDF::Obj | GetTitleObj () |
Returns the Bookmark's title string object. | |
void | SetTitle (const UString &title) |
Sets the Bookmark’s title string. | |
Action | GetAction () |
Returns the Bookmark's action. | |
void | SetAction (Action in_action) |
Sets the Bookmark’s action. | |
void | RemoveAction () |
Removes the Bookmark’s action. | |
int | GetFlags () |
Returns the Bookmark's flags. | |
void | SetFlags (int in_flags) |
Sets the Bookmark's flags. | |
void | GetColor (double &out_r, double &out_g, double &out_b) |
Returns the Bookmark's RGB color value. | |
void | SetColor (double in_r=0.0, double in_g=0.0, double in_b=0.0) |
Sets the Bookmark's color value. | |
SDF::Obj | GetSDFObj () const |
Returns the underlying SDF/Cos object. | |
Static Public Member Functions | |
static Bookmark | Create (class PDFDoc &in_doc, const UString &in_title) |
Creates a new valid Bookmark with given title in the specified document. |
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).
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 | ) |
static Bookmark pdftron::PDF::Bookmark::Create | ( | class PDFDoc & | in_doc, | |
const UString & | in_title | |||
) | [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. |
bool pdftron::PDF::Bookmark::operator== | ( | const Bookmark & | in_bookmark | ) |
bool pdftron::PDF::Bookmark::IsValid | ( | ) | const |
bool pdftron::PDF::Bookmark::HasChildren | ( | ) |
Bookmark pdftron::PDF::Bookmark::GetNext | ( | ) |
Returns the Bookmark's next (right) sibling.
Bookmark pdftron::PDF::Bookmark::GetPrev | ( | ) |
Returns the Bookmark's previous (left) sibling.
Bookmark pdftron::PDF::Bookmark::GetFirstChild | ( | ) |
Returns the Bookmark's first child.
Bookmark pdftron::PDF::Bookmark::GetLastChild | ( | ) |
Returns the Bookmark's last child.
Bookmark pdftron::PDF::Bookmark::GetParent | ( | ) |
void pdftron::PDF::Bookmark::AddChild | ( | Bookmark | in_bookmark | ) |
void pdftron::PDF::Bookmark::AddNext | ( | Bookmark | in_bookmark | ) |
void pdftron::PDF::Bookmark::AddPrev | ( | Bookmark | in_bookmark | ) |
void pdftron::PDF::Bookmark::Delete | ( | ) |
Removes the Bookmark's subtree from the bookmark tree containing it.
void pdftron::PDF::Bookmark::Unlink | ( | ) |
Unlinks this Bookmark from the bookmark tree that contains it, and adjusts the tree appropriately.
int pdftron::PDF::Bookmark::GetIndent | ( | ) |
bool pdftron::PDF::Bookmark::IsOpen | ( | ) |
void pdftron::PDF::Bookmark::SetOpen | ( | bool | in_open | ) |
int pdftron::PDF::Bookmark::GetOpenCount | ( | ) |
Returns the number of opened bookmarks in this subtree.
UString pdftron::PDF::Bookmark::GetTitle | ( | ) |
Returns the Bookmark's title string.
SDF::Obj pdftron::PDF::Bookmark::GetTitleObj | ( | ) |
Returns the Bookmark's title string object.
void pdftron::PDF::Bookmark::SetTitle | ( | const UString & | title | ) |
Sets the Bookmark’s title string.
title | The new title string for the bookmark. |
Action pdftron::PDF::Bookmark::GetAction | ( | ) |
Returns the Bookmark's action.
void pdftron::PDF::Bookmark::SetAction | ( | Action | in_action | ) |
void pdftron::PDF::Bookmark::RemoveAction | ( | ) |
Removes the Bookmark’s action.
int pdftron::PDF::Bookmark::GetFlags | ( | ) |
Returns the Bookmark's flags.
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::GetColor | ( | double & | out_r, | |
double & | out_g, | |||
double & | out_b | |||
) |
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. |
double red, green, blue;
bookmark.GetColor(red, green, blue);
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. |
SDF::Obj pdftron::PDF::Bookmark::GetSDFObj | ( | ) | const |
Returns the underlying SDF/Cos object.