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

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

Issue 1519693002: Merge to XFA: Remove CFX_AffineMatrix/CPDF_Matrix (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: XFA-specific changes Created 5 years 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 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 CPDF_Matrix; 25 class CFX_Matrix;
26 class CPDF_Point; 26 class CPDF_Point;
27 class CPDF_Rect; 27 class CPDF_Rect;
28 28
29 class IPDFSDK_AnnotHandler { 29 class IPDFSDK_AnnotHandler {
30 public: 30 public:
31 virtual ~IPDFSDK_AnnotHandler() {} 31 virtual ~IPDFSDK_AnnotHandler() {}
32 32
33 virtual CFX_ByteString GetType() = 0; 33 virtual CFX_ByteString GetType() = 0;
34 34
35 virtual CFX_ByteString GetName() = 0; 35 virtual CFX_ByteString GetName() = 0;
(...skipping 15 matching lines...) Expand all
51 virtual CPDF_Rect GetViewBBox(CPDFSDK_PageView* pPageView, 51 virtual CPDF_Rect GetViewBBox(CPDFSDK_PageView* pPageView,
52 CPDFSDK_Annot* pAnnot) = 0; 52 CPDFSDK_Annot* pAnnot) = 0;
53 53
54 virtual FX_BOOL HitTest(CPDFSDK_PageView* pPageView, 54 virtual FX_BOOL HitTest(CPDFSDK_PageView* pPageView,
55 CPDFSDK_Annot* pAnnot, 55 CPDFSDK_Annot* pAnnot,
56 const CPDF_Point& point) = 0; 56 const CPDF_Point& point) = 0;
57 57
58 virtual void OnDraw(CPDFSDK_PageView* pPageView, 58 virtual void OnDraw(CPDFSDK_PageView* pPageView,
59 CPDFSDK_Annot* pAnnot, 59 CPDFSDK_Annot* pAnnot,
60 CFX_RenderDevice* pDevice, 60 CFX_RenderDevice* pDevice,
61 CPDF_Matrix* pUser2Device, 61 CFX_Matrix* pUser2Device,
62 FX_DWORD dwFlags) = 0; 62 FX_DWORD dwFlags) = 0;
63 63
64 virtual void OnDrawSleep(CPDFSDK_PageView* pPageView, 64 virtual void OnDrawSleep(CPDFSDK_PageView* pPageView,
65 CPDFSDK_Annot* pAnnot, 65 CPDFSDK_Annot* pAnnot,
66 CFX_RenderDevice* pDevice, 66 CFX_RenderDevice* pDevice,
67 CPDF_Matrix* pUser2Device, 67 CFX_Matrix* pUser2Device,
68 const CPDF_Rect& rcWindow, 68 const CPDF_Rect& rcWindow,
69 FX_DWORD dwFlags) = 0; 69 FX_DWORD dwFlags) = 0;
70 70
71 virtual void OnCreate(CPDFSDK_Annot* pAnnot) = 0; 71 virtual void OnCreate(CPDFSDK_Annot* pAnnot) = 0;
72 72
73 virtual void OnLoad(CPDFSDK_Annot* pAnnot) = 0; 73 virtual void OnLoad(CPDFSDK_Annot* pAnnot) = 0;
74 74
75 virtual void OnDelete(CPDFSDK_Annot* pAnnot) = 0; 75 virtual void OnDelete(CPDFSDK_Annot* pAnnot) = 0;
76 76
77 virtual void OnRelease(CPDFSDK_Annot* pAnnot) = 0; 77 virtual void OnRelease(CPDFSDK_Annot* pAnnot) = 0;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 void ReleaseAnnot(CPDFSDK_Annot* pAnnot) override; 152 void ReleaseAnnot(CPDFSDK_Annot* pAnnot) override;
153 void DeleteAnnot(CPDFSDK_Annot* pAnnot) override {} 153 void DeleteAnnot(CPDFSDK_Annot* pAnnot) override {}
154 CPDF_Rect GetViewBBox(CPDFSDK_PageView* pPageView, 154 CPDF_Rect GetViewBBox(CPDFSDK_PageView* pPageView,
155 CPDFSDK_Annot* pAnnot) override; 155 CPDFSDK_Annot* pAnnot) override;
156 FX_BOOL HitTest(CPDFSDK_PageView* pPageView, 156 FX_BOOL HitTest(CPDFSDK_PageView* pPageView,
157 CPDFSDK_Annot* pAnnot, 157 CPDFSDK_Annot* pAnnot,
158 const CPDF_Point& point) override; 158 const CPDF_Point& point) override;
159 void OnDraw(CPDFSDK_PageView* pPageView, 159 void OnDraw(CPDFSDK_PageView* pPageView,
160 CPDFSDK_Annot* pAnnot, 160 CPDFSDK_Annot* pAnnot,
161 CFX_RenderDevice* pDevice, 161 CFX_RenderDevice* pDevice,
162 CPDF_Matrix* pUser2Device, 162 CFX_Matrix* pUser2Device,
163 FX_DWORD dwFlags) override; 163 FX_DWORD dwFlags) override;
164 void OnDrawSleep(CPDFSDK_PageView* pPageView, 164 void OnDrawSleep(CPDFSDK_PageView* pPageView,
165 CPDFSDK_Annot* pAnnot, 165 CPDFSDK_Annot* pAnnot,
166 CFX_RenderDevice* pDevice, 166 CFX_RenderDevice* pDevice,
167 CPDF_Matrix* pUser2Device, 167 CFX_Matrix* pUser2Device,
168 const CPDF_Rect& rcWindow, 168 const CPDF_Rect& rcWindow,
169 FX_DWORD dwFlags) override {} 169 FX_DWORD dwFlags) override {}
170 void OnCreate(CPDFSDK_Annot* pAnnot) override; 170 void OnCreate(CPDFSDK_Annot* pAnnot) override;
171 void OnLoad(CPDFSDK_Annot* pAnnot) override; 171 void OnLoad(CPDFSDK_Annot* pAnnot) override;
172 void OnDelete(CPDFSDK_Annot* pAnnot) override {} 172 void OnDelete(CPDFSDK_Annot* pAnnot) override {}
173 void OnRelease(CPDFSDK_Annot* pAnnot) override {} 173 void OnRelease(CPDFSDK_Annot* pAnnot) override {}
174 void OnMouseEnter(CPDFSDK_PageView* pPageView, 174 void OnMouseEnter(CPDFSDK_PageView* pPageView,
175 CPDFSDK_Annot* pAnnot, 175 CPDFSDK_Annot* pAnnot,
176 FX_DWORD nFlag) override; 176 FX_DWORD nFlag) override;
177 void OnMouseExit(CPDFSDK_PageView* pPageView, 177 void OnMouseExit(CPDFSDK_PageView* pPageView,
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 virtual CPDF_Rect GetViewBBox(CPDFSDK_PageView* pPageView, 262 virtual CPDF_Rect GetViewBBox(CPDFSDK_PageView* pPageView,
263 CPDFSDK_Annot* pAnnot); 263 CPDFSDK_Annot* pAnnot);
264 264
265 virtual FX_BOOL HitTest(CPDFSDK_PageView* pPageView, 265 virtual FX_BOOL HitTest(CPDFSDK_PageView* pPageView,
266 CPDFSDK_Annot* pAnnot, 266 CPDFSDK_Annot* pAnnot,
267 const CPDF_Point& point); 267 const CPDF_Point& point);
268 268
269 virtual void OnDraw(CPDFSDK_PageView* pPageView, 269 virtual void OnDraw(CPDFSDK_PageView* pPageView,
270 CPDFSDK_Annot* pAnnot, 270 CPDFSDK_Annot* pAnnot,
271 CFX_RenderDevice* pDevice, 271 CFX_RenderDevice* pDevice,
272 CPDF_Matrix* pUser2Device, 272 CFX_Matrix* pUser2Device,
273 FX_DWORD dwFlags); 273 FX_DWORD dwFlags);
274 274
275 virtual void OnDrawSleep(CPDFSDK_PageView* pPageView, 275 virtual void OnDrawSleep(CPDFSDK_PageView* pPageView,
276 CPDFSDK_Annot* pAnnot, 276 CPDFSDK_Annot* pAnnot,
277 CFX_RenderDevice* pDevice, 277 CFX_RenderDevice* pDevice,
278 CPDF_Matrix* pUser2Device, 278 CFX_Matrix* pUser2Device,
279 const CPDF_Rect& rcWindow, 279 const CPDF_Rect& rcWindow,
280 FX_DWORD dwFlags) {} 280 FX_DWORD dwFlags) {}
281 281
282 virtual void OnCreate(CPDFSDK_Annot* pAnnot) {} 282 virtual void OnCreate(CPDFSDK_Annot* pAnnot) {}
283 283
284 virtual void OnLoad(CPDFSDK_Annot* pAnnot) {} 284 virtual void OnLoad(CPDFSDK_Annot* pAnnot) {}
285 285
286 virtual void OnDelete(CPDFSDK_Annot* pAnnot) {} 286 virtual void OnDelete(CPDFSDK_Annot* pAnnot) {}
287 287
288 virtual void OnRelease(CPDFSDK_Annot* pAnnot) {} 288 virtual void OnRelease(CPDFSDK_Annot* pAnnot) {}
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 virtual void ReleaseAnnot(CPDFSDK_Annot* pAnnot); 371 virtual void ReleaseAnnot(CPDFSDK_Annot* pAnnot);
372 372
373 virtual void Annot_OnCreate(CPDFSDK_Annot* pAnnot); 373 virtual void Annot_OnCreate(CPDFSDK_Annot* pAnnot);
374 virtual void Annot_OnLoad(CPDFSDK_Annot* pAnnot); 374 virtual void Annot_OnLoad(CPDFSDK_Annot* pAnnot);
375 375
376 public: 376 public:
377 IPDFSDK_AnnotHandler* GetAnnotHandler(CPDFSDK_Annot* pAnnot) const; 377 IPDFSDK_AnnotHandler* GetAnnotHandler(CPDFSDK_Annot* pAnnot) const;
378 virtual void Annot_OnDraw(CPDFSDK_PageView* pPageView, 378 virtual void Annot_OnDraw(CPDFSDK_PageView* pPageView,
379 CPDFSDK_Annot* pAnnot, 379 CPDFSDK_Annot* pAnnot,
380 CFX_RenderDevice* pDevice, 380 CFX_RenderDevice* pDevice,
381 CPDF_Matrix* pUser2Device, 381 CFX_Matrix* pUser2Device,
382 FX_DWORD dwFlags); 382 FX_DWORD dwFlags);
383 383
384 virtual void Annot_OnMouseEnter(CPDFSDK_PageView* pPageView, 384 virtual void Annot_OnMouseEnter(CPDFSDK_PageView* pPageView,
385 CPDFSDK_Annot* pAnnot, 385 CPDFSDK_Annot* pAnnot,
386 FX_DWORD nFlags); 386 FX_DWORD nFlags);
387 virtual void Annot_OnMouseExit(CPDFSDK_PageView* pPageView, 387 virtual void Annot_OnMouseExit(CPDFSDK_PageView* pPageView,
388 CPDFSDK_Annot* pAnnot, 388 CPDFSDK_Annot* pAnnot,
389 FX_DWORD nFlags); 389 FX_DWORD nFlags);
390 390
391 virtual FX_BOOL Annot_OnLButtonDown(CPDFSDK_PageView* pPageView, 391 virtual FX_BOOL Annot_OnLButtonDown(CPDFSDK_PageView* pPageView,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 private: 461 private:
462 CPDFSDK_Annot* NextAnnot(); 462 CPDFSDK_Annot* NextAnnot();
463 CPDFSDK_Annot* PrevAnnot(); 463 CPDFSDK_Annot* PrevAnnot();
464 464
465 std::vector<CPDFSDK_Annot*> m_iteratorAnnotList; 465 std::vector<CPDFSDK_Annot*> m_iteratorAnnotList;
466 const bool m_bReverse; 466 const bool m_bReverse;
467 size_t m_pos; 467 size_t m_pos;
468 }; 468 };
469 469
470 #endif // FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_ 470 #endif // FPDFSDK_INCLUDE_FSDK_ANNOTHANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698