OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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 FPDFSDK_CPDFSDK_DOCUMENT_H_ | 7 #ifndef FPDFSDK_CPDFSDK_DOCUMENT_H_ |
8 #define FPDFSDK_CPDFSDK_DOCUMENT_H_ | 8 #define FPDFSDK_CPDFSDK_DOCUMENT_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <memory> | 11 #include <memory> |
12 | 12 |
13 #include "core/fpdfapi/parser/cpdf_document.h" | 13 #include "core/fpdfapi/parser/cpdf_document.h" |
14 #include "core/fxcrt/cfx_observable.h" | 14 #include "core/fxcrt/cfx_observable.h" |
15 #include "fpdfsdk/cpdfsdk_annot.h" | 15 #include "fpdfsdk/cpdfsdk_annot.h" |
16 #include "fpdfsdk/fsdk_define.h" | 16 #include "fpdfsdk/fsdk_define.h" |
17 #include "public/fpdf_formfill.h" | 17 #include "public/fpdf_formfill.h" |
18 | 18 |
19 class CPDF_OCContext; | |
20 class CPDFSDK_FormFillEnvironment; | 19 class CPDFSDK_FormFillEnvironment; |
21 class CPDFSDK_InterForm; | 20 class CPDFSDK_InterForm; |
22 class CPDFSDK_PageView; | 21 class CPDFSDK_PageView; |
23 class IJS_Runtime; | 22 class IJS_Runtime; |
24 | 23 |
25 class CPDFSDK_Document : public CFX_Observable<CPDFSDK_Document> { | 24 class CPDFSDK_Document : public CFX_Observable<CPDFSDK_Document> { |
26 public: | 25 public: |
27 static CPDFSDK_Document* FromFPDFFormHandle(FPDF_FORMHANDLE hHandle); | 26 static CPDFSDK_Document* FromFPDFFormHandle(FPDF_FORMHANDLE hHandle); |
28 | 27 |
29 CPDFSDK_Document(UnderlyingDocumentType* pDoc, | 28 CPDFSDK_Document(UnderlyingDocumentType* pDoc, |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 int GetPageCount() { return m_pDoc->GetPageCount(); } | 85 int GetPageCount() { return m_pDoc->GetPageCount(); } |
87 FX_BOOL GetPermissions(int nFlag); | 86 FX_BOOL GetPermissions(int nFlag); |
88 FX_BOOL GetChangeMark() { return m_bChangeMask; } | 87 FX_BOOL GetChangeMark() { return m_bChangeMask; } |
89 void SetChangeMark() { m_bChangeMask = TRUE; } | 88 void SetChangeMark() { m_bChangeMask = TRUE; } |
90 void ClearChangeMark() { m_bChangeMask = FALSE; } | 89 void ClearChangeMark() { m_bChangeMask = FALSE; } |
91 CFX_WideString GetPath(); | 90 CFX_WideString GetPath(); |
92 UnderlyingPageType* GetPage(int nIndex); | 91 UnderlyingPageType* GetPage(int nIndex); |
93 CPDFSDK_FormFillEnvironment* GetEnv() { return m_pEnv; } | 92 CPDFSDK_FormFillEnvironment* GetEnv() { return m_pEnv; } |
94 void ProcJavascriptFun(); | 93 void ProcJavascriptFun(); |
95 FX_BOOL ProcOpenAction(); | 94 FX_BOOL ProcOpenAction(); |
96 CPDF_OCContext* GetOCContext(); | |
97 | 95 |
98 private: | 96 private: |
99 std::map<UnderlyingPageType*, CPDFSDK_PageView*> m_pageMap; | 97 std::map<UnderlyingPageType*, CPDFSDK_PageView*> m_pageMap; |
100 UnderlyingDocumentType* m_pDoc; | 98 UnderlyingDocumentType* m_pDoc; |
101 std::unique_ptr<CPDFSDK_InterForm> m_pInterForm; | 99 std::unique_ptr<CPDFSDK_InterForm> m_pInterForm; |
102 CPDFSDK_Annot::ObservedPtr m_pFocusAnnot; | 100 CPDFSDK_Annot::ObservedPtr m_pFocusAnnot; |
103 CPDFSDK_FormFillEnvironment* m_pEnv; | 101 CPDFSDK_FormFillEnvironment* m_pEnv; |
104 std::unique_ptr<CPDF_OCContext> m_pOccontent; | |
105 FX_BOOL m_bChangeMask; | 102 FX_BOOL m_bChangeMask; |
106 FX_BOOL m_bBeingDestroyed; | 103 FX_BOOL m_bBeingDestroyed; |
107 }; | 104 }; |
108 | 105 |
109 #endif // FPDFSDK_CPDFSDK_DOCUMENT_H_ | 106 #endif // FPDFSDK_CPDFSDK_DOCUMENT_H_ |
OLD | NEW |