URIAction Class Documentation

class URIAction : Action

Namespace:datalogics_interface

Inherits from:
Action

Detailed Description

A text string, typically a hyperlink.

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: bool

Send mouse position with the URI

General constructor

~URIAction

~URIAction()

Member Function Documentation

get_is_map

bool get_is_map()

Returns:

bool

true if mouse coordinates will be sent with the URI, false otherwise.

Whether to include mouse coordinates with the URI.

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:

PDFDict

The underlying PDF dictionary for this Action.

Retrieve the PDFObject representation of this object.

get_subtype

std::string get_subtype()

Returns:

std::string

The subtype string for this action, such as "GoTo", "URI", "Launch", or "GoToR".

The action's subtype.

get_uri

std::string get_uri()

Returns:

std::string

The Uniform Resource Identifier string for this action.

The URI string for this action.

operator==

bool operator==(const Action & other)

Parameters

Returns:

bool

true if the two objects refer to the same action, false otherwise.

Determines whether this Action is equal to another.

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: bool

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

Returns:

void

Set 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:

void

Set the URI string for this action.

to_string

std::string to_string()

Returns:

std::string

A string describing this Action.

Returns a string representation of 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.