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

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

Issue 1737593006: Re-land "Replace CPDF_Rect and CPDF_Point with CFX types." (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Ooops. Created 4 years, 9 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
« no previous file with comments | « fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h ('k') | fpdfsdk/include/fsdk_baseannot.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "core/include/fxcrt/fx_basic.h" 13 #include "core/include/fxcrt/fx_basic.h"
14 14
15 #ifdef PDF_ENABLE_XFA 15 #ifdef PDF_ENABLE_XFA
16 #define FSDK_XFAWIDGET_TYPENAME "XFAWidget" 16 #define FSDK_XFAWIDGET_TYPENAME "XFAWidget"
17 #endif // PDF_ENABLE_XFA 17 #endif // PDF_ENABLE_XFA
18 18
19 class CFFL_IFormFiller; 19 class CFFL_IFormFiller;
20 class CFX_RenderDevice; 20 class CFX_RenderDevice;
21 class CPDFDoc_Environment; 21 class CPDFDoc_Environment;
22 class CPDFSDK_Annot; 22 class CPDFSDK_Annot;
23 class CPDFSDK_PageView; 23 class CPDFSDK_PageView;
24 class CPDF_Annot; 24 class CPDF_Annot;
25 class CFX_Matrix; 25 class CFX_Matrix;
26 class CPDF_Point; 26 class CFX_FloatPoint;
27 27
28 class IPDFSDK_AnnotHandler { 28 class IPDFSDK_AnnotHandler {
29 public: 29 public:
30 virtual ~IPDFSDK_AnnotHandler() {} 30 virtual ~IPDFSDK_AnnotHandler() {}
31 31
32 virtual CFX_ByteString GetType() = 0; 32 virtual CFX_ByteString GetType() = 0;
33 33
34 virtual CFX_ByteString GetName() = 0; 34 virtual CFX_ByteString GetName() = 0;
35 35
36 virtual FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot) = 0; 36 virtual FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot) = 0;
37 37
38 virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, 38 virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot,
39 CPDFSDK_PageView* pPage) = 0; 39 CPDFSDK_PageView* pPage) = 0;
40 40
41 #ifdef PDF_ENABLE_XFA 41 #ifdef PDF_ENABLE_XFA
42 virtual CPDFSDK_Annot* NewAnnot(IXFA_Widget* hWidget, 42 virtual CPDFSDK_Annot* NewAnnot(IXFA_Widget* hWidget,
43 CPDFSDK_PageView* pPage) = 0; 43 CPDFSDK_PageView* pPage) = 0;
44 #endif // PDF_ENABLE_XFA 44 #endif // PDF_ENABLE_XFA
45 45
46 virtual void ReleaseAnnot(CPDFSDK_Annot* pAnnot) = 0; 46 virtual void ReleaseAnnot(CPDFSDK_Annot* pAnnot) = 0;
47 47
48 virtual void DeleteAnnot(CPDFSDK_Annot* pAnnot) = 0; 48 virtual void DeleteAnnot(CPDFSDK_Annot* pAnnot) = 0;
49 49
50 virtual CPDF_Rect GetViewBBox(CPDFSDK_PageView* pPageView, 50 virtual CFX_FloatRect GetViewBBox(CPDFSDK_PageView* pPageView,
51 CPDFSDK_Annot* pAnnot) = 0; 51 CPDFSDK_Annot* pAnnot) = 0;
52 52
53 virtual FX_BOOL HitTest(CPDFSDK_PageView* pPageView, 53 virtual FX_BOOL HitTest(CPDFSDK_PageView* pPageView,
54 CPDFSDK_Annot* pAnnot, 54 CPDFSDK_Annot* pAnnot,
55 const CPDF_Point& point) = 0; 55 const CFX_FloatPoint& point) = 0;
56 56
57 virtual void OnDraw(CPDFSDK_PageView* pPageView, 57 virtual void OnDraw(CPDFSDK_PageView* pPageView,
58 CPDFSDK_Annot* pAnnot, 58 CPDFSDK_Annot* pAnnot,
59 CFX_RenderDevice* pDevice, 59 CFX_RenderDevice* pDevice,
60 CFX_Matrix* pUser2Device, 60 CFX_Matrix* pUser2Device,
61 FX_DWORD dwFlags) = 0; 61 FX_DWORD dwFlags) = 0;
62 62
63 virtual void OnDrawSleep(CPDFSDK_PageView* pPageView, 63 virtual void OnDrawSleep(CPDFSDK_PageView* pPageView,
64 CPDFSDK_Annot* pAnnot, 64 CPDFSDK_Annot* pAnnot,
65 CFX_RenderDevice* pDevice, 65 CFX_RenderDevice* pDevice,
66 CFX_Matrix* pUser2Device, 66 CFX_Matrix* pUser2Device,
67 const CPDF_Rect& rcWindow, 67 const CFX_FloatRect& rcWindow,
68 FX_DWORD dwFlags) = 0; 68 FX_DWORD dwFlags) = 0;
69 69
70 virtual void OnCreate(CPDFSDK_Annot* pAnnot) = 0; 70 virtual void OnCreate(CPDFSDK_Annot* pAnnot) = 0;
71 71
72 virtual void OnLoad(CPDFSDK_Annot* pAnnot) = 0; 72 virtual void OnLoad(CPDFSDK_Annot* pAnnot) = 0;
73 73
74 virtual void OnDelete(CPDFSDK_Annot* pAnnot) = 0; 74 virtual void OnDelete(CPDFSDK_Annot* pAnnot) = 0;
75 75
76 virtual void OnRelease(CPDFSDK_Annot* pAnnot) = 0; 76 virtual void OnRelease(CPDFSDK_Annot* pAnnot) = 0;
77 77
78 virtual void OnMouseEnter(CPDFSDK_PageView* pPageView, 78 virtual void OnMouseEnter(CPDFSDK_PageView* pPageView,
79 CPDFSDK_Annot* pAnnot, 79 CPDFSDK_Annot* pAnnot,
80 FX_DWORD nFlag) = 0; 80 FX_DWORD nFlag) = 0;
81 virtual void OnMouseExit(CPDFSDK_PageView* pPageView, 81 virtual void OnMouseExit(CPDFSDK_PageView* pPageView,
82 CPDFSDK_Annot* pAnnot, 82 CPDFSDK_Annot* pAnnot,
83 FX_DWORD nFlag) = 0; 83 FX_DWORD nFlag) = 0;
84 84
85 virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView, 85 virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView,
86 CPDFSDK_Annot* pAnnot, 86 CPDFSDK_Annot* pAnnot,
87 FX_DWORD nFlags, 87 FX_DWORD nFlags,
88 const CPDF_Point& point) = 0; 88 const CFX_FloatPoint& point) = 0;
89 virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView, 89 virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView,
90 CPDFSDK_Annot* pAnnot, 90 CPDFSDK_Annot* pAnnot,
91 FX_DWORD nFlags, 91 FX_DWORD nFlags,
92 const CPDF_Point& point) = 0; 92 const CFX_FloatPoint& point) = 0;
93 virtual FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView, 93 virtual FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView,
94 CPDFSDK_Annot* pAnnot, 94 CPDFSDK_Annot* pAnnot,
95 FX_DWORD nFlags, 95 FX_DWORD nFlags,
96 const CPDF_Point& point) = 0; 96 const CFX_FloatPoint& point) = 0;
97 virtual FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView, 97 virtual FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView,
98 CPDFSDK_Annot* pAnnot, 98 CPDFSDK_Annot* pAnnot,
99 FX_DWORD nFlags, 99 FX_DWORD nFlags,
100 const CPDF_Point& point) = 0; 100 const CFX_FloatPoint& point) = 0;
101 virtual FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView, 101 virtual FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView,
102 CPDFSDK_Annot* pAnnot, 102 CPDFSDK_Annot* pAnnot,
103 FX_DWORD nFlags, 103 FX_DWORD nFlags,
104 short zDelta, 104 short zDelta,
105 const CPDF_Point& point) = 0; 105 const CFX_FloatPoint& point) = 0;
106 virtual FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView, 106 virtual FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView,
107 CPDFSDK_Annot* pAnnot, 107 CPDFSDK_Annot* pAnnot,
108 FX_DWORD nFlags, 108 FX_DWORD nFlags,
109 const CPDF_Point& point) = 0; 109 const CFX_FloatPoint& point) = 0;
110 virtual FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView, 110 virtual FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView,
111 CPDFSDK_Annot* pAnnot, 111 CPDFSDK_Annot* pAnnot,
112 FX_DWORD nFlags, 112 FX_DWORD nFlags,
113 const CPDF_Point& point) = 0; 113 const CFX_FloatPoint& point) = 0;
114 virtual FX_BOOL OnRButtonDblClk(CPDFSDK_PageView* pPageView, 114 virtual FX_BOOL OnRButtonDblClk(CPDFSDK_PageView* pPageView,
115 CPDFSDK_Annot* pAnnot, 115 CPDFSDK_Annot* pAnnot,
116 FX_DWORD nFlags, 116 FX_DWORD nFlags,
117 const CPDF_Point& point) = 0; 117 const CFX_FloatPoint& point) = 0;
118 // by wjm. 118 // by wjm.
119 virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, 119 virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot,
120 FX_DWORD nChar, 120 FX_DWORD nChar,
121 FX_DWORD nFlags) = 0; 121 FX_DWORD nFlags) = 0;
122 virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) = 0; 122 virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) = 0;
123 virtual FX_BOOL OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) = 0; 123 virtual FX_BOOL OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) = 0;
124 124
125 virtual void OnDeSelected(CPDFSDK_Annot* pAnnot) = 0; 125 virtual void OnDeSelected(CPDFSDK_Annot* pAnnot) = 0;
126 virtual void OnSelected(CPDFSDK_Annot* pAnnot) = 0; 126 virtual void OnSelected(CPDFSDK_Annot* pAnnot) = 0;
127 127
(...skipping 15 matching lines...) Expand all
143 CFX_ByteString GetType() override { return CFX_ByteString("Widget"); } 143 CFX_ByteString GetType() override { return CFX_ByteString("Widget"); }
144 CFX_ByteString GetName() override { return CFX_ByteString("WidgetHandler"); } 144 CFX_ByteString GetName() override { return CFX_ByteString("WidgetHandler"); }
145 FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot) override; 145 FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot) override;
146 CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage) override; 146 CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage) override;
147 #ifdef PDF_ENABLE_XFA 147 #ifdef PDF_ENABLE_XFA
148 CPDFSDK_Annot* NewAnnot(IXFA_Widget* hWidget, 148 CPDFSDK_Annot* NewAnnot(IXFA_Widget* hWidget,
149 CPDFSDK_PageView* pPage) override; 149 CPDFSDK_PageView* pPage) override;
150 #endif // PDF_ENABLE_XFA 150 #endif // PDF_ENABLE_XFA
151 void ReleaseAnnot(CPDFSDK_Annot* pAnnot) override; 151 void ReleaseAnnot(CPDFSDK_Annot* pAnnot) override;
152 void DeleteAnnot(CPDFSDK_Annot* pAnnot) override {} 152 void DeleteAnnot(CPDFSDK_Annot* pAnnot) override {}
153 CPDF_Rect GetViewBBox(CPDFSDK_PageView* pPageView, 153 CFX_FloatRect GetViewBBox(CPDFSDK_PageView* pPageView,
154 CPDFSDK_Annot* pAnnot) override; 154 CPDFSDK_Annot* pAnnot) override;
155 FX_BOOL HitTest(CPDFSDK_PageView* pPageView, 155 FX_BOOL HitTest(CPDFSDK_PageView* pPageView,
156 CPDFSDK_Annot* pAnnot, 156 CPDFSDK_Annot* pAnnot,
157 const CPDF_Point& point) override; 157 const CFX_FloatPoint& point) override;
158 void OnDraw(CPDFSDK_PageView* pPageView, 158 void OnDraw(CPDFSDK_PageView* pPageView,
159 CPDFSDK_Annot* pAnnot, 159 CPDFSDK_Annot* pAnnot,
160 CFX_RenderDevice* pDevice, 160 CFX_RenderDevice* pDevice,
161 CFX_Matrix* pUser2Device, 161 CFX_Matrix* pUser2Device,
162 FX_DWORD dwFlags) override; 162 FX_DWORD dwFlags) override;
163 void OnDrawSleep(CPDFSDK_PageView* pPageView, 163 void OnDrawSleep(CPDFSDK_PageView* pPageView,
164 CPDFSDK_Annot* pAnnot, 164 CPDFSDK_Annot* pAnnot,
165 CFX_RenderDevice* pDevice, 165 CFX_RenderDevice* pDevice,
166 CFX_Matrix* pUser2Device, 166 CFX_Matrix* pUser2Device,
167 const CPDF_Rect& rcWindow, 167 const CFX_FloatRect& rcWindow,
168 FX_DWORD dwFlags) override {} 168 FX_DWORD dwFlags) override {}
169 void OnCreate(CPDFSDK_Annot* pAnnot) override; 169 void OnCreate(CPDFSDK_Annot* pAnnot) override;
170 void OnLoad(CPDFSDK_Annot* pAnnot) override; 170 void OnLoad(CPDFSDK_Annot* pAnnot) override;
171 void OnDelete(CPDFSDK_Annot* pAnnot) override {} 171 void OnDelete(CPDFSDK_Annot* pAnnot) override {}
172 void OnRelease(CPDFSDK_Annot* pAnnot) override {} 172 void OnRelease(CPDFSDK_Annot* pAnnot) override {}
173 void OnMouseEnter(CPDFSDK_PageView* pPageView, 173 void OnMouseEnter(CPDFSDK_PageView* pPageView,
174 CPDFSDK_Annot* pAnnot, 174 CPDFSDK_Annot* pAnnot,
175 FX_DWORD nFlag) override; 175 FX_DWORD nFlag) override;
176 void OnMouseExit(CPDFSDK_PageView* pPageView, 176 void OnMouseExit(CPDFSDK_PageView* pPageView,
177 CPDFSDK_Annot* pAnnot, 177 CPDFSDK_Annot* pAnnot,
178 FX_DWORD nFlag) override; 178 FX_DWORD nFlag) override;
179 FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView, 179 FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView,
180 CPDFSDK_Annot* pAnnot, 180 CPDFSDK_Annot* pAnnot,
181 FX_DWORD nFlags, 181 FX_DWORD nFlags,
182 const CPDF_Point& point) override; 182 const CFX_FloatPoint& point) override;
183 FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView, 183 FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView,
184 CPDFSDK_Annot* pAnnot, 184 CPDFSDK_Annot* pAnnot,
185 FX_DWORD nFlags, 185 FX_DWORD nFlags,
186 const CPDF_Point& point) override; 186 const CFX_FloatPoint& point) override;
187 FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView, 187 FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView,
188 CPDFSDK_Annot* pAnnot, 188 CPDFSDK_Annot* pAnnot,
189 FX_DWORD nFlags, 189 FX_DWORD nFlags,
190 const CPDF_Point& point) override; 190 const CFX_FloatPoint& point) override;
191 FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView, 191 FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView,
192 CPDFSDK_Annot* pAnnot, 192 CPDFSDK_Annot* pAnnot,
193 FX_DWORD nFlags, 193 FX_DWORD nFlags,
194 const CPDF_Point& point) override; 194 const CFX_FloatPoint& point) override;
195 FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView, 195 FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView,
196 CPDFSDK_Annot* pAnnot, 196 CPDFSDK_Annot* pAnnot,
197 FX_DWORD nFlags, 197 FX_DWORD nFlags,
198 short zDelta, 198 short zDelta,
199 const CPDF_Point& point) override; 199 const CFX_FloatPoint& point) override;
200 FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView, 200 FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView,
201 CPDFSDK_Annot* pAnnot, 201 CPDFSDK_Annot* pAnnot,
202 FX_DWORD nFlags, 202 FX_DWORD nFlags,
203 const CPDF_Point& point) override; 203 const CFX_FloatPoint& point) override;
204 FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView, 204 FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView,
205 CPDFSDK_Annot* pAnnot, 205 CPDFSDK_Annot* pAnnot,
206 FX_DWORD nFlags, 206 FX_DWORD nFlags,
207 const CPDF_Point& point) override; 207 const CFX_FloatPoint& point) override;
208 FX_BOOL OnRButtonDblClk(CPDFSDK_PageView* pPageView, 208 FX_BOOL OnRButtonDblClk(CPDFSDK_PageView* pPageView,
209 CPDFSDK_Annot* pAnnot, 209 CPDFSDK_Annot* pAnnot,
210 FX_DWORD nFlags, 210 FX_DWORD nFlags,
211 const CPDF_Point& point) override { 211 const CFX_FloatPoint& point) override {
212 return FALSE; 212 return FALSE;
213 } 213 }
214 FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, 214 FX_BOOL OnChar(CPDFSDK_Annot* pAnnot,
215 FX_DWORD nChar, 215 FX_DWORD nChar,
216 FX_DWORD nFlags) override; 216 FX_DWORD nFlags) override;
217 FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) override; 217 FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) override;
218 FX_BOOL OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) override; 218 FX_BOOL OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) override;
219 void OnDeSelected(CPDFSDK_Annot* pAnnot) override {} 219 void OnDeSelected(CPDFSDK_Annot* pAnnot) override {}
220 void OnSelected(CPDFSDK_Annot* pAnnot) override {} 220 void OnSelected(CPDFSDK_Annot* pAnnot) override {}
221 FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) override; 221 FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag) override;
(...skipping 29 matching lines...) Expand all
251 virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage) { 251 virtual CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage) {
252 return NULL; 252 return NULL;
253 } 253 }
254 254
255 virtual CPDFSDK_Annot* NewAnnot(IXFA_Widget* pAnnot, CPDFSDK_PageView* pPage); 255 virtual CPDFSDK_Annot* NewAnnot(IXFA_Widget* pAnnot, CPDFSDK_PageView* pPage);
256 256
257 virtual void ReleaseAnnot(CPDFSDK_Annot* pAnnot); 257 virtual void ReleaseAnnot(CPDFSDK_Annot* pAnnot);
258 258
259 virtual void DeleteAnnot(CPDFSDK_Annot* pAnnot) {} 259 virtual void DeleteAnnot(CPDFSDK_Annot* pAnnot) {}
260 260
261 virtual CPDF_Rect GetViewBBox(CPDFSDK_PageView* pPageView, 261 virtual CFX_FloatRect GetViewBBox(CPDFSDK_PageView* pPageView,
262 CPDFSDK_Annot* pAnnot); 262 CPDFSDK_Annot* pAnnot);
263 263
264 virtual FX_BOOL HitTest(CPDFSDK_PageView* pPageView, 264 virtual FX_BOOL HitTest(CPDFSDK_PageView* pPageView,
265 CPDFSDK_Annot* pAnnot, 265 CPDFSDK_Annot* pAnnot,
266 const CPDF_Point& point); 266 const CFX_FloatPoint& point);
267 267
268 virtual void OnDraw(CPDFSDK_PageView* pPageView, 268 virtual void OnDraw(CPDFSDK_PageView* pPageView,
269 CPDFSDK_Annot* pAnnot, 269 CPDFSDK_Annot* pAnnot,
270 CFX_RenderDevice* pDevice, 270 CFX_RenderDevice* pDevice,
271 CFX_Matrix* pUser2Device, 271 CFX_Matrix* pUser2Device,
272 FX_DWORD dwFlags); 272 FX_DWORD dwFlags);
273 273
274 virtual void OnDrawSleep(CPDFSDK_PageView* pPageView, 274 virtual void OnDrawSleep(CPDFSDK_PageView* pPageView,
275 CPDFSDK_Annot* pAnnot, 275 CPDFSDK_Annot* pAnnot,
276 CFX_RenderDevice* pDevice, 276 CFX_RenderDevice* pDevice,
277 CFX_Matrix* pUser2Device, 277 CFX_Matrix* pUser2Device,
278 const CPDF_Rect& rcWindow, 278 const CFX_FloatRect& rcWindow,
279 FX_DWORD dwFlags) {} 279 FX_DWORD dwFlags) {}
280 280
281 virtual void OnCreate(CPDFSDK_Annot* pAnnot) {} 281 virtual void OnCreate(CPDFSDK_Annot* pAnnot) {}
282 282
283 virtual void OnLoad(CPDFSDK_Annot* pAnnot) {} 283 virtual void OnLoad(CPDFSDK_Annot* pAnnot) {}
284 284
285 virtual void OnDelete(CPDFSDK_Annot* pAnnot) {} 285 virtual void OnDelete(CPDFSDK_Annot* pAnnot) {}
286 286
287 virtual void OnRelease(CPDFSDK_Annot* pAnnot) {} 287 virtual void OnRelease(CPDFSDK_Annot* pAnnot) {}
288 288
289 virtual void OnMouseEnter(CPDFSDK_PageView* pPageView, 289 virtual void OnMouseEnter(CPDFSDK_PageView* pPageView,
290 CPDFSDK_Annot* pAnnot, 290 CPDFSDK_Annot* pAnnot,
291 FX_DWORD nFlag); 291 FX_DWORD nFlag);
292 virtual void OnMouseExit(CPDFSDK_PageView* pPageView, 292 virtual void OnMouseExit(CPDFSDK_PageView* pPageView,
293 CPDFSDK_Annot* pAnnot, 293 CPDFSDK_Annot* pAnnot,
294 FX_DWORD nFlag); 294 FX_DWORD nFlag);
295 295
296 virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView, 296 virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView,
297 CPDFSDK_Annot* pAnnot, 297 CPDFSDK_Annot* pAnnot,
298 FX_DWORD nFlags, 298 FX_DWORD nFlags,
299 const CPDF_Point& point); 299 const CFX_FloatPoint& point);
300 virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView, 300 virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView,
301 CPDFSDK_Annot* pAnnot, 301 CPDFSDK_Annot* pAnnot,
302 FX_DWORD nFlags, 302 FX_DWORD nFlags,
303 const CPDF_Point& point); 303 const CFX_FloatPoint& point);
304 virtual FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView, 304 virtual FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView,
305 CPDFSDK_Annot* pAnnot, 305 CPDFSDK_Annot* pAnnot,
306 FX_DWORD nFlags, 306 FX_DWORD nFlags,
307 const CPDF_Point& point); 307 const CFX_FloatPoint& point);
308 virtual FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView, 308 virtual FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView,
309 CPDFSDK_Annot* pAnnot, 309 CPDFSDK_Annot* pAnnot,
310 FX_DWORD nFlags, 310 FX_DWORD nFlags,
311 const CPDF_Point& point); 311 const CFX_FloatPoint& point);
312 virtual FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView, 312 virtual FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView,
313 CPDFSDK_Annot* pAnnot, 313 CPDFSDK_Annot* pAnnot,
314 FX_DWORD nFlags, 314 FX_DWORD nFlags,
315 short zDelta, 315 short zDelta,
316 const CPDF_Point& point); 316 const CFX_FloatPoint& point);
317 virtual FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView, 317 virtual FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView,
318 CPDFSDK_Annot* pAnnot, 318 CPDFSDK_Annot* pAnnot,
319 FX_DWORD nFlags, 319 FX_DWORD nFlags,
320 const CPDF_Point& point); 320 const CFX_FloatPoint& point);
321 virtual FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView, 321 virtual FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView,
322 CPDFSDK_Annot* pAnnot, 322 CPDFSDK_Annot* pAnnot,
323 FX_DWORD nFlags, 323 FX_DWORD nFlags,
324 const CPDF_Point& point); 324 const CFX_FloatPoint& point);
325 virtual FX_BOOL OnRButtonDblClk(CPDFSDK_PageView* pPageView, 325 virtual FX_BOOL OnRButtonDblClk(CPDFSDK_PageView* pPageView,
326 CPDFSDK_Annot* pAnnot, 326 CPDFSDK_Annot* pAnnot,
327 FX_DWORD nFlags, 327 FX_DWORD nFlags,
328 const CPDF_Point& point); 328 const CFX_FloatPoint& point);
329 // by wjm. 329 // by wjm.
330 virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, 330 virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot,
331 FX_DWORD nChar, 331 FX_DWORD nChar,
332 FX_DWORD nFlags); 332 FX_DWORD nFlags);
333 virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag); 333 virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag);
334 virtual FX_BOOL OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag); 334 virtual FX_BOOL OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag);
335 335
336 virtual void OnDeSelected(CPDFSDK_Annot* pAnnot) {} 336 virtual void OnDeSelected(CPDFSDK_Annot* pAnnot) {}
337 virtual void OnSelected(CPDFSDK_Annot* pAnnot) {} 337 virtual void OnSelected(CPDFSDK_Annot* pAnnot) {}
338 338
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 virtual void Annot_OnMouseEnter(CPDFSDK_PageView* pPageView, 383 virtual void Annot_OnMouseEnter(CPDFSDK_PageView* pPageView,
384 CPDFSDK_Annot* pAnnot, 384 CPDFSDK_Annot* pAnnot,
385 FX_DWORD nFlags); 385 FX_DWORD nFlags);
386 virtual void Annot_OnMouseExit(CPDFSDK_PageView* pPageView, 386 virtual void Annot_OnMouseExit(CPDFSDK_PageView* pPageView,
387 CPDFSDK_Annot* pAnnot, 387 CPDFSDK_Annot* pAnnot,
388 FX_DWORD nFlags); 388 FX_DWORD nFlags);
389 389
390 virtual FX_BOOL Annot_OnLButtonDown(CPDFSDK_PageView* pPageView, 390 virtual FX_BOOL Annot_OnLButtonDown(CPDFSDK_PageView* pPageView,
391 CPDFSDK_Annot* pAnnot, 391 CPDFSDK_Annot* pAnnot,
392 FX_DWORD nFlags, 392 FX_DWORD nFlags,
393 const CPDF_Point& point); 393 const CFX_FloatPoint& point);
394 virtual FX_BOOL Annot_OnLButtonUp(CPDFSDK_PageView* pPageView, 394 virtual FX_BOOL Annot_OnLButtonUp(CPDFSDK_PageView* pPageView,
395 CPDFSDK_Annot* pAnnot, 395 CPDFSDK_Annot* pAnnot,
396 FX_DWORD nFlags, 396 FX_DWORD nFlags,
397 const CPDF_Point& point); 397 const CFX_FloatPoint& point);
398 virtual FX_BOOL Annot_OnLButtonDblClk(CPDFSDK_PageView* pPageView, 398 virtual FX_BOOL Annot_OnLButtonDblClk(CPDFSDK_PageView* pPageView,
399 CPDFSDK_Annot* pAnnot, 399 CPDFSDK_Annot* pAnnot,
400 FX_DWORD nFlags, 400 FX_DWORD nFlags,
401 const CPDF_Point& point); 401 const CFX_FloatPoint& point);
402 402
403 virtual FX_BOOL Annot_OnMouseMove(CPDFSDK_PageView* pPageView, 403 virtual FX_BOOL Annot_OnMouseMove(CPDFSDK_PageView* pPageView,
404 CPDFSDK_Annot* pAnnot, 404 CPDFSDK_Annot* pAnnot,
405 FX_DWORD nFlags, 405 FX_DWORD nFlags,
406 const CPDF_Point& point); 406 const CFX_FloatPoint& point);
407 virtual FX_BOOL Annot_OnMouseWheel(CPDFSDK_PageView* pPageView, 407 virtual FX_BOOL Annot_OnMouseWheel(CPDFSDK_PageView* pPageView,
408 CPDFSDK_Annot* pAnnot, 408 CPDFSDK_Annot* pAnnot,
409 FX_DWORD nFlags, 409 FX_DWORD nFlags,
410 short zDelta, 410 short zDelta,
411 const CPDF_Point& point); 411 const CFX_FloatPoint& point);
412 virtual FX_BOOL Annot_OnRButtonDown(CPDFSDK_PageView* pPageView, 412 virtual FX_BOOL Annot_OnRButtonDown(CPDFSDK_PageView* pPageView,
413 CPDFSDK_Annot* pAnnot, 413 CPDFSDK_Annot* pAnnot,
414 FX_DWORD nFlags, 414 FX_DWORD nFlags,
415 const CPDF_Point& point); 415 const CFX_FloatPoint& point);
416 virtual FX_BOOL Annot_OnRButtonUp(CPDFSDK_PageView* pPageView, 416 virtual FX_BOOL Annot_OnRButtonUp(CPDFSDK_PageView* pPageView,
417 CPDFSDK_Annot* pAnnot, 417 CPDFSDK_Annot* pAnnot,
418 FX_DWORD nFlags, 418 FX_DWORD nFlags,
419 const CPDF_Point& point); 419 const CFX_FloatPoint& point);
420 420
421 virtual FX_BOOL Annot_OnChar(CPDFSDK_Annot* pAnnot, 421 virtual FX_BOOL Annot_OnChar(CPDFSDK_Annot* pAnnot,
422 FX_DWORD nChar, 422 FX_DWORD nChar,
423 FX_DWORD nFlags); 423 FX_DWORD nFlags);
424 virtual FX_BOOL Annot_OnKeyDown(CPDFSDK_Annot* pAnnot, 424 virtual FX_BOOL Annot_OnKeyDown(CPDFSDK_Annot* pAnnot,
425 int nKeyCode, 425 int nKeyCode,
426 int nFlag); 426 int nFlag);
427 virtual FX_BOOL Annot_OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag); 427 virtual FX_BOOL Annot_OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag);
428 428
429 virtual FX_BOOL Annot_OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag); 429 virtual FX_BOOL Annot_OnSetFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag);
430 virtual FX_BOOL Annot_OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag); 430 virtual FX_BOOL Annot_OnKillFocus(CPDFSDK_Annot* pAnnot, FX_DWORD nFlag);
431 431
432 #ifdef PDF_ENABLE_XFA 432 #ifdef PDF_ENABLE_XFA
433 virtual FX_BOOL Annot_OnChangeFocus(CPDFSDK_Annot* pSetAnnot, 433 virtual FX_BOOL Annot_OnChangeFocus(CPDFSDK_Annot* pSetAnnot,
434 CPDFSDK_Annot* pKillAnnot); 434 CPDFSDK_Annot* pKillAnnot);
435 #endif // PDF_ENABLE_XFA 435 #endif // PDF_ENABLE_XFA
436 436
437 virtual CPDF_Rect Annot_OnGetViewBBox(CPDFSDK_PageView* pPageView, 437 virtual CFX_FloatRect Annot_OnGetViewBBox(CPDFSDK_PageView* pPageView,
438 CPDFSDK_Annot* pAnnot); 438 CPDFSDK_Annot* pAnnot);
439 virtual FX_BOOL Annot_OnHitTest(CPDFSDK_PageView* pPageView, 439 virtual FX_BOOL Annot_OnHitTest(CPDFSDK_PageView* pPageView,
440 CPDFSDK_Annot* pAnnot, 440 CPDFSDK_Annot* pAnnot,
441 const CPDF_Point& point); 441 const CFX_FloatPoint& point);
442 442
443 private: 443 private:
444 IPDFSDK_AnnotHandler* GetAnnotHandler(const CFX_ByteString& sType) const; 444 IPDFSDK_AnnotHandler* GetAnnotHandler(const CFX_ByteString& sType) const;
445 CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pSDKAnnot, FX_BOOL bNext); 445 CPDFSDK_Annot* GetNextAnnot(CPDFSDK_Annot* pSDKAnnot, FX_BOOL bNext);
446 446
447 private: 447 private:
448 CBA_AnnotHandlerArray m_Handlers; 448 CBA_AnnotHandlerArray m_Handlers;
449 std::map<CFX_ByteString, IPDFSDK_AnnotHandler*> m_mapType2Handler; 449 std::map<CFX_ByteString, IPDFSDK_AnnotHandler*> m_mapType2Handler;
450 CPDFDoc_Environment* m_pApp; 450 CPDFDoc_Environment* m_pApp;
451 }; 451 };
452 452
453 class CPDFSDK_AnnotIterator { 453 class CPDFSDK_AnnotIterator {
454 public: 454 public:
455 CPDFSDK_AnnotIterator(CPDFSDK_PageView* pPageView, bool bReverse); 455 CPDFSDK_AnnotIterator(CPDFSDK_PageView* pPageView, bool bReverse);
456 ~CPDFSDK_AnnotIterator(); 456 ~CPDFSDK_AnnotIterator();
457 457
458 CPDFSDK_Annot* Next(); 458 CPDFSDK_Annot* Next();
459 459
460 private: 460 private:
461 CPDFSDK_Annot* NextAnnot(); 461 CPDFSDK_Annot* NextAnnot();
462 CPDFSDK_Annot* PrevAnnot(); 462 CPDFSDK_Annot* PrevAnnot();
463 463
464 std::vector<CPDFSDK_Annot*> m_iteratorAnnotList; 464 std::vector<CPDFSDK_Annot*> m_iteratorAnnotList;
465 const bool m_bReverse; 465 const bool m_bReverse;
466 size_t m_pos; 466 size_t m_pos;
467 }; 467 };
468 468
469 #endif // FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_ 469 #endif // FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_
OLDNEW
« no previous file with comments | « fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h ('k') | fpdfsdk/include/fsdk_baseannot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698