15 #ifndef FS_READINGORDER_H_ 16 #define FS_READINGORDER_H_ 35 namespace accessibility {
42 typedef enum _ContentType {
82 typedef enum _TableCellType {
182 : page_index(page_index)
183 , order_index(order_index)
194 this->rect = other.
rect;
207 this->rect = other.
rect;
221 this->page_index = page_index;
222 this->order_index = order_index;
268 , order_index(order_index)
269 , page_index(page_index)
279 this->type = other.
type;
282 this->text = other.
text;
283 this->rect = other.
rect;
294 this->type = other.
type;
297 this->text = other.
text;
298 this->rect = other.
rect;
316 this->order_index = order_index;
317 this->page_index = page_index;
345 : item_info(item_info)
346 , children_items_info(children_items_info) {}
380 this->item_info = item_info;
381 this->children_items_info = children_items_info;
401 typedef enum _ReadingOrderShowType {
403 e_ReadingOrderShowTypeOrder = 0,
405 e_ReadingOrderShowTypeStruct = 1,
407 e_ReadingOrderShowTypeNone = 2
408 } ReadingOrderShowType;
413 : reading_order_show_type(e_ReadingOrderShowTypeStruct)
414 , is_show_table_figure(true)
415 , is_display_like_element(false)
416 , is_show_table_cells(true) {}
420 bool is_display_like_element,
bool is_show_table_cells)
421 : reading_order_show_type(reading_order_show_type)
422 , is_show_table_figure(is_show_table_figure)
423 , is_display_like_element(is_display_like_element)
424 , is_show_table_cells(is_show_table_cells) {}
464 bool is_display_like_element,
bool is_show_table_cells) {
465 this->reading_order_show_type = reading_order_show_type;
466 this->is_show_table_figure = is_show_table_figure;
467 this->is_display_like_element = is_display_like_element;
468 this->is_show_table_cells = is_show_table_cells;
585 const ContentTreeItemDataArray& children_items_data)
586 : item_data(item_data)
587 , children_items_data(children_items_data) {}
621 this->item_data = item_data;
622 this->children_items_data = children_items_data;
647 typedef enum _TableSelectResult {
649 e_TableSelectResultNone = 0,
651 e_TableSelectResultNotStarted = 1,
653 e_TableSelectResultNotSamePage = 2,
655 e_TableSelectResultNoTableExist = 3,
657 e_TableSelectResultNotInTable = 4
665 typedef enum _StructureType {
667 e_StructureTypeText = 0,
669 e_StructureTypeFigure = 1,
671 e_StructureTypeFormfield = 2,
673 e_StructureTypeFigureOrCaption = 3,
675 e_StructureTypeCaption = 4,
677 e_StructureTypeH1 = 5,
679 e_StructureTypeH2 = 6,
681 e_StructureTypeH3 = 7,
683 e_StructureTypeH4 = 8,
685 e_StructureTypeH5 = 9,
687 e_StructureTypeH6 = 10,
689 e_StructureTypeTable = 11,
691 e_StructureTypeCell = 12,
693 e_StructureTypeFormula = 13,
695 e_StructureTypeReference = 14,
697 e_StructureTypeNote = 15,
699 e_StructureTypeBackgroundOrArtifact = 16
754 bool IsEmpty()
const;
779 bool DrawReadingOrderItems(
int page_index);
789 bool SetOrderTypeForSelectedTreeItems(StructureType structure_type,
const TreeItemInfoArray& select_info_array);
799 bool SetOrderTypeForSelectedContent(StructureType structure_type);
830 bool CanMoveDataOrder(
int page_index,
const TreeItemInfoArray& select_info_array,
842 int MoveOrderData(
int page_index,
Int32Array src_order_index_array,
int dest_order_index);
872 bool ApplyReadingOrder(
int page_index,
const RectFArray& selected_rect);
882 bool SelectTableAtPoint(
int page_index,
const PointF& point);
915 bool IsEditingTable();
929 bool HasMissingHeaderIDs();
936 bool GenerateTableHeaderIDs();
945 bool HasHeaderID(
WString header_id);
963 bool SetSelectedTableCellAttributes(
TableCellAttribute cell_attribute,
bool change_id_enabled,
964 bool need_change_ids);
1026 void SynchronizeTable();
1033 ContentTreeItemArray GetContentTree();
1043 StringArray GetAllLeafChildrenByContentItemID(
const ContentTreeItemArray& content_tree,
1044 const String& content_item_id);
1050 #endif // FS_READINGORDER_H_ SelectItemInfo(const SelectItemInfo &other)
构造函数,使用另一个阅读顺序选中项信息对象。
Definition: fs_readingorder.h:191
int order_index
选中项的顺序索引。
Definition: fs_readingorder.h:229
Definition: fs_readingorder.h:391
WStringArray associated_array
关联表格单元格的 ID 数组。
Definition: fs_readingorder.h:159
TableCellType
表格单元格类型的枚举。
Definition: fs_readingorder.h:82
图像对象项类型。
Definition: fs_readingorder.h:60
void Set(ReadingOrderShowType reading_order_show_type, bool is_show_table_figure, bool is_display_like_element, bool is_show_table_cells)
设置值。
Definition: fs_readingorder.h:463
CFX_Object Object
对象类型。
Definition: fs_basictypes.h:220
Definition: fs_readingorder.h:163
ContentTreeItem & operator=(const ContentTreeItem &other)
赋值操作符。
Definition: fs_readingorder.h:606
TreeItem(const TreeItem &other)
构造函数,使用另一个阅读顺序树项对象。
Definition: fs_readingorder.h:353
TreeItemInfo()
构造函数。
Definition: fs_readingorder.h:250
Definition: fs_basictypes.h:227
void Set(int row_span, int column_span, TableCellType type, String scope, WString cell_id, WStringArray associated_array)
设置值。
Definition: fs_readingorder.h:138
注释项类型。
Definition: fs_readingorder.h:64
注释组项类型。
Definition: fs_readingorder.h:62
TreeItem(TreeItemInfo item_info, TreeItemInfoArray children_items_info)
构造函数。
Definition: fs_readingorder.h:344
路径对象项类型。
Definition: fs_readingorder.h:56
Definition: fx_coordinates.h:30
TreeItem()
构造函数。
Definition: fs_readingorder.h:341
ContentType
内容类型的枚举。
Definition: fs_readingorder.h:42
void Set(int page_index, int order_index, const foxit::RectF &rect)
设置值。
Definition: fs_readingorder.h:220
TreeItemInfo item_info
项的信息。
Definition: fs_readingorder.h:385
宽字符串类
Definition: fx_string.h:1457
ContentTreeItemData(WString name, String id, RectFArray rect_array, int page_index, ContentType type)
构造函数,带参数。
Definition: fs_readingorder.h:500
Definition: fs_readingorder.h:235
ContentTreeItem(const ContentTreeItem &other)
构造函数,使用另一个内容树项对象。
Definition: fs_readingorder.h:594
Definition: fs_pdfdoc.h:768
int row_span
表格单元格跨行数。
Definition: fs_readingorder.h:149
foxit::RectF rect
页面内容项的矩形区域。
Definition: fs_readingorder.h:331
ContentType type
内容类型。请参见 ContentType。
Definition: fs_readingorder.h:565
ContentType type
项内容类型。请参见从 foxit::addon::accessibility::e_ContentTypeUnknown 开始的值。
Definition: fs_readingorder.h:323
int page_index
选中项的页面索引。有效取值范围为 0 到 (count - 1),其中 count 为函数 pdf::PDFDoc::GetPageCount 返回的页面总数。
Definition: fs_readingorder.h:227
TreeItemInfo(const TreeItemInfo &other)
构造函数,使用另一个阅读顺序树项信息对象。
Definition: fs_readingorder.h:278
Definition: fs_readingorder.h:640
ContentTreeItemData item_data
项的信息。
Definition: fs_readingorder.h:626
SelectItemInfo()
构造函数。
Definition: fs_readingorder.h:169
Definition: fs_readingorder.h:484
TreeItem & operator=(const TreeItem &other)
赋值操作符。
Definition: fs_readingorder.h:365
TreeItemInfo(ContentType type, int order_index, int page_index, const wchar_t *text, foxit::RectF rect)
构造函数。
Definition: fs_readingorder.h:265
bool operator==(const char *str1, const CFX_ByteString &str2)
检查两个字节字符串是否相等。
Definition: fs_basictypes.h:128
ContentTreeItem()
构造函数。
Definition: fs_readingorder.h:576
ContentTreeItemData & operator=(const ContentTreeItemData &other)
赋值操作符。
Definition: fs_readingorder.h:528
TableCellAttribute()
构造函数。
Definition: fs_readingorder.h:90
文本段对象项类型。
Definition: fs_readingorder.h:54
int column_span
表格单元格跨列数。
Definition: fs_readingorder.h:151
int page_index
选中项的页面索引。有效取值范围为 0 到 (count - 1),其中 count 为函数 pdf::PDFDoc::GetPageCount 返回的页面总数。
Definition: fs_readingorder.h:327
ReadingOrderOptions()
构造函数。
Definition: fs_readingorder.h:412
表单 XObject 项类型。
Definition: fs_readingorder.h:68
Definition: fs_readingorder.h:238
ContentTreeItemDataArray children_items_data
子项信息。
Definition: fs_readingorder.h:628
WString name
项名称。
Definition: fs_readingorder.h:557
ReadingOrderOptions(ReadingOrderShowType reading_order_show_type, bool is_show_table_figure, bool is_display_like_element, bool is_show_table_cells)
构造函数。
Definition: fs_readingorder.h:419
int page_index
页面索引。有效取值范围为 0 到 (count - 1),其中 count 为函数 pdf::PDFDoc::GetPageCount 返回的页面总数。
Definition: fs_readingorder.h:563
ReadingOrderShowType
阅读顺序显示类型的枚举。
Definition: fs_readingorder.h:401
bool is_show_table_cells
是否显示表格单元格。
Definition: fs_readingorder.h:478
SelectItemInfo & operator=(const SelectItemInfo &other)
赋值操作符。
Definition: fs_readingorder.h:204
文档项类型。
Definition: fs_readingorder.h:46
void Set(TreeItemInfo item_info, TreeItemInfoArray children_items_info)
设置值。
Definition: fs_readingorder.h:379
Definition: fs_pdfpage.h:417
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:213
TableCellType type
表格单元格类型。请参见从 TableCellAttribute::e_TableCellTypeHeader 开始的值。
Definition: fs_readingorder.h:153
String scope
表格单元格作用域。
Definition: fs_readingorder.h:155
容器项类型。
Definition: fs_readingorder.h:66
Definition: fs_readingorder.h:75
ReadingOrderOptions(const ReadingOrderOptions &other)
构造函数,使用另一个阅读顺序选项对象。
Definition: fs_readingorder.h:431
TreeItemInfoArray children_items_info
子项信息。
Definition: fs_readingorder.h:387
ReadingOrderShowType reading_order_show_type
阅读顺序类型。
Definition: fs_readingorder.h:472
ReadingOrderOptions & operator=(const ReadingOrderOptions &other)
赋值操作符。
Definition: fs_readingorder.h:445
页面项类型。
Definition: fs_readingorder.h:48
Definition: fs_basictypes.h:471
Definition: fs_basictypes.h:229
渐变对象项类型。
Definition: fs_readingorder.h:58
String id
项 ID。
Definition: fs_readingorder.h:559
TableCellAttribute & operator=(const TableCellAttribute &other)
赋值操作符。
Definition: fs_readingorder.h:116
Definition: fs_readingorder.h:394
int order_index
项的顺序索引,从 0 开始。
Definition: fs_readingorder.h:325
TableCellAttribute(const TableCellAttribute &other)
构造函数,使用另一个辅助功能单元格属性对象。
Definition: fs_readingorder.h:100
Foxit 命名空间。
Definition: fs_accessibility.h:28
Definition: fs_readingorder.h:573
TreeItemInfo & operator=(const TreeItemInfo &other)
赋值操作符。
Definition: fs_readingorder.h:293
WString cell_id
表格单元格 ID。
Definition: fs_readingorder.h:157
字节字符串类
Definition: fx_string.h:317
Definition: fs_readingorder.h:338
ContentTreeItemData(const ContentTreeItemData &other)
构造函数,使用另一个内容树项数据对象。
Definition: fs_readingorder.h:513
文本组项类型。
Definition: fs_readingorder.h:52
表格单元格类型:数据。
Definition: fs_readingorder.h:86
SelectItemInfo(int page_index, int order_index, const foxit::RectF &rect)
构造函数。
Definition: fs_readingorder.h:181
bool is_display_like_element
是否将相似元素显示在同一个框中。
Definition: fs_readingorder.h:476
bool operator!=(const char *str1, const CFX_ByteString &str2)
检查两个字节字符串是否不相等。
Definition: fs_basictypes.h:140
未知内容。
Definition: fs_readingorder.h:44
TableSelectResult
表格选择结果的枚举。
Definition: fs_readingorder.h:647
空对象项类型。
Definition: fs_readingorder.h:50
foxit::RectF rect
PDF 页面上选中项的矩形坐标。
Definition: fs_readingorder.h:231
bool is_show_table_figure
是否显示表格和图形。
Definition: fs_readingorder.h:474
ContentTreeItem(const ContentTreeItemData &item_data, const ContentTreeItemDataArray &children_items_data)
构造函数,带参数。
Definition: fs_readingorder.h:584
表格单元格类型:表头。
Definition: fs_readingorder.h:84
Definition: fs_readingorder.h:335
WString text
项文本,用于在 UI 中显示。
Definition: fs_readingorder.h:329
void Set(WString name, String id, RectFArray rect_array, int page_index, ContentType type)
设置值。
Definition: fs_readingorder.h:548
ContentTreeItemData()
构造函数。
Definition: fs_readingorder.h:487
Definition: fs_readingorder.h:166
void Set(ContentType type, int order_index, int page_index, const wchar_t *text, foxit::RectF rect)
设置值。
Definition: fs_readingorder.h:313
Definition: fx_coordinates.h:771
RectFArray rect_array
项矩形数组。
Definition: fs_readingorder.h:561
void Set(const ContentTreeItemData &item_data, const ContentTreeItemDataArray &children_items_data)
设置值。
Definition: fs_readingorder.h:620