| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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_CPDFSDK_WIDGETHANDLER_H_ | 7 #ifndef FPDFSDK_INCLUDE_CPDFSDK_WIDGETHANDLER_H_ |
| 8 #define FPDFSDK_INCLUDE_CPDFSDK_WIDGETHANDLER_H_ | 8 #define FPDFSDK_INCLUDE_CPDFSDK_WIDGETHANDLER_H_ |
| 9 | 9 |
| 10 #include "core/fxcrt/include/fx_basic.h" | 10 #include "core/fxcrt/include/fx_basic.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 const CFX_FloatPoint& point) override; | 43 const CFX_FloatPoint& point) override; |
| 44 void OnDraw(CPDFSDK_PageView* pPageView, | 44 void OnDraw(CPDFSDK_PageView* pPageView, |
| 45 CPDFSDK_Annot* pAnnot, | 45 CPDFSDK_Annot* pAnnot, |
| 46 CFX_RenderDevice* pDevice, | 46 CFX_RenderDevice* pDevice, |
| 47 CFX_Matrix* pUser2Device, | 47 CFX_Matrix* pUser2Device, |
| 48 bool bDrawAnnots) override; | 48 bool bDrawAnnots) override; |
| 49 void OnCreate(CPDFSDK_Annot* pAnnot) override; | 49 void OnCreate(CPDFSDK_Annot* pAnnot) override; |
| 50 void OnLoad(CPDFSDK_Annot* pAnnot) override; | 50 void OnLoad(CPDFSDK_Annot* pAnnot) override; |
| 51 void OnDelete(CPDFSDK_Annot* pAnnot) override; | 51 void OnDelete(CPDFSDK_Annot* pAnnot) override; |
| 52 void OnRelease(CPDFSDK_Annot* pAnnot) override; | 52 void OnRelease(CPDFSDK_Annot* pAnnot) override; |
| 53 |
| 53 void OnMouseEnter(CPDFSDK_PageView* pPageView, | 54 void OnMouseEnter(CPDFSDK_PageView* pPageView, |
| 54 CPDFSDK_Annot* pAnnot, | 55 CPDFSDK_Annot::ObservedPtr* pAnnot, |
| 55 uint32_t nFlag) override; | 56 uint32_t nFlag) override; |
| 56 void OnMouseExit(CPDFSDK_PageView* pPageView, | 57 void OnMouseExit(CPDFSDK_PageView* pPageView, |
| 57 CPDFSDK_Annot* pAnnot, | 58 CPDFSDK_Annot::ObservedPtr* pAnnot, |
| 58 uint32_t nFlag) override; | 59 uint32_t nFlag) override; |
| 59 FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView, | 60 FX_BOOL OnLButtonDown(CPDFSDK_PageView* pPageView, |
| 60 CPDFSDK_Annot* pAnnot, | 61 CPDFSDK_Annot::ObservedPtr* pAnnot, |
| 61 uint32_t nFlags, | 62 uint32_t nFlags, |
| 62 const CFX_FloatPoint& point) override; | 63 const CFX_FloatPoint& point) override; |
| 63 FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView, | 64 FX_BOOL OnLButtonUp(CPDFSDK_PageView* pPageView, |
| 64 CPDFSDK_Annot* pAnnot, | 65 CPDFSDK_Annot::ObservedPtr* pAnnot, |
| 65 uint32_t nFlags, | 66 uint32_t nFlags, |
| 66 const CFX_FloatPoint& point) override; | 67 const CFX_FloatPoint& point) override; |
| 67 FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView, | 68 FX_BOOL OnLButtonDblClk(CPDFSDK_PageView* pPageView, |
| 68 CPDFSDK_Annot* pAnnot, | 69 CPDFSDK_Annot::ObservedPtr* pAnnot, |
| 69 uint32_t nFlags, | 70 uint32_t nFlags, |
| 70 const CFX_FloatPoint& point) override; | 71 const CFX_FloatPoint& point) override; |
| 71 FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView, | 72 FX_BOOL OnMouseMove(CPDFSDK_PageView* pPageView, |
| 72 CPDFSDK_Annot* pAnnot, | 73 CPDFSDK_Annot::ObservedPtr* pAnnot, |
| 73 uint32_t nFlags, | 74 uint32_t nFlags, |
| 74 const CFX_FloatPoint& point) override; | 75 const CFX_FloatPoint& point) override; |
| 75 FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView, | 76 FX_BOOL OnMouseWheel(CPDFSDK_PageView* pPageView, |
| 76 CPDFSDK_Annot* pAnnot, | 77 CPDFSDK_Annot::ObservedPtr* pAnnot, |
| 77 uint32_t nFlags, | 78 uint32_t nFlags, |
| 78 short zDelta, | 79 short zDelta, |
| 79 const CFX_FloatPoint& point) override; | 80 const CFX_FloatPoint& point) override; |
| 80 FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView, | 81 FX_BOOL OnRButtonDown(CPDFSDK_PageView* pPageView, |
| 81 CPDFSDK_Annot* pAnnot, | 82 CPDFSDK_Annot::ObservedPtr* pAnnot, |
| 82 uint32_t nFlags, | 83 uint32_t nFlags, |
| 83 const CFX_FloatPoint& point) override; | 84 const CFX_FloatPoint& point) override; |
| 84 FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView, | 85 FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView, |
| 85 CPDFSDK_Annot* pAnnot, | 86 CPDFSDK_Annot::ObservedPtr* pAnnot, |
| 86 uint32_t nFlags, | 87 uint32_t nFlags, |
| 87 const CFX_FloatPoint& point) override; | 88 const CFX_FloatPoint& point) override; |
| 88 FX_BOOL OnRButtonDblClk(CPDFSDK_PageView* pPageView, | 89 FX_BOOL OnRButtonDblClk(CPDFSDK_PageView* pPageView, |
| 89 CPDFSDK_Annot* pAnnot, | 90 CPDFSDK_Annot::ObservedPtr* pAnnot, |
| 90 uint32_t nFlags, | 91 uint32_t nFlags, |
| 91 const CFX_FloatPoint& point) override; | 92 const CFX_FloatPoint& point) override; |
| 92 FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, | 93 FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, |
| 93 uint32_t nChar, | 94 uint32_t nChar, |
| 94 uint32_t nFlags) override; | 95 uint32_t nFlags) override; |
| 95 FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) override; | 96 FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) override; |
| 96 FX_BOOL OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) override; | 97 FX_BOOL OnKeyUp(CPDFSDK_Annot* pAnnot, int nKeyCode, int nFlag) override; |
| 97 void OnDeSelected(CPDFSDK_Annot* pAnnot) override {} | 98 void OnDeSelected(CPDFSDK_Annot* pAnnot) override {} |
| 98 void OnSelected(CPDFSDK_Annot* pAnnot) override {} | 99 void OnSelected(CPDFSDK_Annot* pAnnot) override {} |
| 99 FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag) override; | 100 FX_BOOL OnSetFocus(CPDFSDK_Annot::ObservedPtr* pAnnot, |
| 100 FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, uint32_t nFlag) override; | 101 uint32_t nFlag) override; |
| 102 FX_BOOL OnKillFocus(CPDFSDK_Annot::ObservedPtr* pAnnot, |
| 103 uint32_t nFlag) override; |
| 101 #ifdef PDF_ENABLE_XFA | 104 #ifdef PDF_ENABLE_XFA |
| 102 FX_BOOL OnXFAChangedFocus(CPDFSDK_Annot* pOldAnnot, | 105 FX_BOOL OnXFAChangedFocus(CPDFSDK_Annot::ObservedPtr* pOldAnnot, |
| 103 CPDFSDK_Annot* pNewAnnot) override; | 106 CPDFSDK_Annot::ObservedPtr* pNewAnnot) override; |
| 104 #endif // PDF_ENABLE_XFA | 107 #endif // PDF_ENABLE_XFA |
| 105 | 108 |
| 106 void SetFormFiller(CFFL_InteractiveFormFiller* pFiller) { | 109 void SetFormFiller(CFFL_InteractiveFormFiller* pFiller) { |
| 107 m_pFormFiller = pFiller; | 110 m_pFormFiller = pFiller; |
| 108 } | 111 } |
| 109 CFFL_InteractiveFormFiller* GetFormFiller() { return m_pFormFiller; } | 112 CFFL_InteractiveFormFiller* GetFormFiller() { return m_pFormFiller; } |
| 110 | 113 |
| 111 private: | 114 private: |
| 112 CPDFSDK_Environment* m_pEnv; | 115 CPDFSDK_Environment* m_pEnv; |
| 113 CFFL_InteractiveFormFiller* m_pFormFiller; | 116 CFFL_InteractiveFormFiller* m_pFormFiller; |
| 114 }; | 117 }; |
| 115 | 118 |
| 116 #endif // FPDFSDK_INCLUDE_CPDFSDK_WIDGETHANDLER_H_ | 119 #endif // FPDFSDK_INCLUDE_CPDFSDK_WIDGETHANDLER_H_ |
| OLD | NEW |