| 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_FORMFILLER_H_ | 7 #ifndef FPDFSDK_FORMFILLER_CFFL_FORMFILLER_H_ |
| 8 #define FPDFSDK_FORMFILLER_CFFL_FORMFILLER_H_ | 8 #define FPDFSDK_FORMFILLER_CFFL_FORMFILLER_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 virtual void InvalidateRect(double left, | 147 virtual void InvalidateRect(double left, |
| 148 double top, | 148 double top, |
| 149 double right, | 149 double right, |
| 150 double bottom); | 150 double bottom); |
| 151 CPDFDoc_Environment* GetApp() { return m_pApp; } | 151 CPDFDoc_Environment* GetApp() { return m_pApp; } |
| 152 CPDFSDK_Annot* GetSDKAnnot() { return m_pAnnot; } | 152 CPDFSDK_Annot* GetSDKAnnot() { return m_pAnnot; } |
| 153 | 153 |
| 154 protected: | 154 protected: |
| 155 using CFFL_PageView2PDFWindow = std::map<CPDFSDK_PageView*, CPWL_Wnd*>; | 155 using CFFL_PageView2PDFWindow = std::map<CPDFSDK_PageView*, CPWL_Wnd*>; |
| 156 | 156 |
| 157 // If the inheriting widget has its own fontmap and a PWL_Edit widget that |
| 158 // access that fontmap then you have to call DestroyWindows before destroying |
| 159 // the font map in order to not get a use-after-free. |
| 160 // |
| 161 // The font map should be stored somewhere more appropriate so it will live |
| 162 // until the PWL_Edit is done with it. pdfium:566 |
| 163 void DestroyWindows(); |
| 164 |
| 157 CPDFDoc_Environment* m_pApp; | 165 CPDFDoc_Environment* m_pApp; |
| 158 CPDFSDK_Widget* m_pWidget; | 166 CPDFSDK_Widget* m_pWidget; |
| 159 CPDFSDK_Annot* m_pAnnot; | 167 CPDFSDK_Annot* m_pAnnot; |
| 160 | 168 |
| 161 FX_BOOL m_bValid; | 169 FX_BOOL m_bValid; |
| 162 CFFL_PageView2PDFWindow m_Maps; | 170 CFFL_PageView2PDFWindow m_Maps; |
| 163 CFX_FloatPoint m_ptOldPos; | 171 CFX_FloatPoint m_ptOldPos; |
| 164 }; | 172 }; |
| 165 | 173 |
| 166 class CFFL_Button : public CFFL_FormFiller { | 174 class CFFL_Button : public CFFL_FormFiller { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 194 CFX_RenderDevice* pDevice, | 202 CFX_RenderDevice* pDevice, |
| 195 CFX_Matrix* pUser2Device, | 203 CFX_Matrix* pUser2Device, |
| 196 uint32_t dwFlags) override; | 204 uint32_t dwFlags) override; |
| 197 | 205 |
| 198 protected: | 206 protected: |
| 199 FX_BOOL m_bMouseIn; | 207 FX_BOOL m_bMouseIn; |
| 200 FX_BOOL m_bMouseDown; | 208 FX_BOOL m_bMouseDown; |
| 201 }; | 209 }; |
| 202 | 210 |
| 203 #endif // FPDFSDK_FORMFILLER_CFFL_FORMFILLER_H_ | 211 #endif // FPDFSDK_FORMFILLER_CFFL_FORMFILLER_H_ |
| OLD | NEW |