Foxit PDF SDK
fs_pdfstructtree.h
浏览该文件的文档.
1 
15 #ifndef FS_PDFSSTRUCTTREE_H_
16 #define FS_PDFSSTRUCTTREE_H_
17 
18 #include "common/fs_common.h"
20 
26 namespace foxit {
30 namespace pdf {
31  // forward declaration
32  class PDFPage;
33 
37 namespace objects {
41 class StructTreeEntity : public Base {
42  public:
48  typedef enum _StructTreeEntityType {
67 
68 
71 
74 
75  // 强烈建议用户不要使用此方法;否则可能发生未知情况。
76  explicit StructTreeEntity(FS_HANDLE handle);
77 
83  StructTreeEntity(const StructTreeEntity& other);
84 
93 
101  bool operator == (const StructTreeEntity& other) const;
102 
110  bool operator != (const StructTreeEntity& other) const;
111 
119  bool IsEmpty() const;
120 
128 
134  PDFPage GetPage() const;
135 };
136 
140 class StructElement FS_FINAL : public StructTreeEntity {
141  public:
147  typedef enum _ElementInfoType {
169  } ElementInfoType;
170 
171 
174 
180  StructElement(const StructElement& other);
181 
187  StructElement(const StructTreeEntity& other);
188 
189  // 强烈建议用户不要使用此方法;否则可能发生未知情况。
190  explicit StructElement(FS_HANDLE handle);
191 
194 
206 
212  int GetChildCount() const;
213 
222  StructTreeEntity GetChild(int index);
223 
232  void RemoveChild(int index);
233 
243  bool HasElementInfo(ElementInfoType type) const;
244 
257 
265  };
266 
270 class StructMarkedContent FS_FINAL : public StructTreeEntity {
271  public:
274 
281 
288 
289  // 强烈建议用户不要使用此方法;否则可能发生未知情况。
290  explicit StructMarkedContent(FS_HANDLE handle);
291 
294 
302 
308  uint32 GetMCID() const;
309 
319 
326 };
327 
331 class StructObjectContent FS_FINAL : public StructTreeEntity {
332  public:
338  typedef enum _StructObjectType {
350 
351 
354 
361 
368 
369  // 强烈建议用户不要使用此方法;否则可能发生未知情况。
370  explicit StructObjectContent(FS_HANDLE handle);
371 
374 
382 
390 
401 };
402 
417 class PDFStructTree FS_FINAL : public Base {
418  public:
427  PDFStructTree(const PDFDoc& document);
428 
430  ~PDFStructTree();
431 
437  PDFStructTree(const PDFStructTree& other);
438 
446  PDFStructTree& operator = (const PDFStructTree& other);
447 
455  bool operator == (const PDFStructTree& other) const;
463  bool operator != (const PDFStructTree& other) const;
464 
472  bool IsEmpty() const;
473 
479  int GetChildCount() const;
480 
489  StructElement GetChild(int index) const;
490 
499  void RemoveChild(int index);
500 
501  // 强烈建议用户不要使用此方法;否则可能发生未知情况。
502  explicit PDFStructTree(FS_HANDLE handle);
503 };
504 } // namespace objects
505 } // namespace pdf
506 } // namespace foxit
507 #endif // FS_PDFSTRUCTTREE_H_
508 
Definition: fs_pdfstructtree.h:417
PDFStructTree(const PDFDoc &document)
带参数的构造函数。
StructElement()
构造函数。
Definition: fs_pdfstructtree.h:173
结构树实体类型:未知。
Definition: fs_pdfstructtree.h:52
表单对象。
Definition: fs_pdfstructtree.h:346
StructTreeEntity GetChild(int index)
通过索引获取子结构树实体。
String GetStructureTypeName() const
获取结构类型名称。
~StructMarkedContent()
析构函数。
Definition: fs_pdfstructtree.h:293
无效对象。
Definition: fs_pdfstructtree.h:342
StructElement GetParentElement()
获取父结构元素。
StructElement GetParentElement()
获取父结构元素。
StructTreeEntityType
结构树实体类型的枚举。
Definition: fs_pdfstructtree.h:48
~StructObjectContent()
析构函数。
Definition: fs_pdfstructtree.h:373
结构树实体类型:Element,表示结构元素。
Definition: fs_pdfstructtree.h:56
结构元素信息类型:Language,表示结构元素中所有文本的 自然语言,除非被嵌套结构元素或标记内容的语言规范覆盖。
Definition: fs_pdfstructtree.h:156
结构树实体类型:ObjectContent,表示PDF对象内容项, 如注释和XObject。
Definition: fs_pdfstructtree.h:65
StructObjectType GetObjectType() const
获取相关对象类型。
宽字符串类
Definition: fx_string.h:1457
PDFPage GetPage() const
获取相关的PDF页面。
StructObjectType
对象类型的枚举。
Definition: fs_pdfstructtree.h:338
bool operator !=(const StructTreeEntity &other) const
不等操作符。
Definition: fs_pdfstructtree.h:270
StructElement GetParentElement()
获取父结构元素。
Definition: fs_pdfdoc.h:771
StructElement GetChild(int index) const
通过索引获取结构元素。
pdf::objects::PDFDictionary * GetStmOwnerDict() const
获取内容流所有者的PDF字典。
Definition: fs_pdfstructtree.h:140
void RemoveChild(int index)
通过索引删除结构元素。
未知类型。
Definition: fs_pdfstructtree.h:340
注释对象。
Definition: fs_pdfstructtree.h:348
bool operator !=(const PDFStructTree &other) const
不等操作符。
~StructElement()
析构函数。
Definition: fs_pdfstructtree.h:193
结构元素信息类型:Title,表示结构元素的标题。以人类可读形式表示的文本字符串。
Definition: fs_pdfstructtree.h:151
Definition: fs_pdfstructtree.h:331
StructTreeEntity()
构造函数。
Definition: fs_pdfstructtree.h:70
StructTreeEntityType GetType() const
获取结构树实体类型。
bool IsEmpty() const
检查当前对象是否为空。
pdf::objects::PDFDictionary * GetDict() const
获取相关对象的PDF字典。
PDFStructTree & operator=(const PDFStructTree &other)
赋值操作符。
pdf::objects::PDFDictionary * GetStmDict() const
获取包含标记内容序列的内容流的PDF字典。
FX_UINT32 uint32
无符号 32 位整数。
Definition: fs_basictypes.h:196
bool operator==(const StructTreeEntity &other) const
相等操作符。
Definition: fs_pdfpage.h:421
void * FS_HANDLE
句柄类型。
Definition: fs_basictypes.h:214
uint32 GetMCID() const
获取标记内容标识符(MCID)。
通用定义和类的头文件。
void RemoveChild(int index)
通过索引删除子结构树实体。
PDF对象相关定义和类的头文件。
StructMarkedContent()
构造函数。
Definition: fs_pdfstructtree.h:273
Definition: fs_basictypes.h:449
bool operator==(const PDFStructTree &other) const
相等操作符。
bool IsEmpty() const
检查当前对象是否为空。
Definition: fs_pdfobject.h:848
Foxit命名空间。
Definition: fs_taggedpdf.h:27
StructTreeEntity & operator=(const StructTreeEntity &other)
赋值操作符。
结构树实体类型:MarkedContent,表示标记内容项。
Definition: fs_pdfstructtree.h:60
int GetChildCount() const
获取当前PDF结构树中结构元素的数量。
字节字符串类
Definition: fx_string.h:317
结构元素信息类型:Expanded Form,表示结构元素的扩展形式。
Definition: fs_pdfstructtree.h:164
WString GetElementInfo(ElementInfoType type) const
获取结构元素信息。
Definition: fs_pdfstructtree.h:41
结构元素信息类型:Actual Text,表示结构元素的实际文本。
Definition: fs_pdfstructtree.h:168
ElementInfoType
结构元素信息类型的枚举。
Definition: fs_pdfstructtree.h:147
结构元素信息类型:Alternative Description,表示结构元素的替代描述。
Definition: fs_pdfstructtree.h:160
int GetChildCount() const
获取当前结构元素中子结构树实体的数量。
图像对象。
Definition: fs_pdfstructtree.h:344
bool HasElementInfo(ElementInfoType type) const
检查特定类型的结构元素信息是否存在。
StructObjectContent()
构造函数。
Definition: fs_pdfstructtree.h:353