OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef CORE_FPDFDOC_FPDF_TAGGED_H_ | 7 #ifndef CORE_FPDFDOC_FPDF_TAGGED_H_ |
8 #define CORE_FPDFDOC_FPDF_TAGGED_H_ | 8 #define CORE_FPDFDOC_FPDF_TAGGED_H_ |
9 | 9 |
| 10 #include <memory> |
| 11 |
10 #include "core/fxge/fx_dib.h" | 12 #include "core/fxge/fx_dib.h" |
11 | 13 |
12 class CPDF_Dictionary; | 14 class CPDF_Dictionary; |
13 class CPDF_Document; | 15 class CPDF_Document; |
14 class IPDF_StructElement; | 16 class IPDF_StructElement; |
15 | 17 |
16 class IPDF_StructTree { | 18 class IPDF_StructTree { |
17 public: | 19 public: |
18 static IPDF_StructTree* LoadDoc(const CPDF_Document* pDoc); | 20 static std::unique_ptr<IPDF_StructTree> LoadPage( |
19 static IPDF_StructTree* LoadPage(const CPDF_Document* pDoc, | 21 const CPDF_Document* pDoc, |
20 const CPDF_Dictionary* pPageDict); | 22 const CPDF_Dictionary* pPageDict); |
21 | 23 |
22 virtual ~IPDF_StructTree() {} | 24 virtual ~IPDF_StructTree() {} |
23 | 25 |
24 virtual int CountTopElements() const = 0; | 26 virtual int CountTopElements() const = 0; |
25 virtual IPDF_StructElement* GetTopElement(int i) const = 0; | 27 virtual IPDF_StructElement* GetTopElement(int i) const = 0; |
26 }; | 28 }; |
27 | 29 |
28 struct CPDF_StructKid { | 30 struct CPDF_StructKid { |
29 enum { Invalid, Element, PageContent, StreamContent, Object } m_Type; | 31 enum { Invalid, Element, PageContent, StreamContent, Object } m_Type; |
30 | 32 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 int subindex = -1) = 0; | 86 int subindex = -1) = 0; |
85 | 87 |
86 virtual int GetInteger(const CFX_ByteStringC& owner, | 88 virtual int GetInteger(const CFX_ByteStringC& owner, |
87 const CFX_ByteStringC& name, | 89 const CFX_ByteStringC& name, |
88 int default_value, | 90 int default_value, |
89 bool bInheritable = false, | 91 bool bInheritable = false, |
90 int subindex = -1) = 0; | 92 int subindex = -1) = 0; |
91 }; | 93 }; |
92 | 94 |
93 #endif // CORE_FPDFDOC_FPDF_TAGGED_H_ | 95 #endif // CORE_FPDFDOC_FPDF_TAGGED_H_ |
OLD | NEW |