Public Types | |
enum | NewWindowFlag { NewWindowFlag.e_NewWindowFlagFalse = 0, NewWindowFlag.e_NewWindowFlagTrue = 1, NewWindowFlag.e_NewWindowFlagNone = 2 } |
Enumeration for new window flag. More... | |
enum | Type { Type.e_TypeUnknown = 0, Type.e_TypeGoto = 1, Type.e_TypeGoToR = 2, Type.e_TypeGoToE = 3, Type.e_TypeLaunch = 4, Type.e_TypeThread = 5, Type.e_TypeURI = 6, Type.e_TypeSound = 7, Type.e_TypeMovie = 8, Type.e_TypeHide = 9, Type.e_TypeNamed = 10, Type.e_TypeSubmitForm = 11, Type.e_TypeResetForm = 12, Type.e_TypeImportData = 13, Type.e_TypeJavaScript = 14, Type.e_TypeSetOCGState = 15, Type.e_TypeRendition = 16, Type.e_TypeTrans = 17, Type.e_TypeGoTo3DView = 18 } |
Enumeration for action type. More... | |
Public Member Functions | |
Action (PDFDoc document, PDFDictionary action_dict) | |
Constructor, with parameters. More... | |
Action (Action action) | |
Constructor, with another Action object. More... | |
PDFDictionary | GetDict () |
Get PDF dictionary of current object. More... | |
PDFDoc | GetDocument () |
Get the PDF document, to which current action belongs. More... | |
Action | GetSubAction (int index) |
Get a sub-action by index. More... | |
int | GetSubActionCount () |
Get the count of sub-actions. More... | |
Action.Type | GetType () |
Get action type. More... | |
void | InsertSubAction (int index, Action sub_action) |
Insert a new sub-action to the location specified by index. More... | |
bool | IsEmpty () |
Check whether current object is empty or not. More... | |
void | RemoveAllSubActions () |
Remove all the sub-actions. More... | |
void | RemoveSubAction (int index) |
Remove a sub-action, specified by index. More... | |
void | SetSubAction (int index, Action sub_action) |
Set a sub-action by index. More... | |
Static Public Member Functions | |
static Action | Create (PDFDoc document, Action.Type action_type) |
Create a new action, for specified action type. More... | |
PDF supports following standard action types:
"Go-To Action", "Remote Go-To Action", "Embedded Go-To Action", "Launch Action", "Thread Action", "URI
Action", "Sound Action","Movie Action", "Hide Action", "Named Action", "Submit-Form Action", "Reset-Form
Action", "Import-Data Action", "JavaScript Action", "Set-OCG-State Action", "Rendition Action","Transition
Action","Go-To-3D-View Action".
A PDF action may have sub-actions. When this action is triggered, its sub-actions should also be triggered in turn.
Class Action is the base class for all kinds of PDF actions. For concrete action types, please refer to derived classes. Function Action::Create can be used to create a new action – currently only support some action types. Please refer to comment of this function for more details. This class also offers functions to modify sub-actions.
|
strong |
|
strong |
Enumeration for action type.
Values of this enumeration should be used alone.
Enumerator | |
---|---|
e_TypeUnknown | Action type: unknown action. |
e_TypeGoto | Action type: go-to action. |
e_TypeGoToR | Action type: remote go-to action. |
e_TypeGoToE | Action type: embedded go-to action. |
e_TypeLaunch | Action type: launch action. |
e_TypeThread | Action type: thread action. |
e_TypeURI | Action type: uniform resource identifier (URI) action. |
e_TypeSound | Action type: sound action. |
e_TypeMovie | Action type: movie action. |
e_TypeHide | Action type: hide action. |
e_TypeNamed | Action type: named action. |
e_TypeSubmitForm | Action type: submit-form action. |
e_TypeResetForm | Action type: reset-form action. |
e_TypeImportData | Action type: import-data action. |
e_TypeJavaScript | Action type: JavaScript action. |
e_TypeSetOCGState | Action type: set-OCG-state action. |
e_TypeRendition | Action type: rendition action. |
e_TypeTrans | Action type: transition action. |
e_TypeGoTo3DView | Action type: go-to-3D-view action. |
|
inline |
Constructor, with parameters.
document | A valid PDF document object. |
action_dict | A PDF dictionary object that represents an action. |
|
inline |
|
inlinestatic |
Create a new action, for specified action type.
The newly created action has no action data (except action type) yet. User needs to call the functions in concrete action classes to set action data.
document | A valid PDF document, to which the new action belongs. |
action_type | Action type, used to specify which type of action is to be created. Currently only support: actions::e_TypeGoto , actions::e_TypeURI , actions::e_TypeJavaScript , actions::e_TypeNamed , actions::e_TypeGoToR , actions::e_TypeGoToE , actions::e_TypeSubmitForm , actions::e_TypeResetForm , actions::e_TypeHide , actions::e_TypeLaunch , actions::e_TypeImportData , actions::e_TypeRendition . |
|
inline |
Get PDF dictionary of current object.
|
inline |
Get the PDF document, to which current action belongs.
|
inline |
Get a sub-action by index.
index | Index of sub-action to be retrieved. Valid range: from 0 to (count-1). count is returned by function Action::GetSubActionCount. |
|
inline |
Get the count of sub-actions.
|
inline |
Get action type.
|
inline |
Insert a new sub-action to the location specified by index.
index | Index of the location, where the new sub-action is inserted. If this index value is below zero, the new sub-action will be inserted to be the first. If this index value equals or larger than current sub-action count, the new sub-action will be inserted to be the last. |
sub_action | New sub-action to be inserted. Currently only support following types as the new sub-action: actions::e_TypeGoto , actions::e_TypeURI , actions::e_TypeJavaScript , actions::e_TypeNamed , actions::e_TypeGoToR , actions::e_TypeGoToE , actions::e_TypeSubmitForm , actions::e_TypeResetForm , actions::e_TypeHide , actions::e_TypeLaunch , actions::e_TypeImportData , actions::e_TypeRendition . |
|
inline |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
|
inline |
Remove all the sub-actions.
|
inline |
Remove a sub-action, specified by index.
index | Index of sub-action to be retrieved. Valid range: from 0 to (count-1). count is returned by function Action::GetSubActionCount. |
|
inline |
Set a sub-action by index.
index | Index of sub-action to be retrieved. Valid range: from 0 to (count-1). count is returned by function Action::GetSubActionCount. |
sub_action | An Action object to be set as a sub-action. Currently only support following types as sub-action: actions::e_TypeGoto , actions::e_TypeURI , actions::e_TypeJavaScript , actions::e_TypeNamed , actions::e_TypeGoToR , actions::e_TypeGoToE , actions::e_TypeSubmitForm , actions::e_TypeResetForm , actions::e_TypeHide , actions::e_TypeLaunch , actions::e_TypeImportData , actions::e_TypeRendition . |