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_FORMFILLER_CFFL_IFORMFILLER_H_ | 7 #ifndef FPDFSDK_FORMFILLER_CFFL_IFORMFILLER_H_ |
8 #define FPDFSDK_FORMFILLER_CFFL_IFORMFILLER_H_ | 8 #define FPDFSDK_FORMFILLER_CFFL_IFORMFILLER_H_ |
9 | 9 |
10 #include <memory> | |
Lei Zhang
2016/08/02 22:54:00
alphabetical order
Wei Li
2016/08/03 17:54:47
Done.
| |
10 #include <map> | 11 #include <map> |
11 | 12 |
12 #include "fpdfsdk/include/fsdk_define.h" | 13 #include "fpdfsdk/include/fsdk_define.h" |
13 #include "fpdfsdk/pdfwindow/PWL_Edit.h" | 14 #include "fpdfsdk/pdfwindow/PWL_Edit.h" |
14 | 15 |
15 class CFFL_FormFiller; | 16 class CFFL_FormFiller; |
16 class CPDFDoc_Environment; | 17 class CPDFDoc_Environment; |
17 class CPDFSDK_Annot; | 18 class CPDFSDK_Annot; |
18 class CPDFSDK_PageView; | 19 class CPDFSDK_PageView; |
19 class CPDFSDK_Widget; | 20 class CPDFSDK_Widget; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
133 FX_BOOL& bExit, | 134 FX_BOOL& bExit, |
134 FX_UINT nFlag); | 135 FX_UINT nFlag); |
135 void OnPostOpen(CPDFSDK_Widget* pWidget, | 136 void OnPostOpen(CPDFSDK_Widget* pWidget, |
136 CPDFSDK_PageView* pPageView, | 137 CPDFSDK_PageView* pPageView, |
137 FX_BOOL& bReset, | 138 FX_BOOL& bReset, |
138 FX_BOOL& bExit, | 139 FX_BOOL& bExit, |
139 FX_UINT nFlag); | 140 FX_UINT nFlag); |
140 #endif // PDF_ENABLE_XFA | 141 #endif // PDF_ENABLE_XFA |
141 | 142 |
142 private: | 143 private: |
143 using CFFL_Widget2Filler = std::map<CPDFSDK_Annot*, CFFL_FormFiller*>; | 144 using CFFL_Widget2Filler = |
145 std::map<CPDFSDK_Annot*, std::unique_ptr<CFFL_FormFiller>>; | |
144 | 146 |
145 // IPWL_Filler_Notify: | 147 // IPWL_Filler_Notify: |
146 void QueryWherePopup(void* pPrivateData, | 148 void QueryWherePopup(void* pPrivateData, |
147 FX_FLOAT fPopupMin, | 149 FX_FLOAT fPopupMin, |
148 FX_FLOAT fPopupMax, | 150 FX_FLOAT fPopupMax, |
149 int32_t& nRet, | 151 int32_t& nRet, |
150 FX_FLOAT& fPopupRet) override; | 152 FX_FLOAT& fPopupRet) override; |
151 void OnBeforeKeyStroke(void* pPrivateData, | 153 void OnBeforeKeyStroke(void* pPrivateData, |
152 CFX_WideString& strChange, | 154 CFX_WideString& strChange, |
153 const CFX_WideString& strChangeEx, | 155 const CFX_WideString& strChangeEx, |
154 int nSelStart, | 156 int nSelStart, |
155 int nSelEnd, | 157 int nSelEnd, |
156 FX_BOOL bKeyDown, | 158 FX_BOOL bKeyDown, |
157 FX_BOOL& bRC, | 159 FX_BOOL& bRC, |
158 FX_BOOL& bExit, | 160 FX_BOOL& bExit, |
159 uint32_t nFlag) override; | 161 uint32_t nFlag) override; |
160 #ifdef PDF_ENABLE_XFA | 162 #ifdef PDF_ENABLE_XFA |
161 void OnPopupPreOpen(void* pPrivateData, | 163 void OnPopupPreOpen(void* pPrivateData, |
162 FX_BOOL& bExit, | 164 FX_BOOL& bExit, |
163 uint32_t nFlag) override; | 165 uint32_t nFlag) override; |
164 void OnPopupPostOpen(void* pPrivateData, | 166 void OnPopupPostOpen(void* pPrivateData, |
165 FX_BOOL& bExit, | 167 FX_BOOL& bExit, |
166 uint32_t nFlag) override; | 168 uint32_t nFlag) override; |
167 void SetFocusAnnotTab(CPDFSDK_Annot* pWidget, | 169 void SetFocusAnnotTab(CPDFSDK_Annot* pWidget, |
168 FX_BOOL bSameField, | 170 FX_BOOL bSameField, |
169 FX_BOOL bNext); | 171 FX_BOOL bNext); |
170 #endif // PDF_ENABLE_XFA | 172 #endif // PDF_ENABLE_XFA |
171 void UnRegisterFormFiller(CPDFSDK_Annot* pAnnot); | 173 void UnRegisterFormFiller(CPDFSDK_Annot* pAnnot); |
172 | 174 |
173 CPDFDoc_Environment* m_pApp; | 175 CPDFDoc_Environment* const m_pApp; |
174 CFFL_Widget2Filler m_Maps; | 176 CFFL_Widget2Filler m_Maps; |
175 FX_BOOL m_bNotifying; | 177 FX_BOOL m_bNotifying; |
176 }; | 178 }; |
177 | 179 |
178 class CFFL_PrivateData { | 180 class CFFL_PrivateData { |
179 public: | 181 public: |
180 CPDFSDK_Widget* pWidget; | 182 CPDFSDK_Widget* pWidget; |
181 CPDFSDK_PageView* pPageView; | 183 CPDFSDK_PageView* pPageView; |
182 int nWidgetAge; | 184 int nWidgetAge; |
183 int nValueAge; | 185 int nValueAge; |
184 }; | 186 }; |
185 | 187 |
186 #endif // FPDFSDK_FORMFILLER_CFFL_IFORMFILLER_H_ | 188 #endif // FPDFSDK_FORMFILLER_CFFL_IFORMFILLER_H_ |
OLD | NEW |