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> |
| 11 |
10 #include "../../core/include/fxcrt/fx_basic.h" | 12 #include "../../core/include/fxcrt/fx_basic.h" |
11 | 13 |
12 #define FSDK_XFAWIDGET_TYPENAME "XFAWidget" | 14 #define FSDK_XFAWIDGET_TYPENAME "XFAWidget" |
13 | 15 |
14 class CFFL_IFormFiller; | 16 class CFFL_IFormFiller; |
15 class CFX_RenderDevice; | 17 class CFX_RenderDevice; |
16 class CPDFDoc_Environment; | 18 class CPDFDoc_Environment; |
17 class CPDFSDK_Annot; | 19 class CPDFSDK_Annot; |
18 class CPDFSDK_PageView; | 20 class CPDFSDK_PageView; |
19 class CPDF_Annot; | 21 class CPDF_Annot; |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 virtual FX_BOOL Annot_OnHitTest(CPDFSDK_PageView* pPageView, | 422 virtual FX_BOOL Annot_OnHitTest(CPDFSDK_PageView* pPageView, |
421 CPDFSDK_Annot* pAnnot, | 423 CPDFSDK_Annot* pAnnot, |
422 const CPDF_Point& point); | 424 const CPDF_Point& point); |
423 | 425 |
424 private: | 426 private: |
425 IPDFSDK_AnnotHandler* GetAnnotHandler(const CFX_ByteString& sType) const; | 427 IPDFSDK_AnnotHandler* GetAnnotHandler(const CFX_ByteString& sType) const; |
426 CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pSDKAnnot, FX_BOOL bNext); | 428 CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pSDKAnnot, FX_BOOL bNext); |
427 | 429 |
428 private: | 430 private: |
429 CBA_AnnotHandlerArray m_Handlers; | 431 CBA_AnnotHandlerArray m_Handlers; |
430 CFX_MapByteStringToPtr m_mapType2Handler; | 432 std::map<CFX_ByteString, IPDFSDK_AnnotHandler*> m_mapType2Handler; |
431 CPDFDoc_Environment* m_pApp; | 433 CPDFDoc_Environment* m_pApp; |
432 }; | 434 }; |
433 | 435 |
434 typedef int (*AI_COMPARE)(CPDFSDK_Annot* p1, CPDFSDK_Annot* p2); | 436 typedef int (*AI_COMPARE)(CPDFSDK_Annot* p1, CPDFSDK_Annot* p2); |
435 | 437 |
436 class CPDFSDK_AnnotIterator { | 438 class CPDFSDK_AnnotIterator { |
437 public: | 439 public: |
438 CPDFSDK_AnnotIterator(CPDFSDK_PageView* pPageView, | 440 CPDFSDK_AnnotIterator(CPDFSDK_PageView* pPageView, |
439 FX_BOOL bReverse, | 441 FX_BOOL bReverse, |
440 FX_BOOL bIgnoreTopmost = FALSE, | 442 FX_BOOL bIgnoreTopmost = FALSE, |
(...skipping 18 matching lines...) Expand all Loading... |
459 CPDFSDK_Annot* NextAnnot(int& index); | 461 CPDFSDK_Annot* NextAnnot(int& index); |
460 CPDFSDK_Annot* PrevAnnot(int& index); | 462 CPDFSDK_Annot* PrevAnnot(int& index); |
461 | 463 |
462 CFX_PtrArray m_pIteratorAnnotList; | 464 CFX_PtrArray m_pIteratorAnnotList; |
463 FX_BOOL m_bReverse; | 465 FX_BOOL m_bReverse; |
464 FX_BOOL m_bIgnoreTopmost; | 466 FX_BOOL m_bIgnoreTopmost; |
465 FX_BOOL m_bCircle; | 467 FX_BOOL m_bCircle; |
466 }; | 468 }; |
467 | 469 |
468 #endif // FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_ | 470 #endif // FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_ |
OLD | NEW |