|
00001 //--------------------------------------------------------------------------------------- 00002 // Copyright (c) 2001-2012 by PDFTron Systems Inc. All Rights Reserved. 00003 // Consult legal.txt regarding legal and license information. 00004 //--------------------------------------------------------------------------------------- 00005 00006 #ifndef H_CPPPDFStructSElement 00007 #define H_CPPPDFStructSElement 00008 00009 00010 namespace pdftron { 00011 namespace PDF { 00012 class PDFDoc; 00013 namespace Struct { 00014 00023 class SElement 00024 { 00025 public: 00026 00035 SElement (SDF::Obj dict = SDF::Obj(0)); 00036 00037 SElement (const SElement&); 00038 SElement& operator= (const SElement&); 00039 00043 static SElement Create(pdftron::PDF::PDFDoc& doc, const char* struct_type); 00044 00051 void Insert(SElement& kid, int insert_before); 00052 00057 int CreateContentItem(PDFDoc& doc, Page& page, int insert_before = -1); 00058 00062 bool IsValid() const; 00063 00071 const char* GetType() const; 00072 00076 int GetNumKids() const; 00077 00086 bool IsContentItem(int index) const; 00087 00094 class ContentItem GetAsContentItem(int index) const; 00095 00102 SElement GetAsStructElem(int index) const; 00103 00112 SElement GetParent() const; 00113 00118 class STree GetStructTreeRoot() const; 00119 00126 bool HasTitle() const; 00127 00131 UString GetTitle() const; 00132 00136 SDF::Obj GetID() const; 00137 00145 bool HasActualText() const; 00146 00154 UString GetActualText() const; 00155 00163 bool HasAlt() const; 00164 00172 UString GetAlt() const; 00173 00177 SDF::Obj GetSDFObj() const; 00178 00179 00181 #ifndef SWIGHIDDEN 00182 SElement(TRN_SElement impl); 00183 TRN_SElement mp_elem; 00184 #endif 00186 }; 00187 00188 00189 00190 }; // namespace Struct 00191 }; // namespace PDF 00192 }; // namespace pdftron 00193 00194 #include <Impl/PDFDoc.inl> 00195 #endif 00196