URIAction Class Documentation
class URIAction : ActionNamespace:datalogics_interface
- Inherits from:
Action
Detailed Description
A Uniform Resource Identifier (URI) is a text string that identifies a resource on the Internet, typically a hyperlink to a web page.
A URI Action within a PDF file allows a reader to click on a hyperlink and open a separate web page or another PDF or other kind of file accessed through a web link.
Uses types
Constructor & Destructor Documentation
URIAction
URIAction(const std::string & uri, bool use_map)Parameters
uri: const std::string &String for the URI
use_map: boolSend mouse position with the URI
General constructor
URIAction
URIAction(URIAction && )Parameters
~URIAction
~URIAction()Member Function Documentation
get_is_map
bool get_is_map()Returns:
booltrue if mouse coordinates will be sent with the URI, false otherwise.
When true, the position of the mouse click that triggered the action is appended to the URI as a query parameter.
get_pdf_dict
PDFDict get_pdf_dict()Returns:
PDFDictThe underlying PDF dictionary for this Action.
Retrieve the PDFObject representation of this object.
get_subtype
std::string get_subtype()Returns:
std::stringThe subtype string for this action, such as "GoTo", "URI", "Launch", or "GoToR".
The action's subtype.
get_uri
std::string get_uri()Returns:
std::stringThe Uniform Resource Identifier string for this action.
The URI string for this action.
operator=
URIAction & operator=(URIAction && )Parameters
Returns:
URIAction &operator==
bool operator==(const Action & other)Parameters
other: const Action &
Returns:
booltrue 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_is_map
void set_is_map(bool use_map)Parameters
use_map: booltrue to send mouse coordinates with the URI, false otherwise.
Returns:
voidSet whether to include mouse coordinates with the URI.
set_uri
void set_uri(const std::string & uri)Parameters
uri: const std::string &The Uniform Resource Identifier string to set.
Returns:
voidSet the URI string for this action.
to_string
std::string to_string()Returns:
std::stringA 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.