|
Foxit PDF SDK
|
Public 类型 | |
| enum | NewWindowFlag { e_NewWindowFlagFalse = 0, e_NewWindowFlagTrue = 1, e_NewWindowFlagNone = 2 } |
| 新窗口标志枚举。 更多... | |
| enum | Type { e_TypeUnknown = 0, e_TypeGoto = 1, e_TypeGoToR = 2, e_TypeGoToE = 3, e_TypeLaunch = 4, e_TypeThread = 5, e_TypeURI = 6, e_TypeSound = 7, e_TypeMovie = 8, e_TypeHide = 9, e_TypeNamed = 10, e_TypeSubmitForm = 11, e_TypeResetForm = 12, e_TypeImportData = 13, e_TypeJavaScript = 14, e_TypeSetOCGState = 15, e_TypeRendition = 16, e_TypeTrans = 17, e_TypeGoTo3DView = 18 } |
| 动作类型枚举。 更多... | |
Public 成员函数 | |
| Action (const PDFDoc &document, objects::PDFDictionary *action_dict) | |
| 构造函数,带参数。 更多... | |
| Action (const Action &action) | |
| 构造函数,使用另一个动作对象。 更多... | |
| ~Action () | |
| 析构函数。 | |
| objects::PDFDictionary * | GetDict () const |
| 获取当前对象的PDF字典。 更多... | |
| PDFDoc | GetDocument () |
| 获取当前动作所属的PDF文档。 更多... | |
| Action | GetSubAction (int index) |
| 按索引获取子动作。 更多... | |
| int | GetSubActionCount () |
| 获取子动作的数量。 更多... | |
| Type | GetType () |
| 获取动作类型。 更多... | |
| void | InsertSubAction (int index, const Action &sub_action) |
| 在指定索引位置插入新的子动作。 更多... | |
| bool | IsEmpty () const |
| 检查当前对象是否为空。 更多... | |
| bool | operator != (const Action &other) const |
| 不等于操作符。 更多... | |
| Action & | operator= (const Action &other) |
| 赋值操作符。 更多... | |
| bool | operator== (const Action &other) const |
| 等于操作符。 更多... | |
| void | RemoveAllSubActions () |
| 移除所有子动作。 更多... | |
| void | RemoveSubAction (int index) |
| 移除指定索引的子动作。 更多... | |
| void | SetSubAction (int index, const Action &sub_action) |
| 按索引设置子动作。 更多... | |
Public 成员函数 继承自 foxit::Base | |
| FS_HANDLE | Handle () const |
| 获取当前对象的句柄。 更多... | |
静态 Public 成员函数 | |
| static Action | Create (const foxit::pdf::PDFDoc &document, Type action_type) |
| 为指定的动作类型创建新动作。 更多... | |
PDF支持以下标准动作类型:
"转到动作"、"远程转到动作"、"嵌入转到动作"、"启动动作"、"线程动作"、 "URI动作"、"声音动作"、"电影动作"、"隐藏动作"、"命名动作"、"提交表单动作"、 "重置表单动作"、"导入数据动作"、"JavaScript动作"、"设置OCG状态动作"、 "演示动作"、"过渡动作"、"转到3D视图动作"。
PDF动作可能有子动作。当此动作被触发时,其子动作也应依次被触发。
类Action是所有类型PDF动作的基类。对于具体的动作类型,请参考 派生类。函数Action::Create可用于创建新动作 – 目前仅支持 某些动作类型。请参考此函数的注释以获取更多详细信息。此类还提供了修改子动作的函数。
动作类型枚举。
此枚举的值应单独使用。
|
explicit |
构造函数,带参数。
| [in] | document | 有效的PDF文档对象。 |
| [in] | action_dict | 表示动作的PDF字典对象。 |
| foxit::pdf::actions::Action::Action | ( | const Action & | action | ) |
构造函数,使用另一个动作对象。
| [in] | action | 另一个动作对象。 |
|
static |
为指定的动作类型创建新动作。
新创建的动作尚未有动作数据(除了动作类型)。 用户需要调用具体动作类中的函数来设置动作数据。
| objects::PDFDictionary* foxit::pdf::actions::Action::GetDict | ( | ) | const |
获取当前对象的PDF字典。
| PDFDoc foxit::pdf::actions::Action::GetDocument | ( | ) |
获取当前动作所属的PDF文档。
| Action foxit::pdf::actions::Action::GetSubAction | ( | int | index | ) |
按索引获取子动作。
| [in] | index | 要检索的子动作的索引。有效范围:从0到(count-1)。 count由函数Action::GetSubActionCount返回。 |
| int foxit::pdf::actions::Action::GetSubActionCount | ( | ) |
获取子动作的数量。
| Type foxit::pdf::actions::Action::GetType | ( | ) |
获取动作类型。
| void foxit::pdf::actions::Action::InsertSubAction | ( | int | index, |
| const Action & | sub_action | ||
| ) |
在指定索引位置插入新的子动作。
| [in] | index | 要插入新子动作的位置索引。 如果此索引值小于零,新子动作将被插入为第一个。 如果此索引值等于或大于当前子动作数量,新子动作将 被插入为最后一个。 |
| [in] | sub_action | 要插入的新子动作。当前仅支持以下类型 作为新子动作: actions::Action::e_TypeGoto,Action::e_TypeURI, actions::Action::e_TypeJavaScript,Action::e_TypeNamed, actions::Action::e_TypeGoToR,Action::e_TypeGoToE, actions::Action::e_TypeSubmitForm,Action::e_TypeResetForm, actions::Action::e_TypeHide,Action::e_TypeLaunch, actions::Action::e_TypeImportData,Action::e_TypeRendition。 |
| bool foxit::pdf::actions::Action::IsEmpty | ( | ) | const |
检查当前对象是否为空。
当当前对象为空时,意味着当前对象无用。
| bool foxit::pdf::actions::Action::operator != | ( | const Action & | other | ) | const |
不等于操作符。
| [in] | other | 另一个动作对象。此函数将检查当前对象是否不等于此对象。 |
赋值操作符。
| [in] | other | 另一个动作对象,其值将被赋给当前对象。 |
| bool foxit::pdf::actions::Action::operator== | ( | const Action & | other | ) | const |
等于操作符。
| [in] | other | 另一个动作对象。此函数将检查当前对象是否等于此对象。 |
| void foxit::pdf::actions::Action::RemoveAllSubActions | ( | ) |
移除所有子动作。
| void foxit::pdf::actions::Action::RemoveSubAction | ( | int | index | ) |
| void foxit::pdf::actions::Action::SetSubAction | ( | int | index, |
| const Action & | sub_action | ||
| ) |
按索引设置子动作。
| [in] | index | 要检索的子动作的索引。有效范围:从0到(count-1)。 count由函数Action::GetSubActionCount返回。 |
| [in] | sub_action | 要设置为子动作的动作对象。目前仅支持以下类型 作为子动作: actions::Action::e_TypeGoto、Action::e_TypeURI、 actions::Action::e_TypeJavaScript、Action::e_TypeNamed、 actions::Action::e_TypeGoToR、Action::e_TypeGoToE、 actions::Action::e_TypeSubmitForm、Action::e_TypeResetForm、 actions::Action::e_TypeHide、Action::e_TypeLaunch、 actions::Action::e_TypeImportData、Action::e_TypeRendition、 actions::Action::e_TypeSetOCGState。 |