Foxit PDF SDK
fs_pdfstructtree.h
Go to the documentation of this file.
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  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
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  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
190  explicit StructElement(FS_HANDLE handle);
191 
194 
206 
212  int GetChildCount() const;
213 
222  StructTreeEntity GetChild(int index);
223 
233  bool HasElementInfo(ElementInfoType type) const;
234 
247 
255  };
256 
260 class StructMarkedContent FS_FINAL : public StructTreeEntity {
261  public:
264 
271 
278 
279  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
280  explicit StructMarkedContent(FS_HANDLE handle);
281 
284 
292 
298  uint32 GetMCID() const;
299 
310 
317 };
318 
322 class StructObjectContent FS_FINAL : public StructTreeEntity {
323  public:
329  typedef enum _StructObjectType {
341 
342 
345 
352 
359 
360  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
361  explicit StructObjectContent(FS_HANDLE handle);
362 
365 
373 
381 
392 };
393 
408 class PDFStructTree FS_FINAL : public Base {
409  public:
418  PDFStructTree(const PDFDoc& document);
419 
421  ~PDFStructTree();
422 
428  PDFStructTree(const PDFStructTree& other);
429 
437  PDFStructTree& operator = (const PDFStructTree& other);
438 
446  bool operator == (const PDFStructTree& other) const;
454  bool operator != (const PDFStructTree& other) const;
455 
463  bool IsEmpty() const;
464 
470  int GetChildCount() const;
471 
480  StructElement GetChild(int index) const;
481 
482  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
483  explicit PDFStructTree(FS_HANDLE handle);
484 };
485 } // namespace objects
486 } // namespace pdf
487 } // namespace foxit
488 #endif // FS_PDFSTRUCTTREE_H_
489 
Definition: fs_pdfstructtree.h:408
PDFStructTree(const PDFDoc &document)
Constructor, with parameters.
StructElement()
Constructor.
Definition: fs_pdfstructtree.h:173
Structure tree entity type: unknown.
Definition: fs_pdfstructtree.h:52
Form object.
Definition: fs_pdfstructtree.h:337
StructTreeEntity GetChild(int index)
Get a child structure tree entity by index.
String GetStructureTypeName() const
Get structure type name.
~StructMarkedContent()
Destructor.
Definition: fs_pdfstructtree.h:283
Invaild object.
Definition: fs_pdfstructtree.h:333
StructElement GetParentElement()
Get the parent structure element.
StructElement GetParentElement()
Get the parent structure element.
StructTreeEntityType
Enumeration for structure tree entity type.
Definition: fs_pdfstructtree.h:48
~StructObjectContent()
Destructor.
Definition: fs_pdfstructtree.h:364
Structure tree entity type: Element, which represents a structure element.
Definition: fs_pdfstructtree.h:56
Structure element info type: Language, which means the natural language for all text in the structure...
Definition: fs_pdfstructtree.h:156
Structure tree entity type: ObjectContent, which represents a PDF object content item,...
Definition: fs_pdfstructtree.h:65
StructObjectType GetObjectType() const
Get related object type.
WIDE STRING CLASS.
Definition: fx_string.h:1461
PDFPage GetPage() const
Get the related PDF page.
StructObjectType
Enumeration for object type.
Definition: fs_pdfstructtree.h:329
bool operator !=(const StructTreeEntity &other) const
Not equal operator.
Definition: fs_pdfstructtree.h:260
StructElement GetParentElement()
Get the parent structure element.
Definition: fs_pdfdoc.h:648
StructElement GetChild(int index) const
Get the structure element by index.
pdf::objects::PDFDictionary * GetStmOwnerDict() const
Get PDF dictionary of content stream owner.
Definition: fs_pdfstructtree.h:140
Unknown Type.
Definition: fs_pdfstructtree.h:331
Annot object.
Definition: fs_pdfstructtree.h:339
bool operator !=(const PDFStructTree &other) const
Not equal operator.
~StructElement()
Destructor.
Definition: fs_pdfstructtree.h:193
Structure element info type: Title, which means the title of the structure element....
Definition: fs_pdfstructtree.h:151
Definition: fs_pdfstructtree.h:322
StructTreeEntity()
Constructor.
Definition: fs_pdfstructtree.h:70
StructTreeEntityType GetType() const
Get structure tree entity type.
bool IsEmpty() const
Check whether current object is empty or not.
pdf::objects::PDFDictionary * GetDict() const
Get PDF dictionary of related object.
PDFStructTree & operator=(const PDFStructTree &other)
Assign operator.
pdf::objects::PDFDictionary * GetStmDict() const
Get PDF dictionary of the content stream that contains the marked-content sequence.
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:196
bool operator==(const StructTreeEntity &other) const
Equal operator.
Definition: fs_pdfpage.h:412
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:214
uint32 GetMCID() const
Get marked-content identifier(MCID).
Header file for common definitions and classes.
Header file for PDF object related definitions and classes.
StructMarkedContent()
Constructor.
Definition: fs_pdfstructtree.h:263
Definition: fs_basictypes.h:443
bool operator==(const PDFStructTree &other) const
Equal operator.
bool IsEmpty() const
Check whether current object is empty or not.
Definition: fs_pdfobject.h:809
Foxit namespace.
Definition: fs_pdf3d.h:27
StructTreeEntity & operator=(const StructTreeEntity &other)
Assign operator.
Structure tree entity type: MarkedContent, which represents a marked-content item.
Definition: fs_pdfstructtree.h:60
int GetChildCount() const
Get count of structure elements in current PDF structure tree.
BYTE STRING CLASS.
Definition: fx_string.h:317
Structure element info type: Expanded Form, which means the expanded form of structure element.
Definition: fs_pdfstructtree.h:164
WString GetElementInfo(ElementInfoType type) const
Get the structure element information.
Definition: fs_pdfstructtree.h:41
Structure element info type: Actual Text, which means the actual text of structure element.
Definition: fs_pdfstructtree.h:168
ElementInfoType
Enumeration for structure element info type.
Definition: fs_pdfstructtree.h:147
Structure element info type: Alternative Description, which means the alternative description of stru...
Definition: fs_pdfstructtree.h:160
int GetChildCount() const
Get the count of child structure tree entities in the current structure element.
Image object.
Definition: fs_pdfstructtree.h:335
bool HasElementInfo(ElementInfoType type) const
Check whether the structure element information of a specific type exist.
StructObjectContent()
Constructor.
Definition: fs_pdfstructtree.h:344