| 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_BASEANNOT_H_ | 7 #ifndef FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_ | 
| 8 #define FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_ | 8 #define FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_ | 
| 9 | 9 | 
| 10 #if _FX_OS_ == _FX_ANDROID_ | 10 #if _FX_OS_ == _FX_ANDROID_ | 
| 11 #include "time.h" | 11 #include "time.h" | 
| 12 #else | 12 #else | 
| 13 #include <ctime> | 13 #include <ctime> | 
| 14 #endif | 14 #endif | 
| 15 | 15 | 
| 16 #include "core/include/fpdfdoc/fpdf_doc.h" | 16 #include "core/include/fpdfdoc/fpdf_doc.h" | 
| 17 #include "core/include/fxcrt/fx_basic.h" | 17 #include "core/include/fxcrt/fx_basic.h" | 
| 18 #include "fpdfsdk/include/fsdk_define.h" | 18 #include "fpdfsdk/include/fsdk_define.h" | 
|  | 19 #ifndef PDF_ENABLE_XFA | 
|  | 20 #include "fx_systemhandler.h" | 
|  | 21 #else | 
| 19 #include "fpdfsdk/include/fx_systemhandler.h" | 22 #include "fpdfsdk/include/fx_systemhandler.h" | 
|  | 23 #endif | 
| 20 | 24 | 
| 21 class CPDFSDK_PageView; | 25 class CPDFSDK_PageView; | 
| 22 class CPDF_Annot; | 26 class CPDF_Annot; | 
| 23 class CPDF_Page; | 27 class CPDF_Page; | 
| 24 class CPDF_Rect; | 28 class CPDF_Rect; | 
| 25 class CPDF_Matrix; | 29 class CPDF_Matrix; | 
| 26 class CPDF_RenderOptions; | 30 class CPDF_RenderOptions; | 
| 27 class CFX_RenderDevice; | 31 class CFX_RenderDevice; | 
| 28 | 32 | 
| 29 #define CFX_IntArray CFX_ArrayTemplate<int> | 33 #define CFX_IntArray CFX_ArrayTemplate<int> | 
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 65     int8_t tzHour; | 69     int8_t tzHour; | 
| 66     uint8_t tzMinute; | 70     uint8_t tzMinute; | 
| 67   } dt; | 71   } dt; | 
| 68 }; | 72 }; | 
| 69 | 73 | 
| 70 class CPDFSDK_Annot { | 74 class CPDFSDK_Annot { | 
| 71  public: | 75  public: | 
| 72   explicit CPDFSDK_Annot(CPDFSDK_PageView* pPageView); | 76   explicit CPDFSDK_Annot(CPDFSDK_PageView* pPageView); | 
| 73   virtual ~CPDFSDK_Annot() {} | 77   virtual ~CPDFSDK_Annot() {} | 
| 74 | 78 | 
|  | 79 #ifdef PDF_ENABLE_XFA | 
| 75   virtual FX_BOOL IsXFAField() { return FALSE; } | 80   virtual FX_BOOL IsXFAField() { return FALSE; } | 
| 76 | 81 | 
|  | 82 #endif | 
| 77   virtual FX_FLOAT GetMinWidth() const; | 83   virtual FX_FLOAT GetMinWidth() const; | 
| 78   virtual FX_FLOAT GetMinHeight() const; | 84   virtual FX_FLOAT GetMinHeight() const; | 
| 79   // define layout order to 5. | 85   // define layout order to 5. | 
| 80   virtual int GetLayoutOrder() const { return 5; } | 86   virtual int GetLayoutOrder() const { return 5; } | 
| 81 | 87 | 
| 82   virtual CPDF_Annot* GetPDFAnnot() const { return nullptr; } | 88   virtual CPDF_Annot* GetPDFAnnot() const { return nullptr; } | 
|  | 89 #ifdef PDF_ENABLE_XFA | 
| 83   virtual IXFA_Widget* GetXFAWidget() const { return nullptr; } | 90   virtual IXFA_Widget* GetXFAWidget() const { return nullptr; } | 
|  | 91 #endif | 
| 84 | 92 | 
| 85   virtual CFX_ByteString GetType() const { return ""; } | 93   virtual CFX_ByteString GetType() const { return ""; } | 
| 86   virtual CFX_ByteString GetSubType() const { return ""; } | 94   virtual CFX_ByteString GetSubType() const { return ""; } | 
| 87 | 95 | 
| 88   virtual void SetRect(const CPDF_Rect& rect) {} | 96   virtual void SetRect(const CPDF_Rect& rect) {} | 
| 89   virtual CPDF_Rect GetRect() const { return CPDF_Rect(); } | 97   virtual CPDF_Rect GetRect() const { return CPDF_Rect(); } | 
| 90 | 98 | 
| 91   virtual void Annot_OnDraw(CFX_RenderDevice* pDevice, | 99   virtual void Annot_OnDraw(CFX_RenderDevice* pDevice, | 
| 92                             CPDF_Matrix* pUser2Device, | 100                             CPDF_Matrix* pUser2Device, | 
| 93                             CPDF_RenderOptions* pOptions) {} | 101                             CPDF_RenderOptions* pOptions) {} | 
| 94 | 102 | 
| 95   UnderlyingPageType* GetUnderlyingPage(); | 103   UnderlyingPageType* GetUnderlyingPage(); | 
| 96   CPDF_Page* GetPDFPage(); | 104   CPDF_Page* GetPDFPage(); | 
|  | 105 #ifdef PDF_ENABLE_XFA | 
| 97   CPDFXFA_Page* GetPDFXFAPage(); | 106   CPDFXFA_Page* GetPDFXFAPage(); | 
|  | 107 #endif | 
| 98 | 108 | 
| 99   void SetPage(CPDFSDK_PageView* pPageView) { m_pPageView = pPageView; } | 109   void SetPage(CPDFSDK_PageView* pPageView) { m_pPageView = pPageView; } | 
| 100   CPDFSDK_PageView* GetPageView() const { return m_pPageView; } | 110   CPDFSDK_PageView* GetPageView() const { return m_pPageView; } | 
| 101 | 111 | 
| 102   // Tab Order | 112   // Tab Order | 
| 103   int GetTabOrder(); | 113   int GetTabOrder(); | 
| 104   void SetTabOrder(int iTabOrder); | 114   void SetTabOrder(int iTabOrder); | 
| 105 | 115 | 
| 106   // Selection | 116   // Selection | 
| 107   FX_BOOL IsSelected(); | 117   FX_BOOL IsSelected(); | 
| 108   void SetSelected(FX_BOOL bSelected); | 118   void SetSelected(FX_BOOL bSelected); | 
| 109 | 119 | 
| 110  protected: | 120  protected: | 
| 111   CPDFSDK_PageView* m_pPageView; | 121   CPDFSDK_PageView* m_pPageView; | 
| 112   FX_BOOL m_bSelected; | 122   FX_BOOL m_bSelected; | 
| 113   int m_nTabOrder; | 123   int m_nTabOrder; | 
| 114 }; | 124 }; | 
| 115 | 125 | 
| 116 class CPDFSDK_BAAnnot : public CPDFSDK_Annot { | 126 class CPDFSDK_BAAnnot : public CPDFSDK_Annot { | 
| 117  public: | 127  public: | 
| 118   CPDFSDK_BAAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView); | 128   CPDFSDK_BAAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView); | 
| 119   ~CPDFSDK_BAAnnot() override {} | 129   ~CPDFSDK_BAAnnot() override {} | 
| 120 | 130 | 
|  | 131 #ifdef PDF_ENABLE_XFA | 
| 121   FX_BOOL IsXFAField() override; | 132   FX_BOOL IsXFAField() override; | 
|  | 133 #endif | 
| 122   CFX_ByteString GetType() const override; | 134   CFX_ByteString GetType() const override; | 
| 123   CFX_ByteString GetSubType() const override; | 135   CFX_ByteString GetSubType() const override; | 
| 124   void SetRect(const CPDF_Rect& rect) override; | 136   void SetRect(const CPDF_Rect& rect) override; | 
| 125   CPDF_Rect GetRect() const override; | 137   CPDF_Rect GetRect() const override; | 
| 126   CPDF_Annot* GetPDFAnnot() const override; | 138   CPDF_Annot* GetPDFAnnot() const override; | 
| 127   void Annot_OnDraw(CFX_RenderDevice* pDevice, | 139   void Annot_OnDraw(CFX_RenderDevice* pDevice, | 
| 128                     CPDF_Matrix* pUser2Device, | 140                     CPDF_Matrix* pUser2Device, | 
| 129                     CPDF_RenderOptions* pOptions) override; | 141                     CPDF_RenderOptions* pOptions) override; | 
| 130 | 142 | 
| 131   CPDF_Dictionary* GetAnnotDict() const; | 143   CPDF_Dictionary* GetAnnotDict() const; | 
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 204                        const CFX_ByteString& sAPState = ""); | 216                        const CFX_ByteString& sAPState = ""); | 
| 205 | 217 | 
| 206  protected: | 218  protected: | 
| 207   CPDF_Annot* m_pAnnot; | 219   CPDF_Annot* m_pAnnot; | 
| 208 | 220 | 
| 209  private: | 221  private: | 
| 210   FX_BOOL CreateFormFiller(); | 222   FX_BOOL CreateFormFiller(); | 
| 211 }; | 223 }; | 
| 212 | 224 | 
| 213 #endif  // FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_ | 225 #endif  // FPDFSDK_INCLUDE_FSDK_BASEANNOT_H_ | 
| OLD | NEW | 
|---|