|
Foxit PDF SDK
|
Public Types | |
| 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 } |
| Enumeration for structure type of reading order. More... | |
| enum | TableSelectResult { e_TableSelectResultNone = 0, e_TableSelectResultNotStarted = 1, e_TableSelectResultNotSamePage = 2, e_TableSelectResultNoTableExist = 3, e_TableSelectResultNotInTable = 4 } |
| Enumeration for table select result. More... | |
Public Member Functions | |
| ReadingOrder (const foxit::pdf::PDFDoc &pdf_doc) | |
| Constructor. More... | |
| ReadingOrder (const ReadingOrder &other) | |
| Constructor, with another reading order object. More... | |
| ~ReadingOrder () | |
| Destructor. | |
| RectFArray | AddOrderDataForRect (int page_index, foxit::RectF rect) |
| Add order data for selected rect. More... | |
| bool | ApplyReadingOrder (int page_index, const RectFArray &selected_rect) |
| Apply reading order to the specified page based on the given selected rectangle area(s). More... | |
| bool | CanMoveDataOrder (int page_index, const TreeItemInfoArray &select_info_array, const TreeItemInfo &dest_move_item) |
| Check whether data order can be moved. More... | |
| ReadingOrder::TableSelectResult | CanSelectTableCellAtPoint (foxit::pdf::PDFPage page, foxit::PointF point) |
| Check whether a table cell can be selected on mouse down at the given point. More... | |
| void | ClearPageStructInfo (foxit::pdf::PDFPage page) |
| Clear page structure info. More... | |
| int | DeleteOrderDataStructInfo (foxit::pdf::PDFPage page, Int32Array src_order_index_array, bool is_loaded) |
| Delete order data structure info. More... | |
| bool | DrawReadingOrderItems (int page_index) |
| Draw reading order items for a specified page. More... | |
| bool | EndEditTable () |
| End edit table. More... | |
| bool | GenerateTableHeaderIDs () |
| Generate table header IDs. More... | |
| StringArray | GetAllLeafChildrenByContentItemID (const ContentTreeItemArray &content_tree, const String &content_item_id) |
| Get all leaf children by content item ID. More... | |
| ContentTreeItemArray | GetContentTree () |
| Get content tree. More... | |
| WStringArray | GetCurrentTableHeaderIDs () |
| Get the array header ID of current table. More... | |
| TreeItemArray | GetReadingOrderTreeItems () |
| Get reading order tree items. More... | |
| TableCellAttributeArray | GetSelectedTableCellAttributes () |
| Get selected table cell attributes. More... | |
| WString | GetTableSummary (foxit::pdf::PDFPage page) |
| Get table summary. More... | |
| bool | HasHeaderID (WString header_id) |
| Check whether current table header ID is existing. More... | |
| bool | HasMissingHeaderIDs () |
| Check whether current table is missing header IDs. More... | |
| bool | IsEditingTable () |
| Check whether table editing has started. More... | |
| bool | IsEmpty () const |
| Check whether current object is empty or not. More... | |
| int | MoveOrderData (int page_index, Int32Array src_order_index_array, int dest_order_index) |
| Move data order. More... | |
| bool | operator!= (const ReadingOrder &other) const |
| Not equal operator. More... | |
| ReadingOrder & | operator= (const ReadingOrder &other) |
| Assign operator. More... | |
| bool | operator== (const ReadingOrder &other) const |
| Equal operator. More... | |
| RectFArray | RemoveOrderDataForRect (int page_index, foxit::RectF rect) |
| Remove order data for selected rect. More... | |
| bool | SelectTableAtPoint (int page_index, const PointF &point) |
| Select the table at the specified point on a page, if any. More... | |
| ReadingOrder::TableSelectResult | SelectTableCellAtPoint (foxit::pdf::PDFPage page, foxit::PointF point, foxit::RectFArray ®ion_selected, bool appended) |
| Select table cell by point on mouse up. More... | |
| ReadingOrder::TableSelectResult | SelectTableCellAtRect (foxit::pdf::PDFPage page, foxit::RectF rect, foxit::RectFArray ®ion_selected, bool appended) |
| Select table cell by rect on mouse up. More... | |
| bool | SetOrderTypeForSelectedContent (StructureType structure_type) |
| Set order type for selected content. More... | |
| bool | SetOrderTypeForSelectedTreeItems (StructureType structure_type, const TreeItemInfoArray &select_info_array) |
| Set order type for selected tree items. More... | |
| void | SetReadingOrderOptions (const ReadingOrderOptions &options) |
| Set reading order options. More... | |
| bool | SetSelectedTableCellAttributes (TableCellAttribute cell_attribute, bool change_id_enabled, bool need_change_ids) |
| Set selected table cell attributes. More... | |
| bool | SetTableSummary (foxit::pdf::PDFPage page, const wchar_t *table_summary) |
| Set table summary. More... | |
| bool | StartEditTable (foxit::pdf::PDFPage page) |
| Start edit table. More... | |
| bool | StartEditTableAtPoint (foxit::pdf::PDFPage page, foxit::PointF point) |
| Start editing the table located at the specified point on a page, if any. More... | |
| void | SynchronizeTable () |
| Synchronize table. More... | |
Public Member Functions inherited from foxit::Base | |
| FS_HANDLE | Handle () const |
| Get the handle of current object. More... | |
This class represents a reading order for PDF document accessibility reading order operations. Before using any class or methods in this module, please ensure Foxit PDF SDK has been initialized successfully by function common::Library::Initialize with a key including "Accessibility" module.
Enumeration for structure type of reading order.
Values of this enumeration should be used alone.
Enumeration for table select result.
Values of this enumeration should be used alone.
| foxit::addon::accessibility::ReadingOrder::ReadingOrder | ( | const foxit::pdf::PDFDoc & | pdf_doc | ) |
Constructor.
| [in] | pdf_doc | A valid PDF document object. |
| foxit::addon::accessibility::ReadingOrder::ReadingOrder | ( | const ReadingOrder & | other | ) |
Constructor, with another reading order object.
| [in] | other | Another reading order object. |
| RectFArray foxit::addon::accessibility::ReadingOrder::AddOrderDataForRect | ( | int | page_index, |
| foxit::RectF | rect | ||
| ) |
Add order data for selected rect.
| [in] | page_index | The page index. Valid range: from 0 to (count-1). count is returned by function pdf::PDFDoc::GetPageCount. |
| [in] | rect | The selected rect. |
| bool foxit::addon::accessibility::ReadingOrder::ApplyReadingOrder | ( | int | page_index, |
| const RectFArray & | selected_rect | ||
| ) |
Apply reading order to the specified page based on the given selected rectangle area(s).
| [in] | page_index | The page index. Valid range: from 0 to (count-1). count is returned by function pdf::PDFDoc::GetPageCount. |
| [in] | selected_rect | The array of selected rects which define the area(s) to be used for applying reading order. |
| bool foxit::addon::accessibility::ReadingOrder::CanMoveDataOrder | ( | int | page_index, |
| const TreeItemInfoArray & | select_info_array, | ||
| const TreeItemInfo & | dest_move_item | ||
| ) |
Check whether data order can be moved.
| [in] | page_index | The page index. Valid range: from 0 to (count-1). count is returned by function pdf::PDFDoc::GetPageCount. |
| [in] | select_info_array | The selected info array. |
| [in] | dest_move_item | The destination move item. |
| ReadingOrder::TableSelectResult foxit::addon::accessibility::ReadingOrder::CanSelectTableCellAtPoint | ( | foxit::pdf::PDFPage | page, |
| foxit::PointF | point | ||
| ) |
Check whether a table cell can be selected on mouse down at the given point.
| [in] | page | A PDF page object. |
| [in] | point | The point, in the PDF coordinate system (PDFPage). |
| void foxit::addon::accessibility::ReadingOrder::ClearPageStructInfo | ( | foxit::pdf::PDFPage | page | ) |
Clear page structure info.
| [in] | page | The PDF page object. |
| int foxit::addon::accessibility::ReadingOrder::DeleteOrderDataStructInfo | ( | foxit::pdf::PDFPage | page, |
| Int32Array | src_order_index_array, | ||
| bool | is_loaded | ||
| ) |
Delete order data structure info.
| [in] | page | The PDF page object. |
| [in] | src_order_index_array | The source order index array. |
| [in] | is_loaded | Whether the page is loaded. |
| bool foxit::addon::accessibility::ReadingOrder::DrawReadingOrderItems | ( | int | page_index | ) |
Draw reading order items for a specified page.
| [in] | page_index | The page index. Valid range: from 0 to (count-1). count is returned by function pdf::PDFDoc::GetPageCount. |
| bool foxit::addon::accessibility::ReadingOrder::EndEditTable | ( | ) |
End edit table.
| bool foxit::addon::accessibility::ReadingOrder::GenerateTableHeaderIDs | ( | ) |
Generate table header IDs.
| StringArray foxit::addon::accessibility::ReadingOrder::GetAllLeafChildrenByContentItemID | ( | const ContentTreeItemArray & | content_tree, |
| const String & | content_item_id | ||
| ) |
Get all leaf children by content item ID.
| [in] | content_tree | The content tree. |
| [in] | content_item_id | The content item ID. |
| ContentTreeItemArray foxit::addon::accessibility::ReadingOrder::GetContentTree | ( | ) |
Get content tree.
| WStringArray foxit::addon::accessibility::ReadingOrder::GetCurrentTableHeaderIDs | ( | ) |
Get the array header ID of current table.
| TreeItemArray foxit::addon::accessibility::ReadingOrder::GetReadingOrderTreeItems | ( | ) |
Get reading order tree items.
| TableCellAttributeArray foxit::addon::accessibility::ReadingOrder::GetSelectedTableCellAttributes | ( | ) |
Get selected table cell attributes.
| WString foxit::addon::accessibility::ReadingOrder::GetTableSummary | ( | foxit::pdf::PDFPage | page | ) |
Get table summary.
| [in] | page | The PDF page object. |
| bool foxit::addon::accessibility::ReadingOrder::HasHeaderID | ( | WString | header_id | ) |
Check whether current table header ID is existing.
| [in] | header_id | The header ID to check. |
| bool foxit::addon::accessibility::ReadingOrder::HasMissingHeaderIDs | ( | ) |
Check whether current table is missing header IDs.
| bool foxit::addon::accessibility::ReadingOrder::IsEditingTable | ( | ) |
Check whether table editing has started.
| bool foxit::addon::accessibility::ReadingOrder::IsEmpty | ( | ) | const |
Check whether current object is empty or not.
| int foxit::addon::accessibility::ReadingOrder::MoveOrderData | ( | int | page_index, |
| Int32Array | src_order_index_array, | ||
| int | dest_order_index | ||
| ) |
Move data order.
| [in] | page_index | The page index. Valid range: from 0 to (count-1). count is returned by function pdf::PDFDoc::GetPageCount. |
| [in] | src_order_index_array | The source order index array. |
| [in] | dest_order_index | The destination order index. |
| bool foxit::addon::accessibility::ReadingOrder::operator!= | ( | const ReadingOrder & | other | ) | const |
Not equal operator.
| [in] | other | Another reading order object. This function will check if current object is not equal to this one. |
| ReadingOrder& foxit::addon::accessibility::ReadingOrder::operator= | ( | const ReadingOrder & | other | ) |
Assign operator.
| [in] | other | Another reading order object, whose value would be assigned to current object. |
| bool foxit::addon::accessibility::ReadingOrder::operator== | ( | const ReadingOrder & | other | ) | const |
Equal operator.
| [in] | other | Another reading order object. This function will check if current object is equal to this one. |
| RectFArray foxit::addon::accessibility::ReadingOrder::RemoveOrderDataForRect | ( | int | page_index, |
| foxit::RectF | rect | ||
| ) |
Remove order data for selected rect.
| [in] | page_index | The page index. Valid range: from 0 to (count-1). count is returned by function pdf::PDFDoc::GetPageCount. |
| [in] | rect | The selected rect. |
| bool foxit::addon::accessibility::ReadingOrder::SelectTableAtPoint | ( | int | page_index, |
| const PointF & | point | ||
| ) |
Select the table at the specified point on a page, if any.
| [in] | page_index | The page index. Valid range: from 0 to (count-1). count is returned by function pdf::PDFDoc::GetPageCount. |
| [in] | point | The point used to locate the table, in PDF page coordinate system. |
| ReadingOrder::TableSelectResult foxit::addon::accessibility::ReadingOrder::SelectTableCellAtPoint | ( | foxit::pdf::PDFPage | page, |
| foxit::PointF | point, | ||
| foxit::RectFArray & | region_selected, | ||
| bool | appended | ||
| ) |
Select table cell by point on mouse up.
| [in] | page | A PDF page object. |
| [in] | point | The point. |
| [out] | region_selected | The selected region array. |
| [in] | appended | Whether to append the selection. |
| ReadingOrder::TableSelectResult foxit::addon::accessibility::ReadingOrder::SelectTableCellAtRect | ( | foxit::pdf::PDFPage | page, |
| foxit::RectF | rect, | ||
| foxit::RectFArray & | region_selected, | ||
| bool | appended | ||
| ) |
Select table cell by rect on mouse up.
| [in] | page | A PDF page object. |
| [in] | rect | The rectangular area . |
| [out] | region_selected | The selected region array. |
| [in] | appended | Whether to append the selection. |
| bool foxit::addon::accessibility::ReadingOrder::SetOrderTypeForSelectedContent | ( | StructureType | structure_type | ) |
Set order type for selected content.
| [in] | structure_type | The structure type. Please refer to values starting from e_StructureTypeText and this should be one of these values. |
| bool foxit::addon::accessibility::ReadingOrder::SetOrderTypeForSelectedTreeItems | ( | StructureType | structure_type, |
| const TreeItemInfoArray & | select_info_array | ||
| ) |
Set order type for selected tree items.
| [in] | structure_type | The structure type. Please refer value StructureType. |
| [in] | select_info_array | The selected info array. |
| void foxit::addon::accessibility::ReadingOrder::SetReadingOrderOptions | ( | const ReadingOrderOptions & | options | ) |
Set reading order options.
| [in] | options | The reading order options. Please refer to ReadingOrderOptions. |
| bool foxit::addon::accessibility::ReadingOrder::SetSelectedTableCellAttributes | ( | TableCellAttribute | cell_attribute, |
| bool | change_id_enabled, | ||
| bool | need_change_ids | ||
| ) |
Set selected table cell attributes.
| [in] | cell_attribute | The cell attribute to set. |
| [in] | change_id_enabled | Whether to enable changing Id. |
| [in] | need_change_ids | Whether to change IDs. |
| bool foxit::addon::accessibility::ReadingOrder::SetTableSummary | ( | foxit::pdf::PDFPage | page, |
| const wchar_t * | table_summary | ||
| ) |
Set table summary.
| [in] | page | The PDF page object. |
| [in] | table_summary | The table summary text. |
| bool foxit::addon::accessibility::ReadingOrder::StartEditTable | ( | foxit::pdf::PDFPage | page | ) |
Start edit table.
| [in] | page | The PDF page object. |
| bool foxit::addon::accessibility::ReadingOrder::StartEditTableAtPoint | ( | foxit::pdf::PDFPage | page, |
| foxit::PointF | point | ||
| ) |
Start editing the table located at the specified point on a page, if any.
| [in] | page | The PDF page object. |
| [in] | point | The point used to locate the table to be edited, in the PDF coordinate system (PDFPage). |
| void foxit::addon::accessibility::ReadingOrder::SynchronizeTable | ( | ) |
Synchronize table.