Loading...
Searching...
No Matches
SElement.h
Go to the documentation of this file.
1//---------------------------------------------------------------------------------------
2// Copyright (c) 2001-2025 by Apryse Software 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 class STree;
13
22 class SElement
23{
24 public:
25
34 SElement (SDF::Obj dict = SDF::Obj(0));
35
36 SElement (const SElement&);
37 SElement& operator= (const SElement&);
38
44 static SElement Create(pdftron::PDF::PDFDoc& doc, const char* struct_type);
45
52 void Insert(SElement& kid, int insert_before);
53
60 int CreateContentItem(PDFDoc& doc, Page& page, int insert_before = -1);
61
65 bool IsValid() const;
66
74 const char* GetType() const;
75
79 int GetNumKids() const;
80
89 bool IsContentItem(int index) const;
90
97 class ContentItem GetAsContentItem(int index) const;
98
105 SElement GetAsStructElem(int index) const;
106
115 SElement GetParent() const;
116
121 class STree GetStructTreeRoot() const;
122
129 bool HasTitle() const;
130
134 UString GetTitle() const;
135
139 SDF::Obj GetID() const;
140
148 bool HasActualText() const;
149
157 UString GetActualText() const;
158
166 bool HasAlt() const;
167
175 UString GetAlt() const;
176
180 SDF::Obj GetSDFObj() const;
181
182
183// @cond PRIVATE_DOC
184#ifndef SWIGHIDDEN
185 SElement(TRN_SElement impl);
186 TRN_SElement mp_elem;
187#endif
188// @endcond
189};
190
191
192
193 }; // namespace Struct
194 }; // namespace PDF
195}; // namespace pdftron
196
197#include <Impl/PDFDoc.inl>
198
199#endif // PDFTRON_H_CPPPDFStructSElement
pdftron::PDF::PDFDoc
Definition PDFDoc.h:72
pdftron::PDF::Page
Definition Page.h:32
pdftron::PDF::Struct::ContentItem
Definition ContentItem.h:21
pdftron::PDF::Struct::SElement::GetParent
SElement GetParent() const
pdftron::PDF::Struct::SElement::GetActualText
UString GetActualText() const
pdftron::PDF::Struct::SElement::HasTitle
bool HasTitle() const
pdftron::PDF::Struct::SElement::GetSDFObj
SDF::Obj GetSDFObj() const
pdftron::PDF::Struct::SElement::GetID
SDF::Obj GetID() const
pdftron::PDF::Struct::SElement::operator=
SElement & operator=(const SElement &)
pdftron::PDF::Struct::SElement::GetAlt
UString GetAlt() const
pdftron::PDF::Struct::SElement::CreateContentItem
int CreateContentItem(PDFDoc &doc, Page &page, int insert_before=-1)
pdftron::PDF::Struct::SElement::SElement
SElement(SDF::Obj dict=SDF::Obj(0))
pdftron::PDF::Struct::SElement::HasAlt
bool HasAlt() const
pdftron::PDF::Struct::SElement::SElement
SElement(const SElement &)
pdftron::PDF::Struct::SElement::GetType
const char * GetType() const
pdftron::PDF::Struct::SElement::GetNumKids
int GetNumKids() const
pdftron::PDF::Struct::SElement::Insert
void Insert(SElement &kid, int insert_before)
pdftron::PDF::Struct::SElement::IsValid
bool IsValid() const
pdftron::PDF::Struct::SElement::GetAsContentItem
class ContentItem GetAsContentItem(int index) const
pdftron::PDF::Struct::SElement::Create
static SElement Create(pdftron::PDF::PDFDoc &doc, const char *struct_type)
pdftron::PDF::Struct::SElement::HasActualText
bool HasActualText() const
pdftron::PDF::Struct::SElement::GetStructTreeRoot
class STree GetStructTreeRoot() const
pdftron::PDF::Struct::SElement::GetTitle
UString GetTitle() const
pdftron::PDF::Struct::SElement::IsContentItem
bool IsContentItem(int index) const
pdftron::PDF::Struct::SElement::GetAsStructElem
SElement GetAsStructElem(int index) const
pdftron::PDF::Struct::STree
Definition STree.h:22
pdftron::SDF::Obj
Definition Obj.h:41
pdftron::UString
Definition UString.h:28
pdftron::PDF::Struct
Definition PDFDoc.h:35
pdftron::PDF
Definition Action.h:15
pdftron
Definition BasicTypes.h:10