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

Side by Side Diff: fpdfsdk/cpdfsdk_xfawidgethandler.h

Issue 2453683011: Remove FX_BOOL from fpdfsdk. (Closed)
Patch Set: Regenerate patch after rebase. Created 4 years, 1 month 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/cpdfsdk_xfawidget.cpp ('k') | fpdfsdk/cpdfsdk_xfawidgethandler.cpp » ('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 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_CPDFSDK_XFAWIDGETHANDLER_H_ 7 #ifndef FPDFSDK_CPDFSDK_XFAWIDGETHANDLER_H_
8 #define FPDFSDK_CPDFSDK_XFAWIDGETHANDLER_H_ 8 #define FPDFSDK_CPDFSDK_XFAWIDGETHANDLER_H_
9 9
10 #include "core/fxcrt/fx_basic.h" 10 #include "core/fxcrt/fx_basic.h"
11 #include "core/fxcrt/fx_coordinates.h" 11 #include "core/fxcrt/fx_coordinates.h"
12 #include "fpdfsdk/ipdfsdk_annothandler.h" 12 #include "fpdfsdk/ipdfsdk_annothandler.h"
13 13
14 class CFX_Matrix; 14 class CFX_Matrix;
15 class CFX_RenderDevice; 15 class CFX_RenderDevice;
16 class CPDF_Annot; 16 class CPDF_Annot;
17 class CPDFSDK_FormFillEnvironment; 17 class CPDFSDK_FormFillEnvironment;
18 class CPDFSDK_Annot; 18 class CPDFSDK_Annot;
19 class CPDFSDK_PageView; 19 class CPDFSDK_PageView;
20 class CXFA_FFWidget; 20 class CXFA_FFWidget;
21 class CXFA_FFWidgetHandler; 21 class CXFA_FFWidgetHandler;
22 22
23 class CPDFSDK_XFAWidgetHandler : public IPDFSDK_AnnotHandler { 23 class CPDFSDK_XFAWidgetHandler : public IPDFSDK_AnnotHandler {
24 public: 24 public:
25 explicit CPDFSDK_XFAWidgetHandler(CPDFSDK_FormFillEnvironment* pApp); 25 explicit CPDFSDK_XFAWidgetHandler(CPDFSDK_FormFillEnvironment* pApp);
26 ~CPDFSDK_XFAWidgetHandler() override; 26 ~CPDFSDK_XFAWidgetHandler() override;
27 27
28 FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot) override; 28 bool CanAnswer(CPDFSDK_Annot* pAnnot) override;
29 CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage) override; 29 CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage) override;
30 CPDFSDK_Annot* NewAnnot(CXFA_FFWidget* pAnnot, 30 CPDFSDK_Annot* NewAnnot(CXFA_FFWidget* pAnnot,
31 CPDFSDK_PageView* pPage) override; 31 CPDFSDK_PageView* pPage) override;
32 void ReleaseAnnot(CPDFSDK_Annot* pAnnot) override; 32 void ReleaseAnnot(CPDFSDK_Annot* pAnnot) override;
33 CFX_FloatRect GetViewBBox(CPDFSDK_PageView* pPageView, 33 CFX_FloatRect GetViewBBox(CPDFSDK_PageView* pPageView,
34 CPDFSDK_Annot* pAnnot) override; 34 CPDFSDK_Annot* pAnnot) override;
35 FX_BOOL HitTest(CPDFSDK_PageView* pPageView, 35 bool HitTest(CPDFSDK_PageView* pPageView,
36 CPDFSDK_Annot* pAnnot, 36 CPDFSDK_Annot* pAnnot,
37 const CFX_FloatPoint& point) override; 37 const CFX_FloatPoint& point) override;
38 void OnDraw(CPDFSDK_PageView* pPageView, 38 void OnDraw(CPDFSDK_PageView* pPageView,
39 CPDFSDK_Annot* pAnnot, 39 CPDFSDK_Annot* pAnnot,
40 CFX_RenderDevice* pDevice, 40 CFX_RenderDevice* pDevice,
41 CFX_Matrix* pUser2Device, 41 CFX_Matrix* pUser2Device,
42 bool bDrawAnnots) override; 42 bool bDrawAnnots) override;
43 void OnLoad(CPDFSDK_Annot* pAnnot) override; 43 void OnLoad(CPDFSDK_Annot* pAnnot) override;
44 void OnMouseEnter(CPDFSDK_PageView* pPageView, 44 void OnMouseEnter(CPDFSDK_PageView* pPageView,
45 CPDFSDK_Annot::ObservedPtr* pAnnot, 45 CPDFSDK_Annot::ObservedPtr* pAnnot,
46 uint32_t nFlag) override; 46 uint32_t nFlag) override;
47 void OnMouseExit(CPDFSDK_PageView* pPageView, 47 void OnMouseExit(CPDFSDK_PageView* pPageView,
48 CPDFSDK_Annot::ObservedPtr* pAnnot, 48 CPDFSDK_Annot::ObservedPtr* pAnnot,
49 uint32_t nFlag) override; 49 uint32_t nFlag) override;
50 FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView, 50 bool OnLButtonDown(CPDFSDK_PageView* pPageView,
51 CPDFSDK_Annot::ObservedPtr* pAnnot, 51 CPDFSDK_Annot::ObservedPtr* pAnnot,
52 uint32_t nFlags, 52 uint32_t nFlags,
53 const CFX_FloatPoint& point) override; 53 const CFX_FloatPoint& point) override;
54 FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView, 54 bool OnLButtonUp(CPDFSDK_PageView* pPageView,
55 CPDFSDK_Annot::ObservedPtr* pAnnot, 55 CPDFSDK_Annot::ObservedPtr* pAnnot,
56 uint32_t nFlags, 56 uint32_t nFlags,
57 const CFX_FloatPoint& point) override; 57 const CFX_FloatPoint& point) override;
58 FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView, 58 bool OnLButtonDblClk(CPDFSDK_PageView* pPageView,
59 CPDFSDK_Annot::ObservedPtr* pAnnot,
60 uint32_t nFlags,
61 const CFX_FloatPoint& point) override;
62 FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView,
63 CPDFSDK_Annot::ObservedPtr* pAnnot,
64 uint32_t nFlags,
65 const CFX_FloatPoint& point) override;
66 FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView,
67 CPDFSDK_Annot::ObservedPtr* pAnnot, 59 CPDFSDK_Annot::ObservedPtr* pAnnot,
68 uint32_t nFlags, 60 uint32_t nFlags,
69 short zDelta,
70 const CFX_FloatPoint& point) override; 61 const CFX_FloatPoint& point) override;
71 FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView, 62 bool OnMouseMove(CPDFSDK_PageView* pPageView,
72 CPDFSDK_Annot::ObservedPtr* pAnnot, 63 CPDFSDK_Annot::ObservedPtr* pAnnot,
73 uint32_t nFlags, 64 uint32_t nFlags,
74 const CFX_FloatPoint& point) override; 65 const CFX_FloatPoint& point) override;
75 FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView, 66 bool OnMouseWheel(CPDFSDK_PageView* pPageView,
76 CPDFSDK_Annot::ObservedPtr* pAnnot, 67 CPDFSDK_Annot::ObservedPtr* pAnnot,
77 uint32_t nFlags, 68 uint32_t nFlags,
78 const CFX_FloatPoint& point) override; 69 short zDelta,
79 FX_BOOL OnRButtonDblClk(CPDFSDK_PageView* pPageView, 70 const CFX_FloatPoint& point) override;
80 CPDFSDK_Annot::ObservedPtr* pAnnot, 71 bool OnRButtonDown(CPDFSDK_PageView* pPageView,
81 uint32_t nFlags, 72 CPDFSDK_Annot::ObservedPtr* pAnnot,
82 const CFX_FloatPoint& point) override; 73 uint32_t nFlags,
83 FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, 74 const CFX_FloatPoint& point) override;
84 uint32_t nChar, 75 bool OnRButtonUp(CPDFSDK_PageView* pPageView,
85 uint32_t nFlags) override; 76 CPDFSDK_Annot::ObservedPtr* pAnnot,
86 FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) override; 77 uint32_t nFlags,
87 FX_BOOL OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) override; 78 const CFX_FloatPoint& point) override;
88 FX_BOOL OnSetFocus(CPDFSDK_Annot::ObservedPtr* pAnnot, 79 bool OnRButtonDblClk(CPDFSDK_PageView* pPageView,
89 uint32_t nFlag) override; 80 CPDFSDK_Annot::ObservedPtr* pAnnot,
90 FX_BOOL OnKillFocus(CPDFSDK_Annot::ObservedPtr* pAnnot, 81 uint32_t nFlags,
91 uint32_t nFlag) override; 82 const CFX_FloatPoint& point) override;
92 FX_BOOL OnXFAChangedFocus(CPDFSDK_Annot::ObservedPtr* pOldAnnot, 83 bool OnChar(CPDFSDK_Annot* pAnnot, uint32_t nChar, uint32_t nFlags) override;
93 CPDFSDK_Annot::ObservedPtr* pNewAnnot) override; 84 bool OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) override;
85 bool OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) override;
86 bool OnSetFocus(CPDFSDK_Annot::ObservedPtr* pAnnot, uint32_t nFlag) override;
87 bool OnKillFocus(CPDFSDK_Annot::ObservedPtr* pAnnot, uint32_t nFlag) override;
88 bool OnXFAChangedFocus(CPDFSDK_Annot::ObservedPtr* pOldAnnot,
89 CPDFSDK_Annot::ObservedPtr* pNewAnnot) override;
94 90
95 private: 91 private:
96 CXFA_FFWidgetHandler* GetXFAWidgetHandler(CPDFSDK_Annot* pAnnot); 92 CXFA_FFWidgetHandler* GetXFAWidgetHandler(CPDFSDK_Annot* pAnnot);
97 uint32_t GetFWLFlags(uint32_t dwFlag); 93 uint32_t GetFWLFlags(uint32_t dwFlag);
98 94
99 CPDFSDK_FormFillEnvironment* m_pFormFillEnv; 95 CPDFSDK_FormFillEnvironment* m_pFormFillEnv;
100 }; 96 };
101 97
102 #endif // FPDFSDK_CPDFSDK_XFAWIDGETHANDLER_H_ 98 #endif // FPDFSDK_CPDFSDK_XFAWIDGETHANDLER_H_
OLDNEW
« no previous file with comments | « fpdfsdk/cpdfsdk_xfawidget.cpp ('k') | fpdfsdk/cpdfsdk_xfawidgethandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698