Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(413)

Side by Side Diff: fpdfsdk/include/cpdfsdk_annothandlermgr.h

Issue 2273893002: Display content of the annotation when mouse hover. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Removing useless comments. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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_CPDFSDK_ANNOTHANDLERMGR_H_ 7 #ifndef FPDFSDK_INCLUDE_CPDFSDK_ANNOTHANDLERMGR_H_
8 #define FPDFSDK_INCLUDE_CPDFSDK_ANNOTHANDLERMGR_H_ 8 #define FPDFSDK_INCLUDE_CPDFSDK_ANNOTHANDLERMGR_H_
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 12
13 #include "core/fxcrt/include/fx_basic.h" 13 #include "core/fxcrt/include/fx_basic.h"
14 #include "core/fxcrt/include/fx_coordinates.h" 14 #include "core/fxcrt/include/fx_coordinates.h"
15 15
16 class CFX_Matrix; 16 class CFX_Matrix;
17 class CFX_RenderDevice; 17 class CFX_RenderDevice;
18 class CPDF_Annot; 18 class CPDF_Annot;
19 class CPDFDoc_Environment; 19 class CPDFDoc_Environment;
20 class CPDFSDK_Annot; 20 class CPDFSDK_Annot;
21 class CPDFSDK_BAAnnotHandler;
22 class CPDFSDK_BFAnnotHandler;
21 class CPDFSDK_PageView; 23 class CPDFSDK_PageView;
22 class IPDFSDK_AnnotHandler; 24 class IPDFSDK_AnnotHandler;
23 25
24 #ifdef PDF_ENABLE_XFA 26 #ifdef PDF_ENABLE_XFA
27 class CPDFSDK_XFAAnnotHandler;
25 class CXFA_FFWidget; 28 class CXFA_FFWidget;
26 #endif // PDF_ENABLE_XFA 29 #endif // PDF_ENABLE_XFA
27 30
28 class CPDFSDK_AnnotHandlerMgr { 31 class CPDFSDK_AnnotHandlerMgr {
29 public: 32 public:
30 explicit CPDFSDK_AnnotHandlerMgr(CPDFDoc_Environment* pApp); 33 explicit CPDFSDK_AnnotHandlerMgr(CPDFDoc_Environment* pApp);
31 virtual ~CPDFSDK_AnnotHandlerMgr(); 34 virtual ~CPDFSDK_AnnotHandlerMgr();
32 35
33 void RegisterAnnotHandler(IPDFSDK_AnnotHandler* pAnnotHandler);
34 void UnRegisterAnnotHandler(IPDFSDK_AnnotHandler* pAnnotHandler);
35
36 virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, 36 virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot,
37 CPDFSDK_PageView* pPageView); 37 CPDFSDK_PageView* pPageView);
38 #ifdef PDF_ENABLE_XFA 38 #ifdef PDF_ENABLE_XFA
39 virtual CPDFSDK_Annot* NewAnnot(CXFA_FFWidget* pAnnot, 39 virtual CPDFSDK_Annot* NewAnnot(CXFA_FFWidget* pAnnot,
40 CPDFSDK_PageView* pPageView); 40 CPDFSDK_PageView* pPageView);
41 #endif // PDF_ENABLE_XFA 41 #endif // PDF_ENABLE_XFA
42 virtual void ReleaseAnnot(CPDFSDK_Annot* pAnnot); 42 virtual void ReleaseAnnot(CPDFSDK_Annot* pAnnot);
43 43
44 virtual void Annot_OnCreate(CPDFSDK_Annot* pAnnot); 44 virtual void Annot_OnCreate(CPDFSDK_Annot* pAnnot);
45 virtual void Annot_OnLoad(CPDFSDK_Annot* pAnnot); 45 virtual void Annot_OnLoad(CPDFSDK_Annot* pAnnot);
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 virtual CFX_FloatRect Annot_OnGetViewBBox(CPDFSDK_PageView* pPageView, 105 virtual CFX_FloatRect Annot_OnGetViewBBox(CPDFSDK_PageView* pPageView,
106 CPDFSDK_Annot* pAnnot); 106 CPDFSDK_Annot* pAnnot);
107 virtual FX_BOOL Annot_OnHitTest(CPDFSDK_PageView* pPageView, 107 virtual FX_BOOL Annot_OnHitTest(CPDFSDK_PageView* pPageView,
108 CPDFSDK_Annot* pAnnot, 108 CPDFSDK_Annot* pAnnot,
109 const CFX_FloatPoint& point); 109 const CFX_FloatPoint& point);
110 110
111 private: 111 private:
112 IPDFSDK_AnnotHandler* GetAnnotHandler(const CFX_ByteString& sType) const; 112 IPDFSDK_AnnotHandler* GetAnnotHandler(const CFX_ByteString& sType) const;
113 CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pSDKAnnot, FX_BOOL bNext); 113 CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pSDKAnnot, FX_BOOL bNext);
114 114
115 std::map<CFX_ByteString, std::unique_ptr<IPDFSDK_AnnotHandler>>
116 m_mapType2Handler;
117 CPDFDoc_Environment* m_pApp; 115 CPDFDoc_Environment* m_pApp;
116 std::unique_ptr<CPDFSDK_BFAnnotHandler> m_pBFAnnotHandler;
117 #ifdef PDF_ENABLE_XFA
118 std::unique_ptr<CPDFSDK_XFAAnnotHandler> m_pXFAAnnotHandler;
119 #endif // PDF_ENABLE_XFA
120 std::unique_ptr<CPDFSDK_BAAnnotHandler> m_pBAAnnotHandler;
dsinclair 2016/08/24 14:00:21 Put this one above m_pBFAnnotHandler. It's a bit h
jaepark 2016/08/24 18:37:49 Done.
118 }; 121 };
119 122
120 #endif // FPDFSDK_INCLUDE_CPDFSDK_ANNOTHANDLERMGR_H_ 123 #endif // FPDFSDK_INCLUDE_CPDFSDK_ANNOTHANDLERMGR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698