Property Actions returns or sets list of actions associated with the annotation for the specific trigger. For most annotations only Trigger_Up
is used.
Syntax
HRESULT get_Actions ([in] PXC_TriggerType nTrigger, |
[out, retval] IPXC_ActionsList** pActions); |
HRESULT put_Actions ([in] PXC_TriggerType nTrigger, |
[in] IPXC_ActionsList* pActions); |
Parameters
- nTrigger
- [in] Specifies the trigger for which list of action should set or retrieved.
Sample
02 | public bool HasInvalidPaths(PDFXEdit.IPXC_Annotation annot) |
04 | uint invalidCount = 0; |
05 | uint GoTo = pxsInst.StrToAtom( "GoTo" ); |
06 | uint GoToR = pxsInst.StrToAtom( "GoToR" ); |
07 | uint Launch = pxsInst.StrToAtom( "Launch" ); |
08 | PDFXEdit.IPXC_ActionsList actions = annot.get_Actions(PDFXEdit.PXC_TriggerType.Trigger_Up); |
09 | for ( uint k = 0; k < actions.Count; k++) |
11 | if ((actions[k].Type == GoTo) || (actions[k].Type == GoToR)) |
13 | PDFXEdit.IPXC_Action_Goto actionGoTo = (PDFXEdit.IPXC_Action_Goto)actions[k]; |
14 | if (actionGoTo.IsValid == false ) |
18 | else if (actions[k].Type == GoToR) |
20 | PDFXEdit.IPXC_FileSpec path = actionGoTo.Target; |
21 | if (File.Exists(path.DIPath) == false ) |
26 | else if (actions[k].Type == Launch) |
28 | PDFXEdit.IPXC_Action_Launch actionLaunch = (PDFXEdit.IPXC_Action_Launch)actions[k]; |
29 | if (actionLaunch.IsValid == false ) |
35 | PDFXEdit.IPXC_FileSpec path = actionLaunch.FileSpec; |
38 | if (File.Exists(actionLaunch.FileName) == false ) |
43 | if (File.Exists(path.DIPath) == false ) |
50 | return (invalidCount > 0); |
See Also
IPXC_Annotation