| 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_BASEFORM_H_ | 7 #ifndef FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ |
| 8 #define FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ | 8 #define FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ |
| 9 | 9 |
| 10 #if _FX_OS_ == _FX_ANDROID_ | 10 #if _FX_OS_ == _FX_ANDROID_ |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 CPWL_Color GetFillPWLColor() const; | 186 CPWL_Color GetFillPWLColor() const; |
| 187 | 187 |
| 188 void AddImageToAppearance(const CFX_ByteString& sAPType, CPDF_Stream* pImage); | 188 void AddImageToAppearance(const CFX_ByteString& sAPType, CPDF_Stream* pImage); |
| 189 void RemoveAppearance(const CFX_ByteString& sAPType); | 189 void RemoveAppearance(const CFX_ByteString& sAPType); |
| 190 | 190 |
| 191 public: | 191 public: |
| 192 FX_BOOL IsWidgetAppearanceValid(CPDF_Annot::AppearanceMode mode); | 192 FX_BOOL IsWidgetAppearanceValid(CPDF_Annot::AppearanceMode mode); |
| 193 void DrawAppearance(CFX_RenderDevice* pDevice, | 193 void DrawAppearance(CFX_RenderDevice* pDevice, |
| 194 const CPDF_Matrix* pUser2Device, | 194 const CPDF_Matrix* pUser2Device, |
| 195 CPDF_Annot::AppearanceMode mode, | 195 CPDF_Annot::AppearanceMode mode, |
| 196 const CPDF_RenderOptions* pOptions); | 196 const CPDF_RenderOptions* pOptions) override; |
| 197 | 197 |
| 198 public: | |
| 199 FX_BOOL HitTest(FX_FLOAT pageX, FX_FLOAT pageY); | 198 FX_BOOL HitTest(FX_FLOAT pageX, FX_FLOAT pageY); |
| 200 | 199 |
| 201 CPDFSDK_InterForm* m_pInterForm; | 200 CPDFSDK_InterForm* m_pInterForm; |
| 202 FX_BOOL m_bAppModified; | 201 FX_BOOL m_bAppModified; |
| 203 int32_t m_nAppAge; | 202 int32_t m_nAppAge; |
| 204 int32_t m_nValueAge; | 203 int32_t m_nValueAge; |
| 205 | 204 |
| 206 mutable IXFA_Widget* m_hMixXFAWidget; | 205 mutable IXFA_Widget* m_hMixXFAWidget; |
| 207 mutable IXFA_WidgetHandler* m_pWidgetHandler; | 206 mutable IXFA_WidgetHandler* m_pWidgetHandler; |
| 208 }; | 207 }; |
| 209 | 208 |
| 210 class CPDFSDK_XFAWidget : public CPDFSDK_Annot { | 209 class CPDFSDK_XFAWidget : public CPDFSDK_Annot { |
| 211 public: | 210 public: |
| 212 CPDFSDK_XFAWidget(IXFA_Widget* pAnnot, | 211 CPDFSDK_XFAWidget(IXFA_Widget* pAnnot, |
| 213 CPDFSDK_PageView* pPageView, | 212 CPDFSDK_PageView* pPageView, |
| 214 CPDFSDK_InterForm* pInterForm); | 213 CPDFSDK_InterForm* pInterForm); |
| 215 virtual ~CPDFSDK_XFAWidget() {} | 214 ~CPDFSDK_XFAWidget() override {} |
| 216 | 215 |
| 217 public: | 216 FX_BOOL IsXFAField() override; |
| 218 virtual FX_BOOL IsXFAField(); | 217 IXFA_Widget* GetXFAWidget() const override { return m_hXFAWidget; } |
| 219 virtual IXFA_Widget* GetXFAWidget() { return m_hXFAWidget; } | 218 CFX_ByteString GetType() const override; |
| 219 CFX_ByteString GetSubType() const override { return ""; } |
| 220 CFX_FloatRect GetRect() const override; |
| 220 | 221 |
| 221 virtual CFX_ByteString GetType() const; | |
| 222 virtual CFX_ByteString GetSubType() const { return ""; } | |
| 223 | |
| 224 virtual CFX_FloatRect GetRect(); | |
| 225 | |
| 226 public: | |
| 227 CPDFSDK_InterForm* GetInterForm() { return m_pInterForm; } | 222 CPDFSDK_InterForm* GetInterForm() { return m_pInterForm; } |
| 228 | 223 |
| 229 private: | 224 private: |
| 230 CPDFSDK_InterForm* m_pInterForm; | 225 CPDFSDK_InterForm* m_pInterForm; |
| 231 IXFA_Widget* m_hXFAWidget; | 226 IXFA_Widget* m_hXFAWidget; |
| 232 }; | 227 }; |
| 233 | 228 |
| 234 #define CPDFSDK_XFAWidgetMap \ | 229 #define CPDFSDK_XFAWidgetMap \ |
| 235 CFX_MapPtrTemplate<IXFA_Widget*, CPDFSDK_XFAWidget*> | 230 CFX_MapPtrTemplate<IXFA_Widget*, CPDFSDK_XFAWidget*> |
| 236 #define CPDFSDK_FieldSynchronizeMap CFX_MapPtrTemplate<CPDF_FormField*, int> | 231 #define CPDFSDK_FieldSynchronizeMap CFX_MapPtrTemplate<CPDF_FormField*, int> |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 static CPDF_Rect GetAnnotRect(CPDFSDK_Annot* pAnnot); | 371 static CPDF_Rect GetAnnotRect(CPDFSDK_Annot* pAnnot); |
| 377 | 372 |
| 378 CPDFSDK_PageView* m_pPageView; | 373 CPDFSDK_PageView* m_pPageView; |
| 379 CFX_ByteString m_sType; | 374 CFX_ByteString m_sType; |
| 380 CFX_ByteString m_sSubType; | 375 CFX_ByteString m_sSubType; |
| 381 int m_nTabs; | 376 int m_nTabs; |
| 382 CPDFSDK_Annots m_Annots; | 377 CPDFSDK_Annots m_Annots; |
| 383 }; | 378 }; |
| 384 | 379 |
| 385 #endif // FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ | 380 #endif // FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ |
| OLD | NEW |