DynaPDF Manual - Page 464

Previous Page 463   Index   Next Page 465

Function Reference
Page 464 of 839
The function retrieves the first action and additional trigger events that should be executed when a
specific event occurs. The member StructSize must be set to sizeof(TPDFObjActions) before the
function can be called. If the object type is a page, then use the page number as handle.
Trigger events are supported by the global Catalog object (this is the document root), Pages, and
Form Fields. All other objects do not support trigger events.
Actions are defined as a single linked list. That means one action can execute another action (if
NextAction of that action is >= 0).
Note that an action can reference itself! The application must check whether an action is already in
the execution list before it will be executed.
Return values:
< 0: An error occurred, e.g. due to an invalid handle.
0: The object contains no action or trigger event.
1: The object contains an action.
2: The object contains a trigger event.
3: The object contains an action and a trigger event.
GetObjEvent
Syntax:
LBOOL pdfGetObjEvent(
const IEVT* IEvent,
// Pointer of an event object
struct TPDFObjEvent* Event) // see below
struct TPDFObjEvent
{
SI32
Action;
// Action to be executed.
TActionType ActionType; // The type of the action.
TObjEvent Event;
// The event when the action should be executed.
IEVT*
Next;
// Pointer to the next event if any.
};
The function retrieves the properties of a trigger event that is defined for a specific object. The action
of this event must only be executed if the specified event occurs, e.g. OnMouseUp and so on.
Trigger events are defined as a single linked list. Note that an object event can reference itself! The
application must check whether an event is already in the list before the next event will be loaded.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: GetObjActionCount (obsolete), GetObjActions

Next topic: GetOCG