| 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 <map> | 10 #include <map> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 CPDFSDK_Annot* pAnnot, | 33 CPDFSDK_Annot* pAnnot, |
| 34 CFX_RenderDevice* pDevice, | 34 CFX_RenderDevice* pDevice, |
| 35 CFX_Matrix* pUser2Device); | 35 CFX_Matrix* pUser2Device); |
| 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, | 41 virtual void OnMouseEnter(CPDFSDK_PageView* pPageView, |
| 42 CPDFSDK_Annot* pAnnot, | 42 CPDFSDK_Annot* pAnnot, |
| 43 FX_UINT nFlag); | 43 uint32_t nFlag); |
| 44 virtual void OnMouseExit(CPDFSDK_PageView* pPageView, | 44 virtual void OnMouseExit(CPDFSDK_PageView* pPageView, |
| 45 CPDFSDK_Annot* pAnnot, | 45 CPDFSDK_Annot* pAnnot, |
| 46 FX_UINT nFlag); | 46 uint32_t nFlag); |
| 47 | 47 |
| 48 virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView, | 48 virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView, |
| 49 CPDFSDK_Annot* pAnnot, | 49 CPDFSDK_Annot* pAnnot, |
| 50 FX_UINT nFlags, | 50 uint32_t nFlags, |
| 51 const CFX_FloatPoint& point); | 51 const CFX_FloatPoint& point); |
| 52 virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView, | 52 virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView, |
| 53 CPDFSDK_Annot* pAnnot, | 53 CPDFSDK_Annot* pAnnot, |
| 54 FX_UINT nFlags, | 54 uint32_t nFlags, |
| 55 const CFX_FloatPoint& point); | 55 const CFX_FloatPoint& point); |
| 56 virtual FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView, | 56 virtual FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView, |
| 57 CPDFSDK_Annot* pAnnot, | 57 CPDFSDK_Annot* pAnnot, |
| 58 FX_UINT nFlags, | 58 uint32_t nFlags, |
| 59 const CFX_FloatPoint& point); | 59 const CFX_FloatPoint& point); |
| 60 virtual FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView, | 60 virtual FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView, |
| 61 CPDFSDK_Annot* pAnnot, | 61 CPDFSDK_Annot* pAnnot, |
| 62 FX_UINT nFlags, | 62 uint32_t nFlags, |
| 63 const CFX_FloatPoint& point); | 63 const CFX_FloatPoint& point); |
| 64 virtual FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView, | 64 virtual FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView, |
| 65 CPDFSDK_Annot* pAnnot, | 65 CPDFSDK_Annot* pAnnot, |
| 66 FX_UINT nFlags, | 66 uint32_t nFlags, |
| 67 short zDelta, | 67 short zDelta, |
| 68 const CFX_FloatPoint& point); | 68 const CFX_FloatPoint& point); |
| 69 virtual FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView, | 69 virtual FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView, |
| 70 CPDFSDK_Annot* pAnnot, | 70 CPDFSDK_Annot* pAnnot, |
| 71 FX_UINT nFlags, | 71 uint32_t nFlags, |
| 72 const CFX_FloatPoint& point); | 72 const CFX_FloatPoint& point); |
| 73 virtual FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView, | 73 virtual FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView, |
| 74 CPDFSDK_Annot* pAnnot, | 74 CPDFSDK_Annot* pAnnot, |
| 75 FX_UINT nFlags, | 75 uint32_t nFlags, |
| 76 const CFX_FloatPoint& point); | 76 const CFX_FloatPoint& point); |
| 77 | 77 |
| 78 virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, | 78 virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, |
| 79 FX_UINT nKeyCode, | 79 uint32_t nKeyCode, |
| 80 FX_UINT nFlags); | 80 uint32_t nFlags); |
| 81 virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags); | 81 virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, |
| 82 uint32_t nChar, |
| 83 uint32_t nFlags); |
| 82 | 84 |
| 83 virtual FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag); | 85 virtual FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag); |
| 84 virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag); | 86 virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag); |
| 85 | 87 |
| 86 CFFL_FormFiller* GetFormFiller(CPDFSDK_Annot* pAnnot, FX_BOOL bRegister); | 88 CFFL_FormFiller* GetFormFiller(CPDFSDK_Annot* pAnnot, FX_BOOL bRegister); |
| 87 void RemoveFormFiller(CPDFSDK_Annot* pAnnot); | 89 void RemoveFormFiller(CPDFSDK_Annot* pAnnot); |
| 88 | 90 |
| 89 static FX_BOOL IsVisible(CPDFSDK_Widget* pWidget); | 91 static FX_BOOL IsVisible(CPDFSDK_Widget* pWidget); |
| 90 static FX_BOOL IsReadOnly(CPDFSDK_Widget* pWidget); | 92 static FX_BOOL IsReadOnly(CPDFSDK_Widget* pWidget); |
| 91 static FX_BOOL IsFillingAllowed(CPDFSDK_Widget* pWidget); | 93 static FX_BOOL IsFillingAllowed(CPDFSDK_Widget* pWidget); |
| 92 static FX_BOOL IsValidAnnot(CPDFSDK_PageView* pPageView, | 94 static FX_BOOL IsValidAnnot(CPDFSDK_PageView* pPageView, |
| 93 CPDFSDK_Annot* pAnnot); | 95 CPDFSDK_Annot* pAnnot); |
| 94 | 96 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 108 FX_BOOL& bExit, | 110 FX_BOOL& bExit, |
| 109 uint32_t nFlag); | 111 uint32_t nFlag); |
| 110 void OnFormat(CPDFSDK_Widget* pWidget, | 112 void OnFormat(CPDFSDK_Widget* pWidget, |
| 111 CPDFSDK_PageView* pPageView, | 113 CPDFSDK_PageView* pPageView, |
| 112 FX_BOOL& bExit, | 114 FX_BOOL& bExit, |
| 113 uint32_t nFlag); | 115 uint32_t nFlag); |
| 114 void OnButtonUp(CPDFSDK_Widget* pWidget, | 116 void OnButtonUp(CPDFSDK_Widget* pWidget, |
| 115 CPDFSDK_PageView* pPageView, | 117 CPDFSDK_PageView* pPageView, |
| 116 FX_BOOL& bReset, | 118 FX_BOOL& bReset, |
| 117 FX_BOOL& bExit, | 119 FX_BOOL& bExit, |
| 118 FX_UINT nFlag); | 120 uint32_t nFlag); |
| 119 #ifdef PDF_ENABLE_XFA | 121 #ifdef PDF_ENABLE_XFA |
| 120 void OnClick(CPDFSDK_Widget* pWidget, | 122 void OnClick(CPDFSDK_Widget* pWidget, |
| 121 CPDFSDK_PageView* pPageView, | 123 CPDFSDK_PageView* pPageView, |
| 122 FX_BOOL& bReset, | 124 FX_BOOL& bReset, |
| 123 FX_BOOL& bExit, | 125 FX_BOOL& bExit, |
| 124 FX_UINT nFlag); | 126 uint32_t nFlag); |
| 125 void OnFull(CPDFSDK_Widget* pWidget, | 127 void OnFull(CPDFSDK_Widget* pWidget, |
| 126 CPDFSDK_PageView* pPageView, | 128 CPDFSDK_PageView* pPageView, |
| 127 FX_BOOL& bReset, | 129 FX_BOOL& bReset, |
| 128 FX_BOOL& bExit, | 130 FX_BOOL& bExit, |
| 129 FX_UINT nFlag); | 131 uint32_t nFlag); |
| 130 void OnPreOpen(CPDFSDK_Widget* pWidget, | 132 void OnPreOpen(CPDFSDK_Widget* pWidget, |
| 131 CPDFSDK_PageView* pPageView, | 133 CPDFSDK_PageView* pPageView, |
| 132 FX_BOOL& bReset, | 134 FX_BOOL& bReset, |
| 133 FX_BOOL& bExit, | 135 FX_BOOL& bExit, |
| 134 FX_UINT nFlag); | 136 uint32_t nFlag); |
| 135 void OnPostOpen(CPDFSDK_Widget* pWidget, | 137 void OnPostOpen(CPDFSDK_Widget* pWidget, |
| 136 CPDFSDK_PageView* pPageView, | 138 CPDFSDK_PageView* pPageView, |
| 137 FX_BOOL& bReset, | 139 FX_BOOL& bReset, |
| 138 FX_BOOL& bExit, | 140 FX_BOOL& bExit, |
| 139 FX_UINT nFlag); | 141 uint32_t nFlag); |
| 140 #endif // PDF_ENABLE_XFA | 142 #endif // PDF_ENABLE_XFA |
| 141 | 143 |
| 142 private: | 144 private: |
| 143 using CFFL_Widget2Filler = | 145 using CFFL_Widget2Filler = |
| 144 std::map<CPDFSDK_Annot*, std::unique_ptr<CFFL_FormFiller>>; | 146 std::map<CPDFSDK_Annot*, std::unique_ptr<CFFL_FormFiller>>; |
| 145 | 147 |
| 146 // IPWL_Filler_Notify: | 148 // IPWL_Filler_Notify: |
| 147 void QueryWherePopup(void* pPrivateData, | 149 void QueryWherePopup(void* pPrivateData, |
| 148 FX_FLOAT fPopupMin, | 150 FX_FLOAT fPopupMin, |
| 149 FX_FLOAT fPopupMax, | 151 FX_FLOAT fPopupMax, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 178 | 180 |
| 179 class CFFL_PrivateData { | 181 class CFFL_PrivateData { |
| 180 public: | 182 public: |
| 181 CPDFSDK_Widget* pWidget; | 183 CPDFSDK_Widget* pWidget; |
| 182 CPDFSDK_PageView* pPageView; | 184 CPDFSDK_PageView* pPageView; |
| 183 int nWidgetAge; | 185 int nWidgetAge; |
| 184 int nValueAge; | 186 int nValueAge; |
| 185 }; | 187 }; |
| 186 | 188 |
| 187 #endif // FPDFSDK_FORMFILLER_CFFL_IFORMFILLER_H_ | 189 #endif // FPDFSDK_FORMFILLER_CFFL_IFORMFILLER_H_ |
| OLD | NEW |