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_IFORMFILLER_H_ | 7 #ifndef FPDFSDK_INCLUDE_FORMFILLER_FFL_IFORMFILLER_H_ |
8 #define FPDFSDK_INCLUDE_FORMFILLER_FFL_IFORMFILLER_H_ | 8 #define FPDFSDK_INCLUDE_FORMFILLER_FFL_IFORMFILLER_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 const CPDF_Point& point); | 72 const CPDF_Point& point); |
73 | 73 |
74 virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, | 74 virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, |
75 FX_UINT nKeyCode, | 75 FX_UINT nKeyCode, |
76 FX_UINT nFlags); | 76 FX_UINT nFlags); |
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 virtual FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag); | 79 virtual FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag); |
80 virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag); | 80 virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag); |
81 | 81 |
82 virtual void OnPopupPreOpen(void* pPrivateData, | |
83 FX_BOOL& bExit, | |
84 FX_DWORD nFlag); | |
85 virtual void OnPopupPostOpen(void* pPrivateData, | |
86 FX_BOOL& bExit, | |
87 FX_DWORD nFlag); | |
88 | |
89 CFFL_FormFiller* GetFormFiller(CPDFSDK_Annot* pAnnot, FX_BOOL bRegister); | 82 CFFL_FormFiller* GetFormFiller(CPDFSDK_Annot* pAnnot, FX_BOOL bRegister); |
90 void RemoveFormFiller(CPDFSDK_Annot* pAnnot); | 83 void RemoveFormFiller(CPDFSDK_Annot* pAnnot); |
91 | 84 |
92 static FX_BOOL IsVisible(CPDFSDK_Widget* pWidget); | 85 static FX_BOOL IsVisible(CPDFSDK_Widget* pWidget); |
93 static FX_BOOL IsReadOnly(CPDFSDK_Widget* pWidget); | 86 static FX_BOOL IsReadOnly(CPDFSDK_Widget* pWidget); |
94 static FX_BOOL IsFillingAllowed(CPDFSDK_Widget* pWidget); | 87 static FX_BOOL IsFillingAllowed(CPDFSDK_Widget* pWidget); |
95 static FX_BOOL IsValidAnnot(CPDFSDK_PageView* pPageView, | 88 static FX_BOOL IsValidAnnot(CPDFSDK_PageView* pPageView, |
96 CPDFSDK_Annot* pAnnot); | 89 CPDFSDK_Annot* pAnnot); |
97 | 90 |
98 void OnKeyStrokeCommit(CPDFSDK_Widget* pWidget, | 91 void OnKeyStrokeCommit(CPDFSDK_Widget* pWidget, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 FX_FLOAT& fPopupRet) override; | 144 FX_FLOAT& fPopupRet) override; |
152 void OnBeforeKeyStroke(void* pPrivateData, | 145 void OnBeforeKeyStroke(void* pPrivateData, |
153 CFX_WideString& strChange, | 146 CFX_WideString& strChange, |
154 const CFX_WideString& strChangeEx, | 147 const CFX_WideString& strChangeEx, |
155 int nSelStart, | 148 int nSelStart, |
156 int nSelEnd, | 149 int nSelEnd, |
157 FX_BOOL bKeyDown, | 150 FX_BOOL bKeyDown, |
158 FX_BOOL& bRC, | 151 FX_BOOL& bRC, |
159 FX_BOOL& bExit, | 152 FX_BOOL& bExit, |
160 FX_DWORD nFlag) override; | 153 FX_DWORD nFlag) override; |
| 154 void OnPopupPreOpen(void* pPrivateData, |
| 155 FX_BOOL& bExit, |
| 156 FX_DWORD nFlag) override; |
| 157 void OnPopupPostOpen(void* pPrivateData, |
| 158 FX_BOOL& bExit, |
| 159 FX_DWORD nFlag) override; |
161 | 160 |
162 void UnRegisterFormFiller(CPDFSDK_Annot* pAnnot); | 161 void UnRegisterFormFiller(CPDFSDK_Annot* pAnnot); |
163 void SetFocusAnnotTab(CPDFSDK_Annot* pWidget, | 162 void SetFocusAnnotTab(CPDFSDK_Annot* pWidget, |
164 FX_BOOL bSameField, | 163 FX_BOOL bSameField, |
165 FX_BOOL bNext); | 164 FX_BOOL bNext); |
166 | 165 |
167 CPDFDoc_Environment* m_pApp; | 166 CPDFDoc_Environment* m_pApp; |
168 CFFL_Widget2Filler m_Maps; | 167 CFFL_Widget2Filler m_Maps; |
169 FX_BOOL m_bNotifying; | 168 FX_BOOL m_bNotifying; |
170 }; | 169 }; |
171 | 170 |
172 class CFFL_PrivateData { | 171 class CFFL_PrivateData { |
173 public: | 172 public: |
174 CPDFSDK_Widget* pWidget; | 173 CPDFSDK_Widget* pWidget; |
175 CPDFSDK_PageView* pPageView; | 174 CPDFSDK_PageView* pPageView; |
176 int nWidgetAge; | 175 int nWidgetAge; |
177 int nValueAge; | 176 int nValueAge; |
178 }; | 177 }; |
179 | 178 |
180 #endif // FPDFSDK_INCLUDE_FORMFILLER_FFL_IFORMFILLER_H_ | 179 #endif // FPDFSDK_INCLUDE_FORMFILLER_FFL_IFORMFILLER_H_ |
OLD | NEW |