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

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

Issue 2384503003: Move fpdfsdk/include to fpdfsdk (Closed)
Patch Set: Rebase to master 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 | « fpdfsdk/include/cpdfsdk_widget.h ('k') | fpdfsdk/include/cpdfsdk_xfawidget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef FPDFSDK_INCLUDE_CPDFSDK_WIDGETHANDLER_H_
8 #define FPDFSDK_INCLUDE_CPDFSDK_WIDGETHANDLER_H_
9
10 #include "core/fxcrt/fx_basic.h"
11 #include "core/fxcrt/fx_coordinates.h"
12 #include "fpdfsdk/include/ipdfsdk_annothandler.h"
13
14 class CFFL_InteractiveFormFiller;
15 class CFX_Matrix;
16 class CFX_RenderDevice;
17 class CPDF_Annot;
18 class CPDFSDK_Annot;
19 class CPDFSDK_Environment;
20 class CPDFSDK_PageView;
21
22 #ifdef PDF_ENABLE_XFA
23 class CXFA_FFWidget;
24 #endif // PDF_ENABLE_XFA
25
26 class CPDFSDK_WidgetHandler : public IPDFSDK_AnnotHandler {
27 public:
28 explicit CPDFSDK_WidgetHandler(CPDFSDK_Environment* pApp);
29 ~CPDFSDK_WidgetHandler() override;
30
31 FX_BOOL CanAnswer(CPDFSDK_Annot* pAnnot) override;
32 CPDFSDK_Annot* NewAnnot(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPage) override;
33 #ifdef PDF_ENABLE_XFA
34 CPDFSDK_Annot* NewAnnot(CXFA_FFWidget* hWidget,
35 CPDFSDK_PageView* pPage) override;
36 #endif // PDF_ENABLE_XFA
37 void ReleaseAnnot(CPDFSDK_Annot* pAnnot) override;
38 void DeleteAnnot(CPDFSDK_Annot* pAnnot) override;
39 CFX_FloatRect GetViewBBox(CPDFSDK_PageView* pPageView,
40 CPDFSDK_Annot* pAnnot) override;
41 FX_BOOL HitTest(CPDFSDK_PageView* pPageView,
42 CPDFSDK_Annot* pAnnot,
43 const CFX_FloatPoint& point) override;
44 void OnDraw(CPDFSDK_PageView* pPageView,
45 CPDFSDK_Annot* pAnnot,
46 CFX_RenderDevice* pDevice,
47 CFX_Matrix* pUser2Device,
48 bool bDrawAnnots) override;
49 void OnCreate(CPDFSDK_Annot* pAnnot) override;
50 void OnLoad(CPDFSDK_Annot* pAnnot) override;
51 void OnDelete(CPDFSDK_Annot* pAnnot) override;
52 void OnRelease(CPDFSDK_Annot* pAnnot) override;
53
54 void OnMouseEnter(CPDFSDK_PageView* pPageView,
55 CPDFSDK_Annot::ObservedPtr* pAnnot,
56 uint32_t nFlag) override;
57 void OnMouseExit(CPDFSDK_PageView* pPageView,
58 CPDFSDK_Annot::ObservedPtr* pAnnot,
59 uint32_t nFlag) override;
60 FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView,
61 CPDFSDK_Annot::ObservedPtr* pAnnot,
62 uint32_t nFlags,
63 const CFX_FloatPoint& point) override;
64 FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView,
65 CPDFSDK_Annot::ObservedPtr* pAnnot,
66 uint32_t nFlags,
67 const CFX_FloatPoint& point) override;
68 FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView,
69 CPDFSDK_Annot::ObservedPtr* pAnnot,
70 uint32_t nFlags,
71 const CFX_FloatPoint& point) override;
72 FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView,
73 CPDFSDK_Annot::ObservedPtr* pAnnot,
74 uint32_t nFlags,
75 const CFX_FloatPoint& point) override;
76 FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView,
77 CPDFSDK_Annot::ObservedPtr* pAnnot,
78 uint32_t nFlags,
79 short zDelta,
80 const CFX_FloatPoint& point) override;
81 FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView,
82 CPDFSDK_Annot::ObservedPtr* pAnnot,
83 uint32_t nFlags,
84 const CFX_FloatPoint& point) override;
85 FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView,
86 CPDFSDK_Annot::ObservedPtr* pAnnot,
87 uint32_t nFlags,
88 const CFX_FloatPoint& point) override;
89 FX_BOOL OnRButtonDblClk(CPDFSDK_PageView* pPageView,
90 CPDFSDK_Annot::ObservedPtr* pAnnot,
91 uint32_t nFlags,
92 const CFX_FloatPoint& point) override;
93 FX_BOOL OnChar(CPDFSDK_Annot* pAnnot,
94 uint32_t nChar,
95 uint32_t nFlags) override;
96 FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) override;
97 FX_BOOL OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) override;
98 void OnDeSelected(CPDFSDK_Annot* pAnnot) override {}
99 void OnSelected(CPDFSDK_Annot* pAnnot) override {}
100 FX_BOOL OnSetFocus(CPDFSDK_Annot::ObservedPtr* pAnnot,
101 uint32_t nFlag) override;
102 FX_BOOL OnKillFocus(CPDFSDK_Annot::ObservedPtr* pAnnot,
103 uint32_t nFlag) override;
104 #ifdef PDF_ENABLE_XFA
105 FX_BOOL OnXFAChangedFocus(CPDFSDK_Annot::ObservedPtr* pOldAnnot,
106 CPDFSDK_Annot::ObservedPtr* pNewAnnot) override;
107 #endif // PDF_ENABLE_XFA
108
109 void SetFormFiller(CFFL_InteractiveFormFiller* pFiller) {
110 m_pFormFiller = pFiller;
111 }
112 CFFL_InteractiveFormFiller* GetFormFiller() { return m_pFormFiller; }
113
114 private:
115 CPDFSDK_Environment* m_pEnv;
116 CFFL_InteractiveFormFiller* m_pFormFiller;
117 };
118
119 #endif // FPDFSDK_INCLUDE_CPDFSDK_WIDGETHANDLER_H_
OLDNEW
« no previous file with comments | « fpdfsdk/include/cpdfsdk_widget.h ('k') | fpdfsdk/include/cpdfsdk_xfawidget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698