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 FPDFSDK_INCLUDE_FSDK_MGR_H_ | 7 #ifndef FPDFSDK_INCLUDE_FSDK_MGR_H_ |
8 #define FPDFSDK_INCLUDE_FSDK_MGR_H_ | 8 #define FPDFSDK_INCLUDE_FSDK_MGR_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <memory> | 11 #include <memory> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" | 14 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
| 15 #include "fpdfsdk/cfx_systemhandler.h" |
15 #include "fpdfsdk/include/fsdk_actionhandler.h" | 16 #include "fpdfsdk/include/fsdk_actionhandler.h" |
16 #include "fpdfsdk/include/fsdk_annothandler.h" | 17 #include "fpdfsdk/include/fsdk_annothandler.h" |
17 #include "fpdfsdk/include/fsdk_baseannot.h" | 18 #include "fpdfsdk/include/fsdk_baseannot.h" |
18 #include "fpdfsdk/include/fsdk_baseform.h" | 19 #include "fpdfsdk/include/fsdk_baseform.h" |
19 #include "fpdfsdk/include/fsdk_common.h" | 20 #include "fpdfsdk/include/fsdk_common.h" |
20 #include "fpdfsdk/include/fsdk_define.h" | 21 #include "fpdfsdk/include/fsdk_define.h" |
21 #include "fpdfsdk/include/fx_systemhandler.h" | |
22 #include "public/fpdf_formfill.h" | 22 #include "public/fpdf_formfill.h" |
23 #include "public/fpdf_fwlevent.h" | 23 #include "public/fpdf_fwlevent.h" |
24 | 24 |
25 class CFFL_IFormFiller; | 25 class CFFL_IFormFiller; |
| 26 class CFX_SystemHandler; |
26 class CPDFSDK_ActionHandler; | 27 class CPDFSDK_ActionHandler; |
27 class CPDFSDK_Annot; | 28 class CPDFSDK_Annot; |
28 class CPDFSDK_InterForm; | 29 class CPDFSDK_InterForm; |
29 class CPDFSDK_PageView; | 30 class CPDFSDK_PageView; |
30 class CPDFSDK_Widget; | 31 class CPDFSDK_Widget; |
31 class IFX_SystemHandler; | |
32 class IJS_Runtime; | 32 class IJS_Runtime; |
33 | 33 |
34 // NOTE: |bsUTF16LE| must outlive the use of the result. Care must be taken | 34 // NOTE: |bsUTF16LE| must outlive the use of the result. Care must be taken |
35 // since modifying the result would impact |bsUTF16LE|. | 35 // since modifying the result would impact |bsUTF16LE|. |
36 FPDF_WIDESTRING AsFPDFWideString(CFX_ByteString* bsUTF16LE); | 36 FPDF_WIDESTRING AsFPDFWideString(CFX_ByteString* bsUTF16LE); |
37 | 37 |
38 class CPDFDoc_Environment final { | 38 class CPDFDoc_Environment final { |
39 public: | 39 public: |
40 CPDFDoc_Environment(UnderlyingDocumentType* pDoc, FPDF_FORMFILLINFO* pFFinfo); | 40 CPDFDoc_Environment(UnderlyingDocumentType* pDoc, FPDF_FORMFILLINFO* pFFinfo); |
41 ~CPDFDoc_Environment(); | 41 ~CPDFDoc_Environment(); |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 FPDF_BOOL bAnnotations); | 430 FPDF_BOOL bAnnotations); |
431 void JS_docgotoPage(int nPageNum); | 431 void JS_docgotoPage(int nPageNum); |
432 | 432 |
433 FX_BOOL IsJSInitiated() const { return m_pInfo && m_pInfo->m_pJsPlatform; } | 433 FX_BOOL IsJSInitiated() const { return m_pInfo && m_pInfo->m_pJsPlatform; } |
434 void SetSDKDocument(CPDFSDK_Document* pFXDoc) { m_pSDKDoc = pFXDoc; } | 434 void SetSDKDocument(CPDFSDK_Document* pFXDoc) { m_pSDKDoc = pFXDoc; } |
435 CPDFSDK_Document* GetSDKDocument() const { return m_pSDKDoc; } | 435 CPDFSDK_Document* GetSDKDocument() const { return m_pSDKDoc; } |
436 UnderlyingDocumentType* GetUnderlyingDocument() const { | 436 UnderlyingDocumentType* GetUnderlyingDocument() const { |
437 return m_pUnderlyingDoc; | 437 return m_pUnderlyingDoc; |
438 } | 438 } |
439 CFX_ByteString GetAppName() const { return ""; } | 439 CFX_ByteString GetAppName() const { return ""; } |
440 IFX_SystemHandler* GetSysHandler() const { return m_pSysHandler.get(); } | 440 CFX_SystemHandler* GetSysHandler() const { return m_pSysHandler.get(); } |
441 FPDF_FORMFILLINFO* GetFormFillInfo() const { return m_pInfo; } | 441 FPDF_FORMFILLINFO* GetFormFillInfo() const { return m_pInfo; } |
442 | 442 |
443 CFFL_IFormFiller* GetIFormFiller(); // Creates if not present. | 443 CFFL_IFormFiller* GetIFormFiller(); // Creates if not present. |
444 CPDFSDK_AnnotHandlerMgr* GetAnnotHandlerMgr(); // Creates if not present. | 444 CPDFSDK_AnnotHandlerMgr* GetAnnotHandlerMgr(); // Creates if not present. |
445 IJS_Runtime* GetJSRuntime(); // Creates if not present. | 445 IJS_Runtime* GetJSRuntime(); // Creates if not present. |
446 CPDFSDK_ActionHandler* GetActionHander(); // Creates if not present. | 446 CPDFSDK_ActionHandler* GetActionHander(); // Creates if not present. |
447 | 447 |
448 private: | 448 private: |
449 std::unique_ptr<CPDFSDK_AnnotHandlerMgr> m_pAnnotHandlerMgr; | 449 std::unique_ptr<CPDFSDK_AnnotHandlerMgr> m_pAnnotHandlerMgr; |
450 std::unique_ptr<CPDFSDK_ActionHandler> m_pActionHandler; | 450 std::unique_ptr<CPDFSDK_ActionHandler> m_pActionHandler; |
451 std::unique_ptr<IJS_Runtime> m_pJSRuntime; | 451 std::unique_ptr<IJS_Runtime> m_pJSRuntime; |
452 FPDF_FORMFILLINFO* const m_pInfo; | 452 FPDF_FORMFILLINFO* const m_pInfo; |
453 CPDFSDK_Document* m_pSDKDoc; | 453 CPDFSDK_Document* m_pSDKDoc; |
454 UnderlyingDocumentType* const m_pUnderlyingDoc; | 454 UnderlyingDocumentType* const m_pUnderlyingDoc; |
455 std::unique_ptr<CFFL_IFormFiller> m_pIFormFiller; | 455 std::unique_ptr<CFFL_IFormFiller> m_pIFormFiller; |
456 std::unique_ptr<IFX_SystemHandler> m_pSysHandler; | 456 std::unique_ptr<CFX_SystemHandler> m_pSysHandler; |
457 }; | 457 }; |
458 | 458 |
459 class CPDFSDK_Document { | 459 class CPDFSDK_Document { |
460 public: | 460 public: |
461 static CPDFSDK_Document* FromFPDFFormHandle(FPDF_FORMHANDLE hHandle); | 461 static CPDFSDK_Document* FromFPDFFormHandle(FPDF_FORMHANDLE hHandle); |
462 | 462 |
463 CPDFSDK_Document(UnderlyingDocumentType* pDoc, CPDFDoc_Environment* pEnv); | 463 CPDFSDK_Document(UnderlyingDocumentType* pDoc, CPDFDoc_Environment* pEnv); |
464 ~CPDFSDK_Document(); | 464 ~CPDFSDK_Document(); |
465 | 465 |
466 CPDFSDK_InterForm* GetInterForm(); | 466 CPDFSDK_InterForm* GetInterForm(); |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 FX_BOOL m_bTakeOverPage; | 640 FX_BOOL m_bTakeOverPage; |
641 #endif // PDF_ENABLE_XFA | 641 #endif // PDF_ENABLE_XFA |
642 FX_BOOL m_bEnterWidget; | 642 FX_BOOL m_bEnterWidget; |
643 FX_BOOL m_bExitWidget; | 643 FX_BOOL m_bExitWidget; |
644 FX_BOOL m_bOnWidget; | 644 FX_BOOL m_bOnWidget; |
645 FX_BOOL m_bValid; | 645 FX_BOOL m_bValid; |
646 FX_BOOL m_bLocked; | 646 FX_BOOL m_bLocked; |
647 }; | 647 }; |
648 | 648 |
649 #endif // FPDFSDK_INCLUDE_FSDK_MGR_H_ | 649 #endif // FPDFSDK_INCLUDE_FSDK_MGR_H_ |
OLD | NEW |