LaunchAction Class Documentation
classLaunchAction : ActionNamespace:datalogics_interface
- Inherits from:
Action
Detailed Description
A launch action launches an application or opens or prints a document.
Uses types
Constructor & Destructor Documentation
LaunchAction
LaunchAction(FileSpecification &file_spec)Parameters
file_spec: FileSpecification &A FileSpecification representing the application to be launched or the document to be opened or printed by this action.
General constructor.
The action's target will be the path referenced in the FileSpecification parameter. If the path is absolute, the target path will also be absolute. If the path is relative, the target path will also be relative.
Generally, the FileSpecification should be associated with the same Document that contains the LaunchAction. (Both FileSpecification and LaunchAction objects are associated with a Document at creation time, and the association cannot be changed.) The LaunchAction will be associated with the same Document that the FileSpecification parameter is associated with.
If the action's FileSpecification is changed during program execution such that the FileSpecification is associated with a different Document than the LaunchAction, saving the Document that contains the action will create a copy of the FileSpecification in the Document that contains the action.
LaunchAction
LaunchAction(LaunchAction &&)Parameters
~LaunchAction
~LaunchAction()Member Function Documentation
clear_file_specification
voidclear_file_specification()Returns:
voidRemoves the file specification from this action.
get_file_specification
std::unique_ptr< FileSpecification >get_file_specification()Returns:
The FileSpecification associated with the LaunchAction.Generally, the FileSpecification should be associated with the same Document that contains the LaunchAction. (Both FileSpecification and LaunchAction are associated with a Document at creation time.)
get_new_window
boolget_new_window()Returns:
true if the destination document is set to open in a new window, false otherwise.By default, this flag is not present.
If the action's FileSpecification is not a PDF, this flag is ignored.
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=
LaunchAction &operator=(LaunchAction &&)Parameters
Returns:
LaunchAction &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_file_specification
voidset_file_specification(const FileSpecification &file_spec)Parameters
file_spec: const FileSpecification &The FileSpecification to associate with the LaunchAction.
Returns:
voidGenerally, the FileSpecification should be associated with the same Document that contains the LaunchAction. (Both FileSpecification and LaunchAction are associated with a Document at creation time.)
If the FileSpecification is associated with a different Document than the LaunchAction, saving the Document that contains the action will create a copy of the FileSpecification in that Document.
set_new_window
voidset_new_window(boolnew_window)Parameters
new_window: booltrue to open the destination document in a new window, false otherwise.
Returns:
voidBy default, this flag is not present.
If the action's FileSpecification is not a PDF, this flag is ignored.
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.