URIAction Class Documentation

classURIAction : Action

Namespace: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, booluse_map)

Parameters

uri: const std::string &

String for the URI

use_map: bool

Send mouse position with the URI

General constructor

~URIAction

~URIAction()

Member Function Documentation

get_is_map

boolget_is_map()

Returns:

true 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

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.

get_uri

std::stringget_uri()

Returns:

The Uniform Resource Identifier string for this action.

The URI string for this action.

operator==

booloperator==(const Action &other)

Parameters

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_is_map

voidset_is_map(booluse_map)

Parameters

use_map: bool

true to send mouse coordinates with the URI, false otherwise.

Returns:

void

Set whether to include mouse coordinates with the URI.

set_uri

voidset_uri(const std::string &uri)

Parameters

uri: const std::string &

The Uniform Resource Identifier string to set.

Returns:

void

Set the URI string for this action.

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.