| 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_FORMFILLENVIRONMENT_H_ | 7 #ifndef FPDFSDK_CPDFSDK_FORMFILLENVIRONMENT_H_ |
| 8 #define FPDFSDK_CPDFSDK_FORMFILLENVIRONMENT_H_ | 8 #define FPDFSDK_CPDFSDK_FORMFILLENVIRONMENT_H_ |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 const std::vector<uint16_t>& arrSrcPages); | 85 const std::vector<uint16_t>& arrSrcPages); |
| 86 | 86 |
| 87 int GetPageCount() { return m_pUnderlyingDoc->GetPageCount(); } | 87 int GetPageCount() { return m_pUnderlyingDoc->GetPageCount(); } |
| 88 FX_BOOL GetPermissions(int nFlag); | 88 FX_BOOL GetPermissions(int nFlag); |
| 89 | 89 |
| 90 FX_BOOL GetChangeMark() { return m_bChangeMask; } | 90 FX_BOOL GetChangeMark() { return m_bChangeMask; } |
| 91 void SetChangeMark() { m_bChangeMask = TRUE; } | 91 void SetChangeMark() { m_bChangeMask = TRUE; } |
| 92 void ClearChangeMark() { m_bChangeMask = FALSE; } | 92 void ClearChangeMark() { m_bChangeMask = FALSE; } |
| 93 | 93 |
| 94 UnderlyingPageType* GetPage(int nIndex); | 94 UnderlyingPageType* GetPage(int nIndex); |
| 95 CPDFSDK_FormFillEnvironment* GetEnv() { return this; } | |
| 96 | 95 |
| 97 void ProcJavascriptFun(); | 96 void ProcJavascriptFun(); |
| 98 FX_BOOL ProcOpenAction(); | 97 FX_BOOL ProcOpenAction(); |
| 99 | 98 |
| 100 void Invalidate(FPDF_PAGE page, | 99 void Invalidate(FPDF_PAGE page, |
| 101 double left, | 100 double left, |
| 102 double top, | 101 double top, |
| 103 double right, | 102 double right, |
| 104 double bottom); | 103 double bottom); |
| 105 void OutputSelectedRect(FPDF_PAGE page, | 104 void OutputSelectedRect(FPDF_PAGE page, |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 int nStart, | 205 int nStart, |
| 207 int nEnd, | 206 int nEnd, |
| 208 FPDF_BOOL bSilent, | 207 FPDF_BOOL bSilent, |
| 209 FPDF_BOOL bShrinkToFit, | 208 FPDF_BOOL bShrinkToFit, |
| 210 FPDF_BOOL bPrintAsImage, | 209 FPDF_BOOL bPrintAsImage, |
| 211 FPDF_BOOL bReverse, | 210 FPDF_BOOL bReverse, |
| 212 FPDF_BOOL bAnnotations); | 211 FPDF_BOOL bAnnotations); |
| 213 void JS_docgotoPage(int nPageNum); | 212 void JS_docgotoPage(int nPageNum); |
| 214 | 213 |
| 215 FX_BOOL IsJSInitiated() const { return m_pInfo && m_pInfo->m_pJsPlatform; } | 214 FX_BOOL IsJSInitiated() const { return m_pInfo && m_pInfo->m_pJsPlatform; } |
| 216 CPDFSDK_FormFillEnvironment* GetSDKDocument() { return this; } | |
| 217 CFX_ByteString GetAppName() const { return ""; } | 215 CFX_ByteString GetAppName() const { return ""; } |
| 218 CFX_SystemHandler* GetSysHandler() const { return m_pSysHandler.get(); } | 216 CFX_SystemHandler* GetSysHandler() const { return m_pSysHandler.get(); } |
| 219 FPDF_FORMFILLINFO* GetFormFillInfo() const { return m_pInfo; } | 217 FPDF_FORMFILLINFO* GetFormFillInfo() const { return m_pInfo; } |
| 220 | 218 |
| 221 // Creates if not present. | 219 // Creates if not present. |
| 222 CFFL_InteractiveFormFiller* GetInteractiveFormFiller(); | 220 CFFL_InteractiveFormFiller* GetInteractiveFormFiller(); |
| 223 CPDFSDK_AnnotHandlerMgr* GetAnnotHandlerMgr(); // Creates if not present. | 221 CPDFSDK_AnnotHandlerMgr* GetAnnotHandlerMgr(); // Creates if not present. |
| 224 IJS_Runtime* GetJSRuntime(); // Creates if not present. | 222 IJS_Runtime* GetJSRuntime(); // Creates if not present. |
| 225 CPDFSDK_ActionHandler* GetActionHander(); // Creates if not present. | 223 CPDFSDK_ActionHandler* GetActionHander(); // Creates if not present. |
| 226 | 224 |
| 227 private: | 225 private: |
| 228 std::unique_ptr<CPDFSDK_AnnotHandlerMgr> m_pAnnotHandlerMgr; | 226 std::unique_ptr<CPDFSDK_AnnotHandlerMgr> m_pAnnotHandlerMgr; |
| 229 std::unique_ptr<CPDFSDK_ActionHandler> m_pActionHandler; | 227 std::unique_ptr<CPDFSDK_ActionHandler> m_pActionHandler; |
| 230 std::unique_ptr<IJS_Runtime> m_pJSRuntime; | 228 std::unique_ptr<IJS_Runtime> m_pJSRuntime; |
| 231 FPDF_FORMFILLINFO* const m_pInfo; | 229 FPDF_FORMFILLINFO* const m_pInfo; |
| 232 std::map<UnderlyingPageType*, CPDFSDK_PageView*> m_pageMap; | 230 std::map<UnderlyingPageType*, CPDFSDK_PageView*> m_pageMap; |
| 233 std::unique_ptr<CPDFSDK_InterForm> m_pInterForm; | 231 std::unique_ptr<CPDFSDK_InterForm> m_pInterForm; |
| 234 CPDFSDK_Annot::ObservedPtr m_pFocusAnnot; | 232 CPDFSDK_Annot::ObservedPtr m_pFocusAnnot; |
| 235 UnderlyingDocumentType* m_pUnderlyingDoc; | 233 UnderlyingDocumentType* m_pUnderlyingDoc; |
| 236 std::unique_ptr<CFFL_InteractiveFormFiller> m_pFormFiller; | 234 std::unique_ptr<CFFL_InteractiveFormFiller> m_pFormFiller; |
| 237 std::unique_ptr<CFX_SystemHandler> m_pSysHandler; | 235 std::unique_ptr<CFX_SystemHandler> m_pSysHandler; |
| 238 FX_BOOL m_bChangeMask; | 236 FX_BOOL m_bChangeMask; |
| 239 FX_BOOL m_bBeingDestroyed; | 237 FX_BOOL m_bBeingDestroyed; |
| 240 }; | 238 }; |
| 241 | 239 |
| 242 #endif // FPDFSDK_CPDFSDK_FORMFILLENVIRONMENT_H_ | 240 #endif // FPDFSDK_CPDFSDK_FORMFILLENVIRONMENT_H_ |
| OLD | NEW |