GoToAction Class Documentation
classGoToAction : ActionNamespace:datalogics_interface
- Inherits from:
Action
Detailed Description
A go-to action includes a hyperlink that, when clicked, takes the reader to a different place within the same document.
The action is linked to a bookmark within the document.
A remote go-to action includes a hyperlink that takes the reader to a destination in a separate document.
Uses types
Constructor & Destructor Documentation
GoToAction
GoToAction(Document &doc, const std::string &named_destination)Parameters
doc: Document &named_destination: const std::string &
Create a GoTo action that resolves a named destination at view time. The named destination is looked up in the document's /Names/Dests name tree when the action fires; use NameTree::put(name, dest) (or the equivalent string-keyed put) to register it.
GoToAction
GoToAction(GoToAction &&)Parameters
GoToAction
GoToAction(ViewDestination &dest)Parameters
dest: ViewDestination &The ViewDestination contained in this class.
General constructor
~GoToAction
~GoToAction()Member Function Documentation
clear_destination
voidclear_destination()Returns:
voidRemoves the destination from this action.
get_destination
std::unique_ptr< ViewDestination >get_destination()Returns:
The ViewDestination for this action.The ViewDestination that this go-to action navigates to.
get_pdf_dict
PDFDictget_pdf_dict()Returns:
The underlying PDF dictionary for this Action.Retrieve the PDFObject representation of this object.
get_subtype
std::stringget_subtype()Returns:
The subtype string for this action, such as "GoTo", "URI", "Launch", or "GoToR".The action's subtype.
operator=
GoToAction &operator=(GoToAction &&)Parameters
Returns:
GoToAction &operator==
booloperator==(const Action &other)Parameters
other: const Action &
Returns:
true if the two objects refer to the same action, false otherwise.Two Actions are considered equal if they refer to the same underlying PDF action object.
set_destination
voidset_destination(const ViewDestination &dest)Parameters
dest: const ViewDestination &The ViewDestination to set, or null to remove.
Returns:
voidSetting the destination to null removes the destination entry from the action dictionary.
to_string
std::stringto_string()Returns:
A string describing this Action.The string includes the action's subtype.
try_as
T *try_as(typename T)Parameters
: typename T
Returns:
T *Attempt to downcast this action to a derived type. Returns a pointer to the derived type, or nullptr if the type doesn't match.
try_as
const T *try_as(typename T)Parameters
: typename T
Returns:
const T *Const overload of try_as(). Returns a const pointer, or nullptr.