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 
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  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
290  explicit StructMarkedContent(FS_HANDLE handle);
291 
294 
302 
308  uint32 GetMCID() const;
309 
320 
327 };
328 
332 class StructObjectContent FS_FINAL : public StructTreeEntity {
333  public:
339  typedef enum _StructObjectType {
351 
352 
355 
362 
369 
370  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
371  explicit StructObjectContent(FS_HANDLE handle);
372 
375 
383 
391 
402 };
403 
418 class PDFStructTree FS_FINAL : public Base {
419  public:
428  PDFStructTree(const PDFDoc& document);
429 
431  ~PDFStructTree();
432 
438  PDFStructTree(const PDFStructTree& other);
439 
447  PDFStructTree& operator = (const PDFStructTree& other);
448 
456  bool operator == (const PDFStructTree& other) const;
464  bool operator != (const PDFStructTree& other) const;
465 
473  bool IsEmpty() const;
474 
480  int GetChildCount() const;
481 
490  StructElement GetChild(int index) const;
491 
500  void RemoveChild(int index);
501 
502  // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
503  explicit PDFStructTree(FS_HANDLE handle);
504 };
505 } // namespace objects
506 } // namespace pdf
507 } // namespace foxit
508 #endif // FS_PDFSTRUCTTREE_H_
509 
foxit::pdf::objects::StructElement::RemoveChild
void RemoveChild(int index)
Remove a child structure tree entity by index.
foxit::pdf::objects::StructElement::HasElementInfo
bool HasElementInfo(ElementInfoType type) const
Check whether the structure element information of a specific type exist.
foxit::pdf::objects::StructTreeEntity::e_StructTreeEntityTypeMarkedContent
Structure tree entity type: MarkedContent, which represents a marked-content item.
Definition: fs_pdfstructtree.h:60
foxit::pdf::objects::PDFStructTree::PDFStructTree
PDFStructTree(const PDFDoc &document)
Constructor, with parameters.
foxit::pdf::objects::StructTreeEntity::e_UnknownType
Structure tree entity type: unknown.
Definition: fs_pdfstructtree.h:52
foxit::pdf::objects::StructElement
Definition: fs_pdfstructtree.h:140
foxit::pdf::objects::PDFStructTree::~PDFStructTree
~PDFStructTree()
Destructor.
foxit::FS_HANDLE
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:213
foxit::pdf::objects::StructMarkedContent
Definition: fs_pdfstructtree.h:270
foxit::pdf::objects::StructTreeEntity::StructTreeEntityType
StructTreeEntityType
Enumeration for structure tree entity type.
Definition: fs_pdfstructtree.h:48
foxit::pdf::objects::StructMarkedContent::GetParentElement
StructElement GetParentElement()
Get the parent structure element.
foxit::pdf::objects::StructElement::ElementInfoType
ElementInfoType
Enumeration for structure element info type.
Definition: fs_pdfstructtree.h:147
foxit::pdf::objects::StructMarkedContent::~StructMarkedContent
~StructMarkedContent()
Destructor.
Definition: fs_pdfstructtree.h:293
foxit::pdf::objects::StructElement::e_ElementInfoTypeExpandedForm
Structure element info type: Expanded Form, which means the expanded form of structure element.
Definition: fs_pdfstructtree.h:164
foxit::pdf::objects::PDFStructTree::GetChildCount
int GetChildCount() const
Get count of structure elements in current PDF structure tree.
foxit::pdf::objects::StructTreeEntity::~StructTreeEntity
~StructTreeEntity()
Destructor.
fs_common.h
Header file for common definitions and classes.
foxit::pdf::objects::StructObjectContent::GetParentElement
StructElement GetParentElement()
Get the parent structure element.
foxit::pdf::objects::StructTreeEntity::operator!=
bool operator!=(const StructTreeEntity &other) const
Not equal operator.
foxit::pdf::objects::StructTreeEntity::GetPage
PDFPage GetPage() const
Get the related PDF page.
foxit::pdf::objects::StructElement::e_ElementInfoTypeActualText
Structure element info type: Actual Text, which means the actual text of structure element.
Definition: fs_pdfstructtree.h:168
foxit::pdf::objects::StructTreeEntity::StructTreeEntity
StructTreeEntity()
Constructor.
Definition: fs_pdfstructtree.h:70
foxit::pdf::objects::StructTreeEntity::operator==
bool operator==(const StructTreeEntity &other) const
Equal operator.
foxit::pdf::objects::StructObjectContent
Definition: fs_pdfstructtree.h:332
foxit::pdf::objects::StructObjectContent::e_StructObjectTypeImage
Image object.
Definition: fs_pdfstructtree.h:345
foxit::pdf::objects::StructTreeEntity
Definition: fs_pdfstructtree.h:41
foxit::pdf::objects::StructMarkedContent::GetMCID
uint32 GetMCID() const
Get marked-content identifier(MCID).
CFX_ByteString
BYTE STRING CLASS.
Definition: fx_string.h:317
foxit::pdf::objects::StructObjectContent::StructObjectContent
StructObjectContent()
Constructor.
Definition: fs_pdfstructtree.h:354
foxit::pdf::objects::StructObjectContent::~StructObjectContent
~StructObjectContent()
Destructor.
Definition: fs_pdfstructtree.h:374
foxit::pdf::objects::StructElement::GetChild
StructTreeEntity GetChild(int index)
Get a child structure tree entity by index.
foxit::pdf::objects::StructElement::e_ElementInfoTypeTitle
Structure element info type: Title, which means the title of the structure element....
Definition: fs_pdfstructtree.h:151
foxit::pdf::objects::PDFStructTree
Definition: fs_pdfstructtree.h:418
foxit::pdf::objects::StructTreeEntity::GetType
StructTreeEntityType GetType() const
Get structure tree entity type.
foxit::pdf::objects::PDFStructTree::operator==
bool operator==(const PDFStructTree &other) const
Equal operator.
fs_pdfobject.h
Header file for PDF object related definitions and classes.
foxit::pdf::objects::StructObjectContent::e_UnknownType
Unknown Type.
Definition: fs_pdfstructtree.h:341
foxit::pdf::objects::PDFStructTree::GetChild
StructElement GetChild(int index) const
Get the structure element by index.
foxit::pdf::objects::StructTreeEntity::IsEmpty
bool IsEmpty() const
Check whether current object is empty or not.
foxit
Foxit namespace.
Definition: fs_taggedpdf.h:27
foxit::pdf::objects::PDFDictionary
Definition: fs_pdfobject.h:850
foxit::pdf::objects::StructTreeEntity::e_StructTreeEntityTypeObjectContent
Structure tree entity type: ObjectContent, which represents a PDF object content item,...
Definition: fs_pdfstructtree.h:65
foxit::pdf::objects::StructElement::GetChildCount
int GetChildCount() const
Get the count of child structure tree entities in the current structure element.
foxit::pdf::objects::StructElement::~StructElement
~StructElement()
Destructor.
Definition: fs_pdfstructtree.h:193
foxit::pdf::objects::StructObjectContent::e_StructObjectTypeForm
Form object.
Definition: fs_pdfstructtree.h:347
foxit::pdf::objects::PDFStructTree::RemoveChild
void RemoveChild(int index)
Remove the structure element by index.
foxit::pdf::PDFDoc
Definition: fs_pdfdoc.h:776
foxit::pdf::objects::StructElement::StructElement
StructElement()
Constructor.
Definition: fs_pdfstructtree.h:173
foxit::pdf::objects::StructTreeEntity::e_StructTreeEntityTypeElement
Structure tree entity type: Element, which represents a structure element.
Definition: fs_pdfstructtree.h:56
foxit::pdf::objects::StructObjectContent::GetObjectType
StructObjectType GetObjectType() const
Get related object type.
foxit::pdf::PDFPage
Definition: fs_pdfpage.h:412
foxit::pdf::objects::StructObjectContent::e_StructObjectTypeAnnot
Annot object.
Definition: fs_pdfstructtree.h:349
foxit::pdf::objects::PDFStructTree::operator!=
bool operator!=(const PDFStructTree &other) const
Not equal operator.
foxit::pdf::objects::StructElement::e_ElementInfoTypeAltDescription
Structure element info type: Alternative Description, which means the alternative description of stru...
Definition: fs_pdfstructtree.h:160
foxit::pdf::objects::StructObjectContent::StructObjectType
StructObjectType
Enumeration for object type.
Definition: fs_pdfstructtree.h:339
foxit::pdf::objects::StructElement::GetElementInfo
WString GetElementInfo(ElementInfoType type) const
Get the structure element information.
foxit::pdf::objects::PDFStructTree::operator=
PDFStructTree & operator=(const PDFStructTree &other)
Assign operator.
foxit::pdf::objects::StructObjectContent::e_StructObjectTypeInvalid
Invaild object.
Definition: fs_pdfstructtree.h:343
CFX_WideString
WIDE STRING CLASS.
Definition: fx_string.h:1461
foxit::pdf::objects::StructObjectContent::GetDict
pdf::objects::PDFDictionary * GetDict() const
Get PDF dictionary of related object.
foxit::pdf::objects::StructMarkedContent::GetStmDict
pdf::objects::PDFDictionary * GetStmDict() const
Get PDF dictionary of the content stream that contains the marked-content sequence.
foxit::pdf::objects::StructMarkedContent::GetStmOwnerDict
pdf::objects::PDFDictionary * GetStmOwnerDict() const
Get PDF dictionary of content stream owner.
foxit::pdf::objects::StructElement::e_ElementInfoTypeLanguage
Structure element info type: Language, which means the natural language for all text in the structure...
Definition: fs_pdfstructtree.h:156
foxit::uint32
FX_UINT32 uint32
32-bit unsigned integer.
Definition: fs_basictypes.h:195
foxit::pdf::objects::StructElement::GetStructureTypeName
String GetStructureTypeName() const
Get structure type name.
foxit::pdf::objects::StructMarkedContent::StructMarkedContent
StructMarkedContent()
Constructor.
Definition: fs_pdfstructtree.h:273
foxit::Base
Definition: fs_basictypes.h:451
foxit::pdf::objects::StructElement::GetParentElement
StructElement GetParentElement()
Get the parent structure element.
foxit::pdf::objects::StructTreeEntity::operator=
StructTreeEntity & operator=(const StructTreeEntity &other)
Assign operator.
foxit::pdf::objects::PDFStructTree::IsEmpty
bool IsEmpty() const
Check whether current object is empty or not.