All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SElement.h
Go to the documentation of this file.
1 //---------------------------------------------------------------------------------------
2 // Copyright (c) 2001-2018 by PDFTron Systems Inc. All Rights Reserved.
3 // Consult legal.txt regarding legal and license information.
4 //---------------------------------------------------------------------------------------
5 #ifndef PDFTRON_H_CPPPDFStructSElement
6 #define PDFTRON_H_CPPPDFStructSElement
7 
8 namespace pdftron {
9  namespace PDF {
10  class PDFDoc;
11  namespace Struct {
12 
21 class SElement
22 {
23 public:
24 
33  SElement (SDF::Obj dict = SDF::Obj(0));
34 
35  SElement (const SElement&);
36  SElement& operator= (const SElement&);
37 
42  static SElement Create(pdftron::PDF::PDFDoc& doc, const char* struct_type);
43 
50  void Insert(SElement& kid, int insert_before);
51 
58  int CreateContentItem(PDFDoc& doc, Page& page, int insert_before = -1);
59 
63  bool IsValid() const;
64 
72  const char* GetType() const;
73 
77  int GetNumKids() const;
78 
87  bool IsContentItem(int index) const;
88 
95  class ContentItem GetAsContentItem(int index) const;
96 
103  SElement GetAsStructElem(int index) const;
104 
113  SElement GetParent() const;
114 
119  class STree GetStructTreeRoot() const;
120 
127  bool HasTitle() const;
128 
132  UString GetTitle() const;
133 
137  SDF::Obj GetID() const;
138 
146  bool HasActualText() const;
147 
155  UString GetActualText() const;
156 
164  bool HasAlt() const;
165 
173  UString GetAlt() const;
174 
178  SDF::Obj GetSDFObj() const;
179 
180 
182 #ifndef SWIGHIDDEN
183  SElement(TRN_SElement impl);
184  TRN_SElement mp_elem;
185 #endif
186 };
188 
189 
190 
191  }; // namespace Struct
192  }; // namespace PDF
193 }; // namespace pdftron
194 
195 #include <Impl/PDFDoc.inl>
196 
197 #endif // PDFTRON_H_CPPPDFStructSElement
SElement(SDF::Obj dict=SDF::Obj(0))
bool IsContentItem(int index) const
int CreateContentItem(PDFDoc &doc, Page &page, int insert_before=-1)
UString GetActualText() const
const char * GetType() const
SElement GetAsStructElem(int index) const
static SElement Create(pdftron::PDF::PDFDoc &doc, const char *struct_type)
SElement & operator=(const SElement &)
void Insert(SElement &kid, int insert_before)

© 2002-2014 PDFTron Systems Inc.