| 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_ANNOTHANDLER_H_ | 7 #ifndef FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_ |
| 8 #define FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_ | 8 #define FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag) = 0; | 135 virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag) = 0; |
| 136 #ifdef PDF_ENABLE_XFA | 136 #ifdef PDF_ENABLE_XFA |
| 137 virtual FX_BOOL OnXFAChangedFocus(CPDFSDK_Annot* pOldAnnot, | 137 virtual FX_BOOL OnXFAChangedFocus(CPDFSDK_Annot* pOldAnnot, |
| 138 CPDFSDK_Annot* pNewAnnot) = 0; | 138 CPDFSDK_Annot* pNewAnnot) = 0; |
| 139 #endif // PDF_ENABLE_XFA | 139 #endif // PDF_ENABLE_XFA |
| 140 }; | 140 }; |
| 141 | 141 |
| 142 class CPDFSDK_BFAnnotHandler : public IPDFSDK_AnnotHandler { | 142 class CPDFSDK_BFAnnotHandler : public IPDFSDK_AnnotHandler { |
| 143 public: | 143 public: |
| 144 explicit CPDFSDK_BFAnnotHandler(CPDFDoc_Environment* pApp) | 144 explicit CPDFSDK_BFAnnotHandler(CPDFDoc_Environment* pApp) |
| 145 : m_pApp(pApp), m_pFormFiller(NULL) {} | 145 : m_pApp(pApp), m_pFormFiller(nullptr) {} |
| 146 ~CPDFSDK_BFAnnotHandler() override {} | 146 ~CPDFSDK_BFAnnotHandler() override {} |
| 147 | 147 |
| 148 // IPDFSDK_AnnotHandler | 148 // IPDFSDK_AnnotHandler |
| 149 CFX_ByteString GetType() override { return CFX_ByteString("Widget"); } | 149 CFX_ByteString GetType() override { return CFX_ByteString("Widget"); } |
| 150 CFX_ByteString GetName() override { return CFX_ByteString("WidgetHandler"); } | 150 CFX_ByteString GetName() override { return CFX_ByteString("WidgetHandler"); } |
| 151 FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot) override; | 151 FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot) override; |
| 152 CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage) override; | 152 CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage) override; |
| 153 #ifdef PDF_ENABLE_XFA | 153 #ifdef PDF_ENABLE_XFA |
| 154 CPDFSDK_Annot* NewAnnot(CXFA_FFWidget* hWidget, | 154 CPDFSDK_Annot* NewAnnot(CXFA_FFWidget* hWidget, |
| 155 CPDFSDK_PageView* pPage) override; | 155 CPDFSDK_PageView* pPage) override; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 ~CPDFSDK_XFAAnnotHandler() {} | 248 ~CPDFSDK_XFAAnnotHandler() {} |
| 249 | 249 |
| 250 public: | 250 public: |
| 251 virtual CFX_ByteString GetType() { return FSDK_XFAWIDGET_TYPENAME; } | 251 virtual CFX_ByteString GetType() { return FSDK_XFAWIDGET_TYPENAME; } |
| 252 | 252 |
| 253 virtual CFX_ByteString GetName() { return "XFAWidgetHandler"; } | 253 virtual CFX_ByteString GetName() { return "XFAWidgetHandler"; } |
| 254 | 254 |
| 255 virtual FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot); | 255 virtual FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot); |
| 256 | 256 |
| 257 virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage) { | 257 virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage) { |
| 258 return NULL; | 258 return nullptr; |
| 259 } | 259 } |
| 260 | 260 |
| 261 virtual CPDFSDK_Annot* NewAnnot(CXFA_FFWidget* pAnnot, | 261 virtual CPDFSDK_Annot* NewAnnot(CXFA_FFWidget* pAnnot, |
| 262 CPDFSDK_PageView* pPage); | 262 CPDFSDK_PageView* pPage); |
| 263 | 263 |
| 264 virtual void ReleaseAnnot(CPDFSDK_Annot* pAnnot); | 264 virtual void ReleaseAnnot(CPDFSDK_Annot* pAnnot); |
| 265 | 265 |
| 266 virtual void DeleteAnnot(CPDFSDK_Annot* pAnnot) {} | 266 virtual void DeleteAnnot(CPDFSDK_Annot* pAnnot) {} |
| 267 | 267 |
| 268 virtual CFX_FloatRect GetViewBBox(CPDFSDK_PageView* pPageView, | 268 virtual CFX_FloatRect GetViewBBox(CPDFSDK_PageView* pPageView, |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 private: | 467 private: |
| 468 CPDFSDK_Annot* NextAnnot(); | 468 CPDFSDK_Annot* NextAnnot(); |
| 469 CPDFSDK_Annot* PrevAnnot(); | 469 CPDFSDK_Annot* PrevAnnot(); |
| 470 | 470 |
| 471 std::vector<CPDFSDK_Annot*> m_iteratorAnnotList; | 471 std::vector<CPDFSDK_Annot*> m_iteratorAnnotList; |
| 472 const bool m_bReverse; | 472 const bool m_bReverse; |
| 473 size_t m_pos; | 473 size_t m_pos; |
| 474 }; | 474 }; |
| 475 | 475 |
| 476 #endif // FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_ | 476 #endif // FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_ |
| OLD | NEW |