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> |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 class CFFL_IFormFiller; | 26 class CFFL_IFormFiller; |
27 class CFX_SystemHandler; | 27 class CFX_SystemHandler; |
28 class CPDFSDK_ActionHandler; | 28 class CPDFSDK_ActionHandler; |
29 class CPDFSDK_Annot; | 29 class CPDFSDK_Annot; |
30 class CPDFSDK_InterForm; | 30 class CPDFSDK_InterForm; |
31 class CPDFSDK_PageView; | 31 class CPDFSDK_PageView; |
32 class CPDFSDK_Widget; | 32 class CPDFSDK_Widget; |
33 class IJS_Runtime; | 33 class IJS_Runtime; |
34 | 34 |
35 // NOTE: |bsUTF16LE| must outlive the use of the result. Care must be taken | |
36 // since modifying the result would impact |bsUTF16LE|. | |
37 FPDF_WIDESTRING AsFPDFWideString(CFX_ByteString* bsUTF16LE); | |
38 | |
39 class CPDFDoc_Environment final { | 35 class CPDFDoc_Environment final { |
40 public: | 36 public: |
41 CPDFDoc_Environment(UnderlyingDocumentType* pDoc, FPDF_FORMFILLINFO* pFFinfo); | 37 CPDFDoc_Environment(UnderlyingDocumentType* pDoc, FPDF_FORMFILLINFO* pFFinfo); |
42 ~CPDFDoc_Environment(); | 38 ~CPDFDoc_Environment(); |
43 | 39 |
44 void FFI_Invalidate(FPDF_PAGE page, | 40 void FFI_Invalidate(FPDF_PAGE page, |
45 double left, | 41 double left, |
46 double top, | 42 double top, |
47 double right, | 43 double right, |
48 double bottom) { | 44 double bottom) { |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 const CFX_FloatPoint& point, | 593 const CFX_FloatPoint& point, |
598 int nFlag); | 594 int nFlag); |
599 bool IsValidAnnot(const CPDF_Annot* p) const; | 595 bool IsValidAnnot(const CPDF_Annot* p) const; |
600 void GetCurrentMatrix(CFX_Matrix& matrix) { matrix = m_curMatrix; } | 596 void GetCurrentMatrix(CFX_Matrix& matrix) { matrix = m_curMatrix; } |
601 void UpdateRects(const std::vector<CFX_FloatRect>& rects); | 597 void UpdateRects(const std::vector<CFX_FloatRect>& rects); |
602 void UpdateView(CPDFSDK_Annot* pAnnot); | 598 void UpdateView(CPDFSDK_Annot* pAnnot); |
603 const std::vector<CPDFSDK_Annot*>& GetAnnotList() const { | 599 const std::vector<CPDFSDK_Annot*>& GetAnnotList() const { |
604 return m_fxAnnotArray; | 600 return m_fxAnnotArray; |
605 } | 601 } |
606 | 602 |
607 int GetPageIndex(); | 603 int GetPageIndex() const; |
608 void LoadFXAnnots(); | 604 void LoadFXAnnots(); |
609 void ClearFXAnnots(); | 605 void ClearFXAnnots(); |
610 void SetValid(FX_BOOL bValid) { m_bValid = bValid; } | 606 void SetValid(FX_BOOL bValid) { m_bValid = bValid; } |
611 FX_BOOL IsValid() { return m_bValid; } | 607 FX_BOOL IsValid() { return m_bValid; } |
612 void SetLock(FX_BOOL bLocked) { m_bLocked = bLocked; } | 608 void SetLock(FX_BOOL bLocked) { m_bLocked = bLocked; } |
613 FX_BOOL IsLocked() { return m_bLocked; } | 609 FX_BOOL IsLocked() { return m_bLocked; } |
614 #ifndef PDF_ENABLE_XFA | 610 #ifndef PDF_ENABLE_XFA |
615 void TakeOverPage() { m_bTakeOverPage = TRUE; } | 611 void TakeOverPage() { m_bTakeOverPage = TRUE; } |
616 #endif // PDF_ENABLE_XFA | 612 #endif // PDF_ENABLE_XFA |
617 | 613 |
618 private: | 614 private: |
619 void PageView_OnHighlightFormFields(CFX_RenderDevice* pDevice, | 615 int GetPageIndexForStaticPDF() const; |
620 CPDFSDK_Widget* pWidget); | |
621 | 616 |
622 CFX_Matrix m_curMatrix; | 617 CFX_Matrix m_curMatrix; |
623 UnderlyingPageType* m_page; | 618 UnderlyingPageType* const m_page; |
624 std::unique_ptr<CPDF_AnnotList> m_pAnnotList; | 619 std::unique_ptr<CPDF_AnnotList> m_pAnnotList; |
625 std::vector<CPDFSDK_Annot*> m_fxAnnotArray; | 620 std::vector<CPDFSDK_Annot*> m_fxAnnotArray; |
626 CPDFSDK_Document* m_pSDKDoc; | 621 CPDFSDK_Document* m_pSDKDoc; |
627 #ifdef PDF_ENABLE_XFA | 622 #ifdef PDF_ENABLE_XFA |
628 CPDFSDK_Annot* m_CaptureWidget; | 623 CPDFSDK_Annot* m_CaptureWidget; |
629 #else // PDF_ENABLE_XFA | 624 #else // PDF_ENABLE_XFA |
630 CPDFSDK_Widget* m_CaptureWidget; | 625 CPDFSDK_Widget* m_CaptureWidget; |
631 FX_BOOL m_bTakeOverPage; | 626 FX_BOOL m_bTakeOverPage; |
632 #endif // PDF_ENABLE_XFA | 627 #endif // PDF_ENABLE_XFA |
633 FX_BOOL m_bEnterWidget; | 628 FX_BOOL m_bEnterWidget; |
634 FX_BOOL m_bExitWidget; | 629 FX_BOOL m_bExitWidget; |
635 FX_BOOL m_bOnWidget; | 630 FX_BOOL m_bOnWidget; |
636 FX_BOOL m_bValid; | 631 FX_BOOL m_bValid; |
637 FX_BOOL m_bLocked; | 632 FX_BOOL m_bLocked; |
638 }; | 633 }; |
639 | 634 |
640 #endif // FPDFSDK_INCLUDE_FSDK_MGR_H_ | 635 #endif // FPDFSDK_INCLUDE_FSDK_MGR_H_ |
OLD | NEW |