OLD | NEW |
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_FORMFILLER_FFL_FORMFILLER_H_ | 7 #ifndef FPDFSDK_INCLUDE_FORMFILLER_FFL_FORMFILLER_H_ |
8 #define FPDFSDK_INCLUDE_FORMFILLER_FFL_FORMFILLER_H_ | 8 #define FPDFSDK_INCLUDE_FORMFILLER_FFL_FORMFILLER_H_ |
9 | 9 |
10 #include "FFL_IFormFiller.h" | 10 #include "FFL_IFormFiller.h" |
11 #include "FFL_CBA_Fontmap.h" | 11 #include "FFL_CBA_Fontmap.h" |
12 | 12 |
13 class CPDFDoc_Environment; | 13 class CPDFDoc_Environment; |
14 class CPDFSDK_Annot; | 14 class CPDFSDK_Annot; |
15 class CPDFSDK_Document; | 15 class CPDFSDK_Document; |
16 class CPDFSDK_PageView; | 16 class CPDFSDK_PageView; |
17 class CPDFSDK_Widget; | 17 class CPDFSDK_Widget; |
18 | 18 |
19 class CFFL_FormFiller : public IPWL_Provider, public CPWL_TimerHandler { | 19 class CFFL_FormFiller : public IPWL_Provider, public CPWL_TimerHandler { |
20 public: | 20 public: |
21 CFFL_FormFiller(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot); | 21 CFFL_FormFiller(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot); |
22 ~CFFL_FormFiller() override; | 22 ~CFFL_FormFiller() override; |
23 | 23 |
24 virtual FX_RECT GetViewBBox(CPDFSDK_PageView* pPageView, | 24 virtual FX_RECT GetViewBBox(CPDFSDK_PageView* pPageView, |
25 CPDFSDK_Annot* pAnnot); | 25 CPDFSDK_Annot* pAnnot); |
26 virtual void OnDraw(CPDFSDK_PageView* pPageView, | 26 virtual void OnDraw(CPDFSDK_PageView* pPageView, |
27 CPDFSDK_Annot* pAnnot, | 27 CPDFSDK_Annot* pAnnot, |
28 CFX_RenderDevice* pDevice, | 28 CFX_RenderDevice* pDevice, |
29 CPDF_Matrix* pUser2Device, | 29 CFX_Matrix* pUser2Device, |
30 FX_DWORD dwFlags); | 30 FX_DWORD dwFlags); |
31 virtual void OnDrawDeactive(CPDFSDK_PageView* pPageView, | 31 virtual void OnDrawDeactive(CPDFSDK_PageView* pPageView, |
32 CPDFSDK_Annot* pAnnot, | 32 CPDFSDK_Annot* pAnnot, |
33 CFX_RenderDevice* pDevice, | 33 CFX_RenderDevice* pDevice, |
34 CPDF_Matrix* pUser2Device, | 34 CFX_Matrix* pUser2Device, |
35 FX_DWORD dwFlags); | 35 FX_DWORD dwFlags); |
36 | 36 |
37 virtual void OnCreate(CPDFSDK_Annot* pAnnot); | 37 virtual void OnCreate(CPDFSDK_Annot* pAnnot); |
38 virtual void OnLoad(CPDFSDK_Annot* pAnnot); | 38 virtual void OnLoad(CPDFSDK_Annot* pAnnot); |
39 virtual void OnDelete(CPDFSDK_Annot* pAnnot); | 39 virtual void OnDelete(CPDFSDK_Annot* pAnnot); |
40 | 40 |
41 virtual void OnMouseEnter(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot); | 41 virtual void OnMouseEnter(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot); |
42 virtual void OnMouseExit(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot); | 42 virtual void OnMouseExit(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot); |
43 | 43 |
44 virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView, | 44 virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags); | 77 virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags); |
78 | 78 |
79 void SetFocusForAnnot(CPDFSDK_Annot* pAnnot, FX_UINT nFlag); | 79 void SetFocusForAnnot(CPDFSDK_Annot* pAnnot, FX_UINT nFlag); |
80 void KillFocusForAnnot(CPDFSDK_Annot* pAnnot, FX_UINT nFlag); | 80 void KillFocusForAnnot(CPDFSDK_Annot* pAnnot, FX_UINT nFlag); |
81 | 81 |
82 // CPWL_TimerHandler | 82 // CPWL_TimerHandler |
83 void TimerProc() override; | 83 void TimerProc() override; |
84 IFX_SystemHandler* GetSystemHandler() const override; | 84 IFX_SystemHandler* GetSystemHandler() const override; |
85 | 85 |
86 // IPWL_Provider | 86 // IPWL_Provider |
87 CPDF_Matrix GetWindowMatrix(void* pAttachedData) override; | 87 CFX_Matrix GetWindowMatrix(void* pAttachedData) override; |
88 CFX_WideString LoadPopupMenuString(int nIndex) override; | 88 CFX_WideString LoadPopupMenuString(int nIndex) override; |
89 | 89 |
90 virtual void GetActionData(CPDFSDK_PageView* pPageView, | 90 virtual void GetActionData(CPDFSDK_PageView* pPageView, |
91 CPDF_AAction::AActionType type, | 91 CPDF_AAction::AActionType type, |
92 PDFSDK_FieldAction& fa); | 92 PDFSDK_FieldAction& fa); |
93 virtual void SetActionData(CPDFSDK_PageView* pPageView, | 93 virtual void SetActionData(CPDFSDK_PageView* pPageView, |
94 CPDF_AAction::AActionType type, | 94 CPDF_AAction::AActionType type, |
95 const PDFSDK_FieldAction& fa); | 95 const PDFSDK_FieldAction& fa); |
96 virtual FX_BOOL IsActionDataChanged(CPDF_AAction::AActionType type, | 96 virtual FX_BOOL IsActionDataChanged(CPDF_AAction::AActionType type, |
97 const PDFSDK_FieldAction& faOld, | 97 const PDFSDK_FieldAction& faOld, |
98 const PDFSDK_FieldAction& faNew); | 98 const PDFSDK_FieldAction& faNew); |
99 | 99 |
100 virtual void SaveState(CPDFSDK_PageView* pPageView); | 100 virtual void SaveState(CPDFSDK_PageView* pPageView); |
101 virtual void RestoreState(CPDFSDK_PageView* pPageView); | 101 virtual void RestoreState(CPDFSDK_PageView* pPageView); |
102 | 102 |
103 virtual CPWL_Wnd* ResetPDFWindow(CPDFSDK_PageView* pPageView, | 103 virtual CPWL_Wnd* ResetPDFWindow(CPDFSDK_PageView* pPageView, |
104 FX_BOOL bRestoreValue); | 104 FX_BOOL bRestoreValue); |
105 | 105 |
106 CPDF_Matrix GetCurMatrix(); | 106 CFX_Matrix GetCurMatrix(); |
107 | 107 |
108 CPDF_Rect FFLtoPWL(const CPDF_Rect& rect); | 108 CPDF_Rect FFLtoPWL(const CPDF_Rect& rect); |
109 CPDF_Rect PWLtoFFL(const CPDF_Rect& rect); | 109 CPDF_Rect PWLtoFFL(const CPDF_Rect& rect); |
110 CPDF_Point FFLtoPWL(const CPDF_Point& point); | 110 CPDF_Point FFLtoPWL(const CPDF_Point& point); |
111 CPDF_Point PWLtoFFL(const CPDF_Point& point); | 111 CPDF_Point PWLtoFFL(const CPDF_Point& point); |
112 | 112 |
113 CPDF_Point WndtoPWL(CPDFSDK_PageView* pPageView, const CPDF_Point& pt); | 113 CPDF_Point WndtoPWL(CPDFSDK_PageView* pPageView, const CPDF_Point& pt); |
114 CPDF_Rect FFLtoWnd(CPDFSDK_PageView* pPageView, const CPDF_Rect& rect); | 114 CPDF_Rect FFLtoWnd(CPDFSDK_PageView* pPageView, const CPDF_Rect& rect); |
115 | 115 |
116 void SetWindowRect(CPDFSDK_PageView* pPageView, const CPDF_Rect& rcWindow); | 116 void SetWindowRect(CPDFSDK_PageView* pPageView, const CPDF_Rect& rcWindow); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 CPDFSDK_Annot* pAnnot, | 171 CPDFSDK_Annot* pAnnot, |
172 FX_UINT nFlags, | 172 FX_UINT nFlags, |
173 const CPDF_Point& point) override; | 173 const CPDF_Point& point) override; |
174 FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView, | 174 FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView, |
175 CPDFSDK_Annot* pAnnot, | 175 CPDFSDK_Annot* pAnnot, |
176 FX_UINT nFlags, | 176 FX_UINT nFlags, |
177 const CPDF_Point& point) override; | 177 const CPDF_Point& point) override; |
178 void OnDraw(CPDFSDK_PageView* pPageView, | 178 void OnDraw(CPDFSDK_PageView* pPageView, |
179 CPDFSDK_Annot* pAnnot, | 179 CPDFSDK_Annot* pAnnot, |
180 CFX_RenderDevice* pDevice, | 180 CFX_RenderDevice* pDevice, |
181 CPDF_Matrix* pUser2Device, | 181 CFX_Matrix* pUser2Device, |
182 FX_DWORD dwFlags) override; | 182 FX_DWORD dwFlags) override; |
183 void OnDrawDeactive(CPDFSDK_PageView* pPageView, | 183 void OnDrawDeactive(CPDFSDK_PageView* pPageView, |
184 CPDFSDK_Annot* pAnnot, | 184 CPDFSDK_Annot* pAnnot, |
185 CFX_RenderDevice* pDevice, | 185 CFX_RenderDevice* pDevice, |
186 CPDF_Matrix* pUser2Device, | 186 CFX_Matrix* pUser2Device, |
187 FX_DWORD dwFlags) override; | 187 FX_DWORD dwFlags) override; |
188 | 188 |
189 protected: | 189 protected: |
190 FX_BOOL m_bMouseIn; | 190 FX_BOOL m_bMouseIn; |
191 FX_BOOL m_bMouseDown; | 191 FX_BOOL m_bMouseDown; |
192 }; | 192 }; |
193 | 193 |
194 #endif // FPDFSDK_INCLUDE_FORMFILLER_FFL_FORMFILLER_H_ | 194 #endif // FPDFSDK_INCLUDE_FORMFILLER_FFL_FORMFILLER_H_ |
OLD | NEW |