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 "../../core/include/fxcrt/fx_basic.h" | 10 #include "../../core/include/fxcrt/fx_basic.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 virtual CFX_ByteString GetType() = 0; | 30 virtual CFX_ByteString GetType() = 0; |
31 | 31 |
32 virtual CFX_ByteString GetName() = 0; | 32 virtual CFX_ByteString GetName() = 0; |
33 | 33 |
34 virtual FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot)
= 0; | 34 virtual FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot)
= 0; |
35 | 35 |
36 | 36 |
37 virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_Pag
eView* pPage) = 0; | 37 virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_Pag
eView* pPage) = 0; |
38 | 38 |
39 » virtual CPDFSDK_Annot*» » NewAnnot(XFA_HWIDGET hWidget, CPDFSDK_Pa
geView* pPage) = 0; | 39 » virtual CPDFSDK_Annot*» » NewAnnot(IXFA_Widget* hWidget, CPDFSDK_P
ageView* pPage) = 0; |
40 | 40 |
41 virtual void ReleaseAnnot(CPDFSDK_Annot* pAnn
ot) = 0; | 41 virtual void ReleaseAnnot(CPDFSDK_Annot* pAnn
ot) = 0; |
42 | 42 |
43 virtual void DeleteAnnot(CPDFSDK_Annot* pAnno
t) = 0; | 43 virtual void DeleteAnnot(CPDFSDK_Annot* pAnno
t) = 0; |
44 | 44 |
45 | 45 |
46 virtual CPDF_Rect GetViewBBox(CPDFSDK_Page
View *pPageView, CPDFSDK_Annot* pAnnot) = 0; | 46 virtual CPDF_Rect GetViewBBox(CPDFSDK_Page
View *pPageView, CPDFSDK_Annot* pAnnot) = 0; |
47 | 47 |
48 virtual FX_BOOL HitTest(CPDFSDK_PageView *pPageV
iew, CPDFSDK_Annot* pAnnot, const CPDF_Point& point) = 0; | 48 virtual FX_BOOL HitTest(CPDFSDK_PageView *pPageV
iew, CPDFSDK_Annot* pAnnot, const CPDF_Point& point) = 0; |
49 | 49 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 public: | 103 public: |
104 | 104 |
105 virtual CFX_ByteString GetType() {return CFX_ByteString("Widge
t");} | 105 virtual CFX_ByteString GetType() {return CFX_ByteString("Widge
t");} |
106 | 106 |
107 virtual CFX_ByteString GetName() {return CFX_ByteString("Widge
tHandler");} | 107 virtual CFX_ByteString GetName() {return CFX_ByteString("Widge
tHandler");} |
108 | 108 |
109 virtual FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot)
; | 109 virtual FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot)
; |
110 | 110 |
111 virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_Pag
eView* pPage); | 111 virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_Pag
eView* pPage); |
112 | 112 |
113 » virtual CPDFSDK_Annot*» » NewAnnot(XFA_HWIDGET hWidget, CPDFSDK_Pa
geView* pPage); | 113 » virtual CPDFSDK_Annot*» » NewAnnot(IXFA_Widget* hWidget, CPDFSDK_P
ageView* pPage); |
114 | 114 |
115 virtual void ReleaseAnnot(CPDFSDK_Annot* pAnn
ot) ; | 115 virtual void ReleaseAnnot(CPDFSDK_Annot* pAnn
ot) ; |
116 | 116 |
117 virtual void DeleteAnnot(CPDFSDK_Annot* pAnno
t) {} | 117 virtual void DeleteAnnot(CPDFSDK_Annot* pAnno
t) {} |
118 | 118 |
119 | 119 |
120 virtual CPDF_Rect GetViewBBox(CPDFSDK_Page
View *pPageView, CPDFSDK_Annot* pAnnot) ; | 120 virtual CPDF_Rect GetViewBBox(CPDFSDK_Page
View *pPageView, CPDFSDK_Annot* pAnnot) ; |
121 | 121 |
122 virtual FX_BOOL HitTest(CPDFSDK_PageView *pPageV
iew, CPDFSDK_Annot* pAnnot, const CPDF_Point& point); | 122 virtual FX_BOOL HitTest(CPDFSDK_PageView *pPageV
iew, CPDFSDK_Annot* pAnnot, const CPDF_Point& point); |
123 | 123 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 public: | 182 public: |
183 virtual CFX_ByteString GetType() { return FSDK_XFAWIDGET_TYPENA
ME; } | 183 virtual CFX_ByteString GetType() { return FSDK_XFAWIDGET_TYPENA
ME; } |
184 | 184 |
185 virtual CFX_ByteString GetName() { return "XFAWidgetHandler"; } | 185 virtual CFX_ByteString GetName() { return "XFAWidgetHandler"; } |
186 | 186 |
187 virtual FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot)
; | 187 virtual FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot)
; |
188 | 188 |
189 | 189 |
190 virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_Pag
eView* pPage) { return NULL; } | 190 virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_Pag
eView* pPage) { return NULL; } |
191 | 191 |
192 » virtual CPDFSDK_Annot*» » NewAnnot(XFA_HWIDGET pAnnot, CPDFSDK_Pag
eView* pPage); | 192 » virtual CPDFSDK_Annot*» » NewAnnot(IXFA_Widget* pAnnot, CPDFSDK_Pa
geView* pPage); |
193 | 193 |
194 virtual void ReleaseAnnot(CPDFSDK_Annot* pAnn
ot); | 194 virtual void ReleaseAnnot(CPDFSDK_Annot* pAnn
ot); |
195 | 195 |
196 virtual void DeleteAnnot(CPDFSDK_Annot* pAnno
t) {} | 196 virtual void DeleteAnnot(CPDFSDK_Annot* pAnno
t) {} |
197 | 197 |
198 | 198 |
199 virtual CPDF_Rect GetViewBBox(CPDFSDK_Page
View *pPageView, CPDFSDK_Annot* pAnnot); | 199 virtual CPDF_Rect GetViewBBox(CPDFSDK_Page
View *pPageView, CPDFSDK_Annot* pAnnot); |
200 | 200 |
201 virtual FX_BOOL HitTest(CPDFSDK_PageView *pPageV
iew, CPDFSDK_Annot* pAnnot, const CPDF_Point& point); | 201 virtual FX_BOOL HitTest(CPDFSDK_PageView *pPageV
iew, CPDFSDK_Annot* pAnnot, const CPDF_Point& point); |
202 | 202 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 public: | 259 public: |
260 // Destroy the handler | 260 // Destroy the handler |
261 CPDFSDK_AnnotHandlerMgr(CPDFDoc_Environment* pApp); | 261 CPDFSDK_AnnotHandlerMgr(CPDFDoc_Environment* pApp); |
262 virtual ~CPDFSDK_AnnotHandlerMgr() ; | 262 virtual ~CPDFSDK_AnnotHandlerMgr() ; |
263 | 263 |
264 public: | 264 public: |
265 void RegisterAnnotHandler(IPD
FSDK_AnnotHandler* pAnnotHandler); | 265 void RegisterAnnotHandler(IPD
FSDK_AnnotHandler* pAnnotHandler); |
266 void UnRegisterAnnotHandler(I
PDFSDK_AnnotHandler* pAnnotHandler); | 266 void UnRegisterAnnotHandler(I
PDFSDK_AnnotHandler* pAnnotHandler); |
267 | 267 |
268 virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot * pAnnot, CPDFSDK_Pa
geView *pPageView); | 268 virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot * pAnnot, CPDFSDK_Pa
geView *pPageView); |
269 » virtual CPDFSDK_Annot*» » NewAnnot(XFA_HWIDGET pAnnot, CPDFSDK_Pag
eView* pPageView); | 269 » virtual CPDFSDK_Annot*» » NewAnnot(IXFA_Widget* pAnnot, CPDFSDK_Pa
geView* pPageView); |
270 virtual void ReleaseAnnot(CPDFSDK_Annot * pAn
not); | 270 virtual void ReleaseAnnot(CPDFSDK_Annot * pAn
not); |
271 | 271 |
272 virtual void Annot_OnCreate(CPDFSDK_Annot* pA
nnot); | 272 virtual void Annot_OnCreate(CPDFSDK_Annot* pA
nnot); |
273 virtual void Annot_OnLoad(CPDFSDK_Annot* pAnn
ot); | 273 virtual void Annot_OnLoad(CPDFSDK_Annot* pAnn
ot); |
274 public: | 274 public: |
275 IPDFSDK_AnnotHandler* GetAnnotHandler(CPDFSDK_Annot* pAnnot) c
onst; | 275 IPDFSDK_AnnotHandler* GetAnnotHandler(CPDFSDK_Annot* pAnnot) c
onst; |
276 virtual void Annot_OnDraw(CPDFSDK_PageView* p
PageView, CPDFSDK_Annot* pAnnot, | 276 virtual void Annot_OnDraw(CPDFSDK_PageView* p
PageView, CPDFSDK_Annot* pAnnot, |
277 CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,FX_DWORD dw
Flags); | 277 CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device,FX_DWORD dw
Flags); |
278 | 278 |
279 virtual void Annot_OnMouseEnter(CPDFSDK_PageV
iew * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags); | 279 virtual void Annot_OnMouseEnter(CPDFSDK_PageV
iew * pPageView, CPDFSDK_Annot* pAnnot, FX_DWORD nFlags); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 CPDFSDK_Annot* NextAnnot(int& index ) ; | 336 CPDFSDK_Annot* NextAnnot(int& index ) ; |
337 CPDFSDK_Annot* PrevAnnot(int& index ) ; | 337 CPDFSDK_Annot* PrevAnnot(int& index ) ; |
338 | 338 |
339 CFX_PtrArray m_pIteratorAnnotList; | 339 CFX_PtrArray m_pIteratorAnnotList; |
340 FX_BOOL m_bReverse; | 340 FX_BOOL m_bReverse; |
341 FX_BOOL m_bIgnoreTopmost; | 341 FX_BOOL m_bIgnoreTopmost; |
342 FX_BOOL m_bCircle; | 342 FX_BOOL m_bCircle; |
343 }; | 343 }; |
344 | 344 |
345 #endif // FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_ | 345 #endif // FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_ |
OLD | NEW |