Foxit PDF SDK
FSAction Class Reference

动作类型:未知。
More...

Inheritance diagram for FSAction:
FSBase FSEmbeddedGotoAction FSGotoAction FSHideAction FSImportDataAction FSJavaScriptAction FSLaunchAction FSNamedAction FSRemoteGotoAction FSRenditionAction FSResetFormAction FSSetOCGStateAction FSSubmitFormAction FSURIAction

Instance Methods

(FSPDFDictionary *) - getDict
 Get PDF dictionary of current object.
More...
 
(FSPDFDoc *) - getDocument
 Get the PDF document, to which current action belongs.
More...
 
(FSAction *) - getSubAction:
 Get a sub-action by index.
More...
 
(int) - getSubActionCount
 Get the count of sub-actions.
More...
 
(FSActionType) - getType
 动作触发类型:文档打开。
More...
 
(id) - initWithAction:
 Constructor, with another action object.
More...
 
(id) - initWithDocument:action_dict:
 Constructor, with parameters.
More...
 
(void) - insertSubAction:sub_action:
 Insert a new sub-action to the location specified by index.
More...
 
(BOOL) - isEmpty
 检查当前对象是否为空。
More...
 
(void) - removeAllSubActions
 Remove all the sub-actions.
More...
 
(void) - removeSubAction:
 Remove a sub-action, specified by index.
More...
 
(void) - setSubAction:sub_action:
 Set a sub-action by index.
More...
 

Class Methods

(FSAction *) + create:action_type:
 Create a new action, for specified action type.
More...
 

Detailed Description

动作类型:未知。

此类表示和OFD动作相关的操作。

动作类型:跳转。

动作类型:URI。

动作类型:声音(当前不支持)。

动作类型:视频(当前不支持)。

动作类型:跳转到动作。

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 FSAction is the base class for all kinds of PDF actions. For concrete action types, please refer to derived classes. Function FSAction::create:action_type: 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.

Method Documentation

◆ create:action_type:()

+ (FSAction *) create: (FSPDFDoc*)  document
action_type: (FSActionType)  action_type 

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.

Parameters
[in]documentA valid PDF document, to which the new action belongs.
[in]action_typeAction type, used to specify which type of action is to be created. Currently only support:
FSActionTypeGoto, FSActionTypeURI, FSActionTypeJavaScript, FSActionTypeNamed, FSActionTypeGoToR, FSActionTypeGoToE, FSActionTypeSubmitForm, FSActionTypeResetForm, FSActionTypeHide, FSActionTypeLaunch, FSActionTypeImportData, FSActionTypeRendition, FSActionTypeSetOCGState, FSActionTypeThread,
Returns
A new action object, with no action data.

◆ getDict()

- (FSPDFDictionary *) getDict

Get PDF dictionary of current object.

Returns
The PDF dictionary.If there is any error, this function will return nil.

◆ getDocument()

- (FSPDFDoc *) getDocument

Get the PDF document, to which current action belongs.

Returns
A PDF document object.

◆ getSubAction:()

- (FSAction *) getSubAction: (int)  index

Get a sub-action by index.

Parameters
[in]indexIndex of sub-action to be retrieved. Valid range: from 0 to (count-1). count is returned by function FSAction::getSubActionCount.
Returns
An action object that represents the specified sub-action.

◆ getSubActionCount()

- (int) getSubActionCount

Get the count of sub-actions.

Returns
Count of sub-actions.

◆ getType()

- (FSActionType) getType

动作触发类型:文档打开。

Get action type.

动作触发类型:页面打开。

动作触发类型:鼠标点击。

获取动作类型。

Returns
动作类型。请参考从 开始的值, 这应该是这些值中的一个。
Action type. Please refer to values starting from FSActionTypeGoto and this would be one of these values.

◆ initWithAction:()

- (id) initWithAction: (FSAction*)  action

◆ initWithDocument:action_dict:()

- (id) initWithDocument: (FSPDFDoc*)  document
action_dict: (FSPDFDictionary*)  action_dict 

Constructor, with parameters.

Parameters
[in]documentA valid PDF document object.
[in]action_dictA PDF dictionary object that represents an action.

◆ insertSubAction:sub_action:()

- (void) insertSubAction: (int)  index
sub_action: (FSAction*)  sub_action 

Insert a new sub-action to the location specified by index.

Parameters
[in]indexIndex 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.
[in]sub_actionNew sub-action to be inserted. Currently only support following types as the new sub-action:
FSActionTypeGoto, FSActionTypeURI, FSActionTypeJavaScript, FSActionTypeNamed, FSActionTypeGoToR, FSActionTypeGoToE, FSActionTypeSubmitForm, FSActionTypeResetForm, FSActionTypeHide, FSActionTypeLaunch, FSActionTypeImportData, FSActionTypeRendition.
Returns
None.

◆ isEmpty()

- (BOOL) isEmpty

检查当前对象是否为空。

Check whether current object is empty or not.

当前对象为空时,表示当前对象是无用的。

Returns
YES 表示当前对象为空,NO 表示不为空。

When the current object is empty, that means current object is useless.

Returns
YES means current object is empty, while NO means not.

◆ removeAllSubActions()

- (void) removeAllSubActions

Remove all the sub-actions.

Returns
None.

◆ removeSubAction:()

- (void) removeSubAction: (int)  index

Remove a sub-action, specified by index.

Parameters
[in]indexIndex of sub-action to be retrieved. Valid range: from 0 to (count-1). count is returned by function FSAction::getSubActionCount.
Returns
None.

◆ setSubAction:sub_action:()

- (void) setSubAction: (int)  index
sub_action: (FSAction*)  sub_action 

Set a sub-action by index.

Parameters
[in]indexIndex of sub-action to be retrieved. Valid range: from 0 to (count-1). count is returned by function FSAction::getSubActionCount.
[in]sub_actionAn action object to be set as a sub-action. Currently only support following types as sub-action:
FSActionTypeGoto, FSActionTypeURI, FSActionTypeJavaScript, FSActionTypeNamed, FSActionTypeGoToR, FSActionTypeGoToE, FSActionTypeSubmitForm, FSActionTypeResetForm, FSActionTypeHide, FSActionTypeLaunch, FSActionTypeImportData, FSActionTypeRendition, FSActionTypeSetOCGState.
Returns
None.