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

Side by Side Diff: fpdfsdk/formfiller/cffl_interactiveformfiller.h

Issue 2372263002: De-virtualize many CFFL_InteractiveFormFiller methods. (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | no next file » | 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_FORMFILLER_CFFL_INTERACTIVEFORMFILLER_H_ 7 #ifndef FPDFSDK_FORMFILLER_CFFL_INTERACTIVEFORMFILLER_H_
8 #define FPDFSDK_FORMFILLER_CFFL_INTERACTIVEFORMFILLER_H_ 8 #define FPDFSDK_FORMFILLER_CFFL_INTERACTIVEFORMFILLER_H_
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 12
13 #include "fpdfsdk/include/fsdk_define.h" 13 #include "fpdfsdk/include/fsdk_define.h"
14 #include "fpdfsdk/pdfwindow/PWL_Edit.h" 14 #include "fpdfsdk/pdfwindow/PWL_Edit.h"
15 15
16 class CFFL_FormFiller; 16 class CFFL_FormFiller;
17 class CPDFSDK_Environment; 17 class CPDFSDK_Environment;
18 class CPDFSDK_Annot; 18 class CPDFSDK_Annot;
19 class CPDFSDK_PageView; 19 class CPDFSDK_PageView;
20 class CPDFSDK_Widget; 20 class CPDFSDK_Widget;
21 21
22 class CFFL_InteractiveFormFiller : public IPWL_Filler_Notify { 22 class CFFL_InteractiveFormFiller : public IPWL_Filler_Notify {
23 public: 23 public:
24 explicit CFFL_InteractiveFormFiller(CPDFSDK_Environment* pEnv); 24 explicit CFFL_InteractiveFormFiller(CPDFSDK_Environment* pEnv);
25 ~CFFL_InteractiveFormFiller() override; 25 ~CFFL_InteractiveFormFiller() override;
26 26
27 virtual FX_BOOL Annot_HitTest(CPDFSDK_PageView* pPageView, 27 FX_BOOL Annot_HitTest(CPDFSDK_PageView* pPageView,
28 CPDFSDK_Annot* pAnnot, 28 CPDFSDK_Annot* pAnnot,
29 CFX_FloatPoint point); 29 CFX_FloatPoint point);
30 virtual FX_RECT GetViewBBox(CPDFSDK_PageView* pPageView, 30 FX_RECT GetViewBBox(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot);
31 CPDFSDK_Annot* pAnnot); 31 void OnDraw(CPDFSDK_PageView* pPageView,
32 virtual void OnDraw(CPDFSDK_PageView* pPageView, 32 CPDFSDK_Annot* pAnnot,
33 CFX_RenderDevice* pDevice,
34 CFX_Matrix* pUser2Device);
35
36 void OnCreate(CPDFSDK_Annot* pAnnot);
37 void OnLoad(CPDFSDK_Annot* pAnnot);
38 void OnDelete(CPDFSDK_Annot* pAnnot);
39
40 void OnMouseEnter(CPDFSDK_PageView* pPageView,
41 CPDFSDK_Annot* pAnnot,
42 uint32_t nFlag);
43 void OnMouseExit(CPDFSDK_PageView* pPageView,
44 CPDFSDK_Annot* pAnnot,
45 uint32_t nFlag);
46
47 FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView,
48 CPDFSDK_Annot* pAnnot,
49 uint32_t nFlags,
50 const CFX_FloatPoint& point);
51 FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView,
33 CPDFSDK_Annot* pAnnot, 52 CPDFSDK_Annot* pAnnot,
34 CFX_RenderDevice* pDevice, 53 uint32_t nFlags,
35 CFX_Matrix* pUser2Device); 54 const CFX_FloatPoint& point);
55 FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView,
56 CPDFSDK_Annot* pAnnot,
57 uint32_t nFlags,
58 const CFX_FloatPoint& point);
59 FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView,
60 CPDFSDK_Annot* pAnnot,
61 uint32_t nFlags,
62 const CFX_FloatPoint& point);
63 FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView,
64 CPDFSDK_Annot* pAnnot,
65 uint32_t nFlags,
66 short zDelta,
67 const CFX_FloatPoint& point);
68 FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView,
69 CPDFSDK_Annot* pAnnot,
70 uint32_t nFlags,
71 const CFX_FloatPoint& point);
72 FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView,
73 CPDFSDK_Annot* pAnnot,
74 uint32_t nFlags,
75 const CFX_FloatPoint& point);
36 76
37 virtual void OnCreate(CPDFSDK_Annot* pAnnot); 77 FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, uint32_t nKeyCode, uint32_t nFlags);
38 virtual void OnLoad(CPDFSDK_Annot* pAnnot); 78 FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, uint32_t nChar, uint32_t nFlags);
39 virtual void OnDelete(CPDFSDK_Annot* pAnnot);
40 79
41 virtual void OnMouseEnter(CPDFSDK_PageView* pPageView, 80 FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag);
42 CPDFSDK_Annot* pAnnot, 81 FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag);
43 uint32_t nFlag);
44 virtual void OnMouseExit(CPDFSDK_PageView* pPageView,
45 CPDFSDK_Annot* pAnnot,
46 uint32_t nFlag);
47
48 virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView,
49 CPDFSDK_Annot* pAnnot,
50 uint32_t nFlags,
51 const CFX_FloatPoint& point);
52 virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView,
53 CPDFSDK_Annot* pAnnot,
54 uint32_t nFlags,
55 const CFX_FloatPoint& point);
56 virtual FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView,
57 CPDFSDK_Annot* pAnnot,
58 uint32_t nFlags,
59 const CFX_FloatPoint& point);
60 virtual FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView,
61 CPDFSDK_Annot* pAnnot,
62 uint32_t nFlags,
63 const CFX_FloatPoint& point);
64 virtual FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView,
65 CPDFSDK_Annot* pAnnot,
66 uint32_t nFlags,
67 short zDelta,
68 const CFX_FloatPoint& point);
69 virtual FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView,
70 CPDFSDK_Annot* pAnnot,
71 uint32_t nFlags,
72 const CFX_FloatPoint& point);
73 virtual FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView,
74 CPDFSDK_Annot* pAnnot,
75 uint32_t nFlags,
76 const CFX_FloatPoint& point);
77
78 virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot,
79 uint32_t nKeyCode,
80 uint32_t nFlags);
81 virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot,
82 uint32_t nChar,
83 uint32_t nFlags);
84
85 virtual FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag);
86 virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag);
87 82
88 CFFL_FormFiller* GetFormFiller(CPDFSDK_Annot* pAnnot, FX_BOOL bRegister); 83 CFFL_FormFiller* GetFormFiller(CPDFSDK_Annot* pAnnot, FX_BOOL bRegister);
89 void RemoveFormFiller(CPDFSDK_Annot* pAnnot); 84 void RemoveFormFiller(CPDFSDK_Annot* pAnnot);
90 85
91 static FX_BOOL IsVisible(CPDFSDK_Widget* pWidget); 86 static FX_BOOL IsVisible(CPDFSDK_Widget* pWidget);
92 static FX_BOOL IsReadOnly(CPDFSDK_Widget* pWidget); 87 static FX_BOOL IsReadOnly(CPDFSDK_Widget* pWidget);
93 static FX_BOOL IsFillingAllowed(CPDFSDK_Widget* pWidget); 88 static FX_BOOL IsFillingAllowed(CPDFSDK_Widget* pWidget);
94 static FX_BOOL IsValidAnnot(CPDFSDK_PageView* pPageView, 89 static FX_BOOL IsValidAnnot(CPDFSDK_PageView* pPageView,
95 CPDFSDK_Annot* pAnnot); 90 CPDFSDK_Annot* pAnnot);
96 91
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 175
181 class CFFL_PrivateData { 176 class CFFL_PrivateData {
182 public: 177 public:
183 CPDFSDK_Widget* pWidget; 178 CPDFSDK_Widget* pWidget;
184 CPDFSDK_PageView* pPageView; 179 CPDFSDK_PageView* pPageView;
185 int nWidgetAge; 180 int nWidgetAge;
186 int nValueAge; 181 int nValueAge;
187 }; 182 };
188 183
189 #endif // FPDFSDK_FORMFILLER_CFFL_INTERACTIVEFORMFILLER_H_ 184 #endif // FPDFSDK_FORMFILLER_CFFL_INTERACTIVEFORMFILLER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698