PDFix SDK  7.2.0
Loading...
Searching...
No Matches
PdfAction Struct Referenceabstract

PdfAction class. More...

#include <pdfix.h>

Public Member Functions

virtual PdfActionType GetSubtype () const =0
 Gets an action's subtype. More...
 
virtual int GetJavaScript (wchar_t *buffer, int len) const =0
 Gets the string buffer from the JavaScript action. More...
 
virtual PdsDictionaryGetObject ()=0
 Gets the action object dictionary. More...
 
virtual int GetDestFile (wchar_t *buffer, int len) const =0
 
virtual PdfViewDestinationGetViewDestination ()=0
 
virtual bool SetViewDestination (PdfViewDestination *view_dest)=0
 
virtual bool CanCopy ()=0
 
virtual bool CanPaste (PdfDoc *dest_doc, void *data)=0
 
virtual void * Copy ()=0
 Copies action object data to a clipboard structure, from which it can be pasted. More...
 
virtual PdfActionPaste (PdfDoc *dest_doc, void *data)=0
 
virtual void DestroyClipboardData (void *data)=0
 
virtual int GetNumChildren () const =0
 Gets the number of child actions in a parent action object. More...
 
virtual PdfActionGetChild (int index) const =0
 Gets the requested child action from a parent action. More...
 
virtual bool RemoveChild (int index)=0
 Removes the specified child froma an action. More...
 

Detailed Description

PdfAction class.

The PdfAction are tasks that pdf viewer performs when a user clicks on a link or a bookmark.

Member Function Documentation

◆ CanCopy()

virtual bool PdfAction::CanCopy ( )
pure virtual

Tests whether the data from an action object can be copied to a clipboard for pasting. If the action is part of an action chain, the method tests all actions in the chain, and returns true only if all actions in the chain can be copied.

Returns
true if the action object or all actions in the action chain can be copied, false otherwise.

◆ CanPaste()

virtual bool PdfAction::CanPaste ( PdfDoc dest_doc,
void *  data 
)
pure virtual

Tests whether data from an action object that has been copied to a clipboard can be pasted into a destination document. It tests, for example, whether pasting is allowed by document permissions

Parameters
dest_docThe destination document.
dataThe clipboard data that will be pasted to the page.
Returns
true if the action data can be pasted, false otherwise.

◆ Copy()

virtual void * PdfAction::Copy ( )
pure virtual

Copies action object data to a clipboard structure, from which it can be pasted.

Returns
the action clipboard data.
See also
PdfAction::DestroyClipboardData

◆ DestroyClipboardData()

virtual void PdfAction::DestroyClipboardData ( void *  data)
pure virtual

Destroys data that has been copied from an action object into a clipboard. Use this method when the clipboard data is no longer needed.

Parameters
datathe clipboard data retrieved from PdfAction::Copy

◆ GetChild()

virtual PdfAction * PdfAction::GetChild ( int  index) const
pure virtual

Gets the requested child action from a parent action.

Parameters
indexThe index of action object to obtain.
Returns
Requested action.
See also
PdfAction::GetNumChildren
PdfAction::Release

◆ GetDestFile()

virtual int PdfAction::GetDestFile ( wchar_t *  buffer,
int  len 
) const
pure virtual

Gets the string buffer from the action representing external resource. For URI action it's the uniform resource identifier (URI) typically a file that is the destination of a hypertext link. For Launch action it's a file specification of the application that shall be launched or the document that shall beopened or printed. For GoToE action it's a file specification of an external root document of the source.

Parameters
buffer(filled by method) If the buffer is null function returns required length of string
lenLength of a buffer to be filled in.
Returns
Number of characters written into buffer of required length.

◆ GetJavaScript()

virtual int PdfAction::GetJavaScript ( wchar_t *  buffer,
int  len 
) const
pure virtual

Gets the string buffer from the JavaScript action.

Parameters
buffer(filled by method) If the buffer is null function returns required length of string
lenLength of a buffer to be filled in.
Returns
Number of characters written into buffer of required length.

◆ GetNumChildren()

virtual int PdfAction::GetNumChildren ( ) const
pure virtual

Gets the number of child actions in a parent action object.

Returns
The number of children.
See also
PdfAction::GetChild

◆ GetObject()

virtual PdsDictionary * PdfAction::GetObject ( )
pure virtual

Gets the action object dictionary.

Returns
an action dictionary.

◆ GetSubtype()

virtual PdfActionType PdfAction::GetSubtype ( ) const
pure virtual

Gets an action's subtype.

Returns
The PdfActionType corresponding to the action's subtype.

◆ GetViewDestination()

virtual PdfViewDestination * PdfAction::GetViewDestination ( )
pure virtual

Gets the view destination of the GoTo, GoToR or GoToE action. The objects can bee represented by an array or a string object

Returns
the view destination.

◆ Paste()

virtual PdfAction * PdfAction::Paste ( PdfDoc dest_doc,
void *  data 
)
pure virtual

Creates a new PdfAction in the destination document, using clipboard data generated by PdfAction::Copy. If the original PdfAction was an action chain, the entire action chain is recreated. The returned PdfAction is the first item in the chain. After successfully pasting the data, use PdfAction::DestroyClipboardData() to free the associated memory.

Parameters
dest_docThe page to which the action is pasted.
Returns
A newly created action object associated with the specified document, containing the same data as the copied action.
See also
PdfAction::DestroyClipboardData

◆ RemoveChild()

virtual bool PdfAction::RemoveChild ( int  index)
pure virtual

Removes the specified child froma an action.

Parameters
indexThe index of the child.
Returns
True if successfull, false otherwise.

◆ SetViewDestination()

virtual bool PdfAction::SetViewDestination ( PdfViewDestination view_dest)
pure virtual

Sets the view destination of the GoTo, GoToR or GoToE action. The objects can bee represented by an array or a string object

Parameters
view_destThe view destination.
Returns
true if view destination was set, false otherwise.