| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 void OnPreOpen(CPDFSDK_Widget* pWidget, | 126 void OnPreOpen(CPDFSDK_Widget* pWidget, |
| 127 CPDFSDK_PageView* pPageView, | 127 CPDFSDK_PageView* pPageView, |
| 128 FX_BOOL& bReset, | 128 FX_BOOL& bReset, |
| 129 FX_BOOL& bExit, | 129 FX_BOOL& bExit, |
| 130 FX_UINT nFlag); | 130 FX_UINT nFlag); |
| 131 void OnPostOpen(CPDFSDK_Widget* pWidget, | 131 void OnPostOpen(CPDFSDK_Widget* pWidget, |
| 132 CPDFSDK_PageView* pPageView, | 132 CPDFSDK_PageView* pPageView, |
| 133 FX_BOOL& bReset, | 133 FX_BOOL& bReset, |
| 134 FX_BOOL& bExit, | 134 FX_BOOL& bExit, |
| 135 FX_UINT nFlag); | 135 FX_UINT nFlag); |
| 136 #endif | 136 #endif // PDF_ENABLE_XFA |
| 137 | 137 |
| 138 private: | 138 private: |
| 139 using CFFL_Widget2Filler = std::map<CPDFSDK_Annot*, CFFL_FormFiller*>; | 139 using CFFL_Widget2Filler = std::map<CPDFSDK_Annot*, CFFL_FormFiller*>; |
| 140 | 140 |
| 141 // IPWL_Filler_Notify: | 141 // IPWL_Filler_Notify: |
| 142 void QueryWherePopup(void* pPrivateData, | 142 void QueryWherePopup(void* pPrivateData, |
| 143 FX_FLOAT fPopupMin, | 143 FX_FLOAT fPopupMin, |
| 144 FX_FLOAT fPopupMax, | 144 FX_FLOAT fPopupMax, |
| 145 int32_t& nRet, | 145 int32_t& nRet, |
| 146 FX_FLOAT& fPopupRet) override; | 146 FX_FLOAT& fPopupRet) override; |
| 147 void OnBeforeKeyStroke(void* pPrivateData, | 147 void OnBeforeKeyStroke(void* pPrivateData, |
| 148 CFX_WideString& strChange, | 148 CFX_WideString& strChange, |
| 149 const CFX_WideString& strChangeEx, | 149 const CFX_WideString& strChangeEx, |
| 150 int nSelStart, | 150 int nSelStart, |
| 151 int nSelEnd, | 151 int nSelEnd, |
| 152 FX_BOOL bKeyDown, | 152 FX_BOOL bKeyDown, |
| 153 FX_BOOL& bRC, | 153 FX_BOOL& bRC, |
| 154 FX_BOOL& bExit, | 154 FX_BOOL& bExit, |
| 155 FX_DWORD nFlag) override; | 155 FX_DWORD nFlag) override; |
| 156 #ifdef PDF_ENABLE_XFA | 156 #ifdef PDF_ENABLE_XFA |
| 157 void OnPopupPreOpen(void* pPrivateData, | 157 void OnPopupPreOpen(void* pPrivateData, |
| 158 FX_BOOL& bExit, | 158 FX_BOOL& bExit, |
| 159 FX_DWORD nFlag) override; | 159 FX_DWORD nFlag) override; |
| 160 void OnPopupPostOpen(void* pPrivateData, | 160 void OnPopupPostOpen(void* pPrivateData, |
| 161 FX_BOOL& bExit, | 161 FX_BOOL& bExit, |
| 162 FX_DWORD nFlag) override; | 162 FX_DWORD nFlag) override; |
| 163 #endif | |
| 164 | |
| 165 void UnRegisterFormFiller(CPDFSDK_Annot* pAnnot); | |
| 166 #ifdef PDF_ENABLE_XFA | |
| 167 void SetFocusAnnotTab(CPDFSDK_Annot* pWidget, | 163 void SetFocusAnnotTab(CPDFSDK_Annot* pWidget, |
| 168 FX_BOOL bSameField, | 164 FX_BOOL bSameField, |
| 169 FX_BOOL bNext); | 165 FX_BOOL bNext); |
| 170 #endif | 166 #endif // PDF_ENABLE_XFA |
| 167 void UnRegisterFormFiller(CPDFSDK_Annot* pAnnot); |
| 171 | 168 |
| 172 CPDFDoc_Environment* m_pApp; | 169 CPDFDoc_Environment* m_pApp; |
| 173 CFFL_Widget2Filler m_Maps; | 170 CFFL_Widget2Filler m_Maps; |
| 174 FX_BOOL m_bNotifying; | 171 FX_BOOL m_bNotifying; |
| 175 }; | 172 }; |
| 176 | 173 |
| 177 class CFFL_PrivateData { | 174 class CFFL_PrivateData { |
| 178 public: | 175 public: |
| 179 CPDFSDK_Widget* pWidget; | 176 CPDFSDK_Widget* pWidget; |
| 180 CPDFSDK_PageView* pPageView; | 177 CPDFSDK_PageView* pPageView; |
| 181 int nWidgetAge; | 178 int nWidgetAge; |
| 182 int nValueAge; | 179 int nValueAge; |
| 183 }; | 180 }; |
| 184 | 181 |
| 185 #endif // FPDFSDK_INCLUDE_FORMFILLER_FFL_IFORMFILLER_H_ | 182 #endif // FPDFSDK_INCLUDE_FORMFILLER_FFL_IFORMFILLER_H_ |
| OLD | NEW |