|
Foxit PDF SDK
|
Public 类型 | |
| enum | StructureType { e_StructureTypeText = 0, e_StructureTypeFigure = 1, e_StructureTypeFormfield = 2, e_StructureTypeFigureOrCaption = 3, e_StructureTypeCaption = 4, e_StructureTypeH1 = 5, e_StructureTypeH2 = 6, e_StructureTypeH3 = 7, e_StructureTypeH4 = 8, e_StructureTypeH5 = 9, e_StructureTypeH6 = 10, e_StructureTypeTable = 11, e_StructureTypeCell = 12, e_StructureTypeFormula = 13, e_StructureTypeReference = 14, e_StructureTypeNote = 15, e_StructureTypeBackgroundOrArtifact = 16 } |
| 阅读顺序结构类型的枚举。 更多... | |
| enum | TableSelectResult { e_TableSelectResultNone = 0, e_TableSelectResultNotStarted = 1, e_TableSelectResultNotSamePage = 2, e_TableSelectResultNoTableExist = 3, e_TableSelectResultNotInTable = 4 } |
| 表格选择结果的枚举。 更多... | |
Public 成员函数 | |
| ReadingOrder (const foxit::pdf::PDFDoc &pdf_doc) | |
| 构造函数。 更多... | |
| ReadingOrder (const ReadingOrder &other) | |
| 构造函数,使用另一个阅读顺序对象。 更多... | |
| ~ReadingOrder () | |
| 析构函数。 | |
| RectFArray | AddOrderDataForRect (int page_index, foxit::RectF rect) |
| 根据选中的矩形区域添加顺序数据。 更多... | |
| bool | ApplyReadingOrder (int page_index, const RectFArray &selected_rect) |
| 根据选中的矩形区域,为指定页面应用阅读顺序。 更多... | |
| bool | CanMoveDataOrder (int page_index, const TreeItemInfoArray &select_info_array, const TreeItemInfo &dest_move_item) |
| 检查数据顺序是否可以移动。 更多... | |
| ReadingOrder::TableSelectResult | CanSelectTableCellAtPoint (foxit::pdf::PDFPage page, foxit::PointF point) |
| 检查鼠标在给定点按下时是否可以选择表格单元格。 更多... | |
| void | ClearPageStructInfo (foxit::pdf::PDFPage page) |
| 清除页面结构信息。 更多... | |
| int | DeleteOrderDataStructInfo (foxit::pdf::PDFPage page, Int32Array src_order_index_array, bool is_loaded) |
| 删除顺序数据结构信息。 更多... | |
| bool | DrawReadingOrderItems (int page_index) |
| 开始绘制指定页面的阅读顺序项。 更多... | |
| bool | EndEditTable () |
| 结束编辑表格。 更多... | |
| bool | GenerateTableHeaderIDs () |
| 自动生成表格表头 ID。 更多... | |
| StringArray | GetAllLeafChildrenByContentItemID (const ContentTreeItemArray &content_tree, const String &content_item_id) |
| 根据内容项 ID 获取所有叶子子项。 更多... | |
| ContentTreeItemArray | GetContentTree () |
| 获取内容树。 更多... | |
| WStringArray | GetCurrentTableHeaderIDs () |
| 获取当前表格的所有表头 ID。 更多... | |
| TreeItemArray | GetReadingOrderTreeItems () |
| 获取阅读顺序树项。 更多... | |
| TableCellAttributeArray | GetSelectedTableCellAttributes () |
| 获取选中的表格单元格属性。 更多... | |
| WString | GetTableSummary (foxit::pdf::PDFPage page) |
| 获取表格摘要。 更多... | |
| bool | HasHeaderID (WString header_id) |
| 检查当前表格表头 ID 是否已存在。 更多... | |
| bool | HasMissingHeaderIDs () |
| 检查当前表格是否缺少表头 ID。 更多... | |
| bool | IsEditingTable () |
| 检查是否已开始表格编辑。 更多... | |
| bool | IsEmpty () const |
| 检查当前对象是否为空。 更多... | |
| int | MoveOrderData (int page_index, Int32Array src_order_index_array, int dest_order_index) |
| 移动数据顺序。 更多... | |
| bool | operator!= (const ReadingOrder &other) const |
| 不等于操作符。 更多... | |
| ReadingOrder & | operator= (const ReadingOrder &other) |
| 赋值操作符。 更多... | |
| bool | operator== (const ReadingOrder &other) const |
| 等于操作符。 更多... | |
| RectFArray | RemoveOrderDataForRect (int page_index, foxit::RectF rect) |
| 根据选中的矩形区域移除顺序数据。 更多... | |
| bool | SelectTableAtPoint (int page_index, const PointF &point) |
| 选中页面上指定点处的表格(如果存在)。 更多... | |
| ReadingOrder::TableSelectResult | SelectTableCellAtPoint (foxit::pdf::PDFPage page, foxit::PointF point, foxit::RectFArray ®ion_selected, bool appended) |
| 鼠标抬起时通过点选择表格单元格。 更多... | |
| ReadingOrder::TableSelectResult | SelectTableCellAtRect (foxit::pdf::PDFPage page, foxit::RectF rect, foxit::RectFArray ®ion_selected, bool appended) |
| 鼠标抬起时通过矩形区域选择表格单元格。 更多... | |
| bool | SetOrderTypeForSelectedContent (StructureType structure_type) |
| 根据选中的矩形区域设置顺序类型。 更多... | |
| bool | SetOrderTypeForSelectedTreeItems (StructureType structure_type, const TreeItemInfoArray &select_info_array) |
| 根据选中的树项设置顺序类型。 更多... | |
| void | SetReadingOrderOptions (const ReadingOrderOptions &options) |
| 设置阅读顺序选项。 更多... | |
| bool | SetSelectedTableCellAttributes (TableCellAttribute cell_attribute, bool change_id_enabled, bool need_change_ids) |
| 设置选中的表格单元格属性。 更多... | |
| bool | SetTableSummary (foxit::pdf::PDFPage page, const wchar_t *table_summary) |
| 设置表格摘要。 更多... | |
| bool | StartEditTable (foxit::pdf::PDFPage page) |
| 开始编辑表格。 更多... | |
| bool | StartEditTableAtPoint (foxit::pdf::PDFPage page, foxit::PointF point) |
| 开始编辑页面上指定点处的表格(如果存在)。 更多... | |
| void | SynchronizeTable () |
| 同步表格。 更多... | |
Public 成员函数 继承自 foxit::Base | |
| FS_HANDLE | Handle () const |
| 获取当前对象的句柄。 更多... | |
此类表示用于 PDF 文档辅助功能阅读顺序操作的阅读顺序。 使用此模块中的任何类或方法之前,请确保已通过带有 "Accessibility" 模块授权的 key 调用 common::Library::Initialize 函数成功初始化 Foxit PDF SDK。
阅读顺序结构类型的枚举。
此枚举的值应单独使用。
| foxit::addon::accessibility::ReadingOrder::ReadingOrder | ( | const foxit::pdf::PDFDoc & | pdf_doc | ) |
构造函数。
| [in] | pdf_doc | 有效的 PDF 文档对象。 |
| foxit::addon::accessibility::ReadingOrder::ReadingOrder | ( | const ReadingOrder & | other | ) |
构造函数,使用另一个阅读顺序对象。
| [in] | other | 另一个阅读顺序对象。 |
| RectFArray foxit::addon::accessibility::ReadingOrder::AddOrderDataForRect | ( | int | page_index, |
| foxit::RectF | rect | ||
| ) |
根据选中的矩形区域添加顺序数据。
| [in] | page_index | 页面索引。有效取值范围为 0 到 (count - 1),其中 count 为函数 pdf::PDFDoc::GetPageCount 返回的页面总数。 |
| [in] | rect | 选中的矩形区域。 |
| bool foxit::addon::accessibility::ReadingOrder::ApplyReadingOrder | ( | int | page_index, |
| const RectFArray & | selected_rect | ||
| ) |
根据选中的矩形区域,为指定页面应用阅读顺序。
| [in] | page_index | 页面索引。有效取值范围为 0 到 (count - 1),其中 count 为函数 pdf::PDFDoc::GetPageCount 返回的页面总数。 |
| [in] | selected_rect | 用于应用阅读顺序的选中矩形区域数组。 |
| bool foxit::addon::accessibility::ReadingOrder::CanMoveDataOrder | ( | int | page_index, |
| const TreeItemInfoArray & | select_info_array, | ||
| const TreeItemInfo & | dest_move_item | ||
| ) |
检查数据顺序是否可以移动。
| [in] | page_index | 页面索引。有效取值范围为 0 到 (count - 1),其中 count 为函数 pdf::PDFDoc::GetPageCount 返回的页面总数。 |
| [in] | select_info_array | 选中信息数组。 |
| [in] | dest_move_item | 目标移动项。 |
| ReadingOrder::TableSelectResult foxit::addon::accessibility::ReadingOrder::CanSelectTableCellAtPoint | ( | foxit::pdf::PDFPage | page, |
| foxit::PointF | point | ||
| ) |
检查鼠标在给定点按下时是否可以选择表格单元格。
| [in] | page | PDF 页面对象。 |
| [in] | point | 点,采用 PDF 坐标系(PDFPage)。 |
| void foxit::addon::accessibility::ReadingOrder::ClearPageStructInfo | ( | foxit::pdf::PDFPage | page | ) |
清除页面结构信息。
| [in] | page | PDF 页面对象。 |
| int foxit::addon::accessibility::ReadingOrder::DeleteOrderDataStructInfo | ( | foxit::pdf::PDFPage | page, |
| Int32Array | src_order_index_array, | ||
| bool | is_loaded | ||
| ) |
删除顺序数据结构信息。
| [in] | page | PDF 页面对象。 |
| [in] | src_order_index_array | 源顺序索引数组。 |
| [in] | is_loaded | 页面是否已加载。 |
| bool foxit::addon::accessibility::ReadingOrder::DrawReadingOrderItems | ( | int | page_index | ) |
开始绘制指定页面的阅读顺序项。
| [in] | page_index | 页面索引。有效取值范围为 0 到 (count - 1),其中 count 为函数 pdf::PDFDoc::GetPageCount 返回的页面总数。 |
| bool foxit::addon::accessibility::ReadingOrder::EndEditTable | ( | ) |
结束编辑表格。
| bool foxit::addon::accessibility::ReadingOrder::GenerateTableHeaderIDs | ( | ) |
自动生成表格表头 ID。
| StringArray foxit::addon::accessibility::ReadingOrder::GetAllLeafChildrenByContentItemID | ( | const ContentTreeItemArray & | content_tree, |
| const String & | content_item_id | ||
| ) |
根据内容项 ID 获取所有叶子子项。
| [in] | content_tree | 内容树。 |
| [in] | content_item_id | 内容项 ID。 |
| ContentTreeItemArray foxit::addon::accessibility::ReadingOrder::GetContentTree | ( | ) |
获取内容树。
| WStringArray foxit::addon::accessibility::ReadingOrder::GetCurrentTableHeaderIDs | ( | ) |
获取当前表格的所有表头 ID。
| TreeItemArray foxit::addon::accessibility::ReadingOrder::GetReadingOrderTreeItems | ( | ) |
获取阅读顺序树项。
| TableCellAttributeArray foxit::addon::accessibility::ReadingOrder::GetSelectedTableCellAttributes | ( | ) |
获取选中的表格单元格属性。
| WString foxit::addon::accessibility::ReadingOrder::GetTableSummary | ( | foxit::pdf::PDFPage | page | ) |
获取表格摘要。
| [in] | page | PDF 页面对象。 |
| bool foxit::addon::accessibility::ReadingOrder::HasHeaderID | ( | WString | header_id | ) |
检查当前表格表头 ID 是否已存在。
| [in] | header_id | 要检查的表头 ID。 |
| bool foxit::addon::accessibility::ReadingOrder::HasMissingHeaderIDs | ( | ) |
检查当前表格是否缺少表头 ID。
| bool foxit::addon::accessibility::ReadingOrder::IsEditingTable | ( | ) |
检查是否已开始表格编辑。
| bool foxit::addon::accessibility::ReadingOrder::IsEmpty | ( | ) | const |
检查当前对象是否为空。
| int foxit::addon::accessibility::ReadingOrder::MoveOrderData | ( | int | page_index, |
| Int32Array | src_order_index_array, | ||
| int | dest_order_index | ||
| ) |
移动数据顺序。
| [in] | page_index | 页面索引。有效取值范围为 0 到 (count - 1),其中 count 为函数 pdf::PDFDoc::GetPageCount 返回的页面总数。 |
| [in] | src_order_index_array | 源顺序索引数组。 |
| [in] | dest_order_index | 目标顺序索引。 |
| bool foxit::addon::accessibility::ReadingOrder::operator!= | ( | const ReadingOrder & | other | ) | const |
不等于操作符。
| [in] | other | 另一个阅读顺序对象。 此函数检查当前对象是否与该对象不相等。 |
| ReadingOrder& foxit::addon::accessibility::ReadingOrder::operator= | ( | const ReadingOrder & | other | ) |
赋值操作符。
| [in] | other | 另一个阅读顺序对象,其值将被赋给当前对象。 |
| bool foxit::addon::accessibility::ReadingOrder::operator== | ( | const ReadingOrder & | other | ) | const |
等于操作符。
| [in] | other | 另一个阅读顺序对象。 此函数检查当前对象是否与该对象相等。 |
| RectFArray foxit::addon::accessibility::ReadingOrder::RemoveOrderDataForRect | ( | int | page_index, |
| foxit::RectF | rect | ||
| ) |
根据选中的矩形区域移除顺序数据。
| [in] | page_index | 页面索引。有效取值范围为 0 到 (count - 1),其中 count 为函数 pdf::PDFDoc::GetPageCount 返回的页面总数。 |
| [in] | rect | 选中的矩形区域。 |
| bool foxit::addon::accessibility::ReadingOrder::SelectTableAtPoint | ( | int | page_index, |
| const PointF & | point | ||
| ) |
选中页面上指定点处的表格(如果存在)。
| [in] | page_index | 页面索引。有效取值范围为 0 到 (count - 1),其中 count 为函数 pdf::PDFDoc::GetPageCount 返回的页面总数。 |
| [in] | point | 用于定位表格的点,使用 PDF 页面坐标系。 |
| ReadingOrder::TableSelectResult foxit::addon::accessibility::ReadingOrder::SelectTableCellAtPoint | ( | foxit::pdf::PDFPage | page, |
| foxit::PointF | point, | ||
| foxit::RectFArray & | region_selected, | ||
| bool | appended | ||
| ) |
鼠标抬起时通过点选择表格单元格。
| [in] | page | PDF 页面对象。 |
| [in] | point | 点。 |
| [out] | region_selected | 选中区域数组。 |
| [in] | appended | 是否追加选择。 |
| ReadingOrder::TableSelectResult foxit::addon::accessibility::ReadingOrder::SelectTableCellAtRect | ( | foxit::pdf::PDFPage | page, |
| foxit::RectF | rect, | ||
| foxit::RectFArray & | region_selected, | ||
| bool | appended | ||
| ) |
鼠标抬起时通过矩形区域选择表格单元格。
| [in] | page | PDF 页面对象。 |
| [in] | rect | 矩形区域。 |
| [out] | region_selected | 选中区域数组。 |
| [in] | appended | 是否追加选择。 |
| bool foxit::addon::accessibility::ReadingOrder::SetOrderTypeForSelectedContent | ( | StructureType | structure_type | ) |
根据选中的矩形区域设置顺序类型。
| [in] | structure_type | 结构类型。请参见从 e_StructureTypeText 开始的值, 该值应为其中之一。 |
| bool foxit::addon::accessibility::ReadingOrder::SetOrderTypeForSelectedTreeItems | ( | StructureType | structure_type, |
| const TreeItemInfoArray & | select_info_array | ||
| ) |
根据选中的树项设置顺序类型。
| [in] | structure_type | 结构类型。请参见 StructureType。 |
| [in] | select_info_array | 选中信息数组。 |
| void foxit::addon::accessibility::ReadingOrder::SetReadingOrderOptions | ( | const ReadingOrderOptions & | options | ) |
| bool foxit::addon::accessibility::ReadingOrder::SetSelectedTableCellAttributes | ( | TableCellAttribute | cell_attribute, |
| bool | change_id_enabled, | ||
| bool | need_change_ids | ||
| ) |
设置选中的表格单元格属性。
| [in] | cell_attribute | 要设置的单元格属性。 |
| [in] | change_id_enabled | 是否允许更改 ID。 |
| [in] | need_change_ids | 是否更改 ID。 |
| bool foxit::addon::accessibility::ReadingOrder::SetTableSummary | ( | foxit::pdf::PDFPage | page, |
| const wchar_t * | table_summary | ||
| ) |
设置表格摘要。
| [in] | page | PDF 页面对象。 |
| [in] | table_summary | 表格摘要文本。 |
| bool foxit::addon::accessibility::ReadingOrder::StartEditTable | ( | foxit::pdf::PDFPage | page | ) |
开始编辑表格。
| [in] | page | PDF 页面对象。 |
| bool foxit::addon::accessibility::ReadingOrder::StartEditTableAtPoint | ( | foxit::pdf::PDFPage | page, |
| foxit::PointF | point | ||
| ) |
开始编辑页面上指定点处的表格(如果存在)。
| [in] | page | PDF 页面对象。 |
| [in] | point | 用于定位待编辑表格的点,采用 PDF 坐标系(PDFPage)。 |
| void foxit::addon::accessibility::ReadingOrder::SynchronizeTable | ( | ) |
同步表格。