Chromium Code Reviews| 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_FORMFILLER_H_ | 7 #ifndef FPDFSDK_INCLUDE_FORMFILLER_FFL_FORMFILLER_H_ |
| 8 #define FPDFSDK_INCLUDE_FORMFILLER_FFL_FORMFILLER_H_ | 8 #define FPDFSDK_INCLUDE_FORMFILLER_FFL_FORMFILLER_H_ |
| 9 | 9 |
| 10 #include "FFL_IFormFiller.h" | 10 #include "FFL_IFormFiller.h" |
| 11 #include "FFL_CBA_Fontmap.h" | 11 #include "FFL_CBA_Fontmap.h" |
| 12 | 12 |
| 13 class CPDFDoc_Environment; | |
| 13 class CPDFSDK_Annot; | 14 class CPDFSDK_Annot; |
| 14 class CFFL_FormFiller; | 15 class CPDFSDK_Document; |
| 15 class CFFL_Notify; | |
| 16 class CPDFDoc_Environment; | |
| 17 class CPDFSDK_PageView; | 16 class CPDFSDK_PageView; |
| 18 class CPDFSDK_Document; | |
| 19 class CPDFSDK_Widget; | 17 class CPDFSDK_Widget; |
| 20 | 18 |
| 21 class CFFL_FormFiller : public IPWL_Provider, public CPWL_TimerHandler { | 19 class CFFL_FormFiller : public IPWL_Provider, public CPWL_TimerHandler { |
| 22 public: | 20 public: |
| 23 CFFL_FormFiller(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot); | 21 CFFL_FormFiller(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot); |
| 24 virtual ~CFFL_FormFiller(); | 22 ~CFFL_FormFiller() override; |
| 25 | 23 |
| 26 virtual FX_RECT GetViewBBox(CPDFSDK_PageView* pPageView, | 24 virtual FX_RECT GetViewBBox(CPDFSDK_PageView* pPageView, |
| 27 CPDFSDK_Annot* pAnnot); | 25 CPDFSDK_Annot* pAnnot); |
| 28 virtual void OnDraw(CPDFSDK_PageView* pPageView, | 26 virtual void OnDraw(CPDFSDK_PageView* pPageView, |
| 29 CPDFSDK_Annot* pAnnot, | 27 CPDFSDK_Annot* pAnnot, |
| 30 CFX_RenderDevice* pDevice, | 28 CFX_RenderDevice* pDevice, |
| 31 CPDF_Matrix* pUser2Device, | 29 CPDF_Matrix* pUser2Device, |
| 32 FX_DWORD dwFlags); | 30 FX_DWORD dwFlags); |
| 33 virtual void OnDrawDeactive(CPDFSDK_PageView* pPageView, | 31 virtual void OnDrawDeactive(CPDFSDK_PageView* pPageView, |
| 34 CPDFSDK_Annot* pAnnot, | 32 CPDFSDK_Annot* pAnnot, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 virtual FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView, | 69 virtual FX_BOOL OnRButtonUp(CPDFSDK_PageView* pPageView, |
| 72 CPDFSDK_Annot* pAnnot, | 70 CPDFSDK_Annot* pAnnot, |
| 73 FX_UINT nFlags, | 71 FX_UINT nFlags, |
| 74 const CPDF_Point& point); | 72 const CPDF_Point& point); |
| 75 | 73 |
| 76 virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, | 74 virtual FX_BOOL OnKeyDown(CPDFSDK_Annot* pAnnot, |
| 77 FX_UINT nKeyCode, | 75 FX_UINT nKeyCode, |
| 78 FX_UINT nFlags); | 76 FX_UINT nFlags); |
| 79 virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags); | 77 virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags); |
| 80 | 78 |
| 81 virtual FX_BOOL OnSetFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag); | 79 FX_BOOL SetFocusForAnnot(CPDFSDK_Annot* pAnnot, FX_UINT nFlag); |
| 82 virtual FX_BOOL OnKillFocus(CPDFSDK_Annot* pAnnot, FX_UINT nFlag); | 80 FX_BOOL KillFocusForAnnot(CPDFSDK_Annot* pAnnot, FX_UINT nFlag); |
| 83 | |
| 84 virtual FX_BOOL CanCopy(CPDFSDK_Document* pDocument); | |
| 85 virtual FX_BOOL CanCut(CPDFSDK_Document* pDocument); | |
| 86 virtual FX_BOOL CanPaste(CPDFSDK_Document* pDocument); | |
| 87 | |
| 88 virtual void DoCopy(CPDFSDK_Document* pDocument); | |
| 89 virtual void DoCut(CPDFSDK_Document* pDocument); | |
| 90 virtual void DoPaste(CPDFSDK_Document* pDocument); | |
| 91 | 81 |
| 92 // CPWL_TimerHandler | 82 // CPWL_TimerHandler |
| 93 virtual void TimerProc(); | 83 void TimerProc() override; |
| 94 virtual IFX_SystemHandler* GetSystemHandler() const; | 84 IFX_SystemHandler* GetSystemHandler() const override; |
| 95 | 85 |
| 96 virtual CPDF_Matrix GetWindowMatrix(void* pAttachedData); | 86 // IPWL_Provider |
| 97 virtual CFX_WideString LoadPopupMenuString(int nIndex); | 87 CPDF_Matrix GetWindowMatrix(void* pAttachedData) override; |
| 88 CFX_WideString LoadPopupMenuString(int nIndex) override; | |
| 98 | 89 |
| 99 virtual void GetActionData(CPDFSDK_PageView* pPageView, | 90 virtual void GetActionData(CPDFSDK_PageView* pPageView, |
| 100 CPDF_AAction::AActionType type, | 91 CPDF_AAction::AActionType type, |
| 101 PDFSDK_FieldAction& fa); | 92 PDFSDK_FieldAction& fa); |
| 102 virtual void SetActionData(CPDFSDK_PageView* pPageView, | 93 virtual void SetActionData(CPDFSDK_PageView* pPageView, |
| 103 CPDF_AAction::AActionType type, | 94 CPDF_AAction::AActionType type, |
| 104 const PDFSDK_FieldAction& fa); | 95 const PDFSDK_FieldAction& fa); |
| 105 virtual FX_BOOL IsActionDataChanged(CPDF_AAction::AActionType type, | 96 virtual FX_BOOL IsActionDataChanged(CPDF_AAction::AActionType type, |
| 106 const PDFSDK_FieldAction& faOld, | 97 const PDFSDK_FieldAction& faOld, |
| 107 const PDFSDK_FieldAction& faNew); | 98 const PDFSDK_FieldAction& faNew); |
| 108 | 99 |
| 109 virtual void SaveState(CPDFSDK_PageView* pPageView); | 100 virtual void SaveState(CPDFSDK_PageView* pPageView); |
| 110 virtual void RestoreState(CPDFSDK_PageView* pPageView); | 101 virtual void RestoreState(CPDFSDK_PageView* pPageView); |
| 111 | 102 |
| 112 virtual CPWL_Wnd* ResetPDFWindow(CPDFSDK_PageView* pPageView, | 103 virtual CPWL_Wnd* ResetPDFWindow(CPDFSDK_PageView* pPageView, |
| 113 FX_BOOL bRestoreValue); | 104 FX_BOOL bRestoreValue); |
| 114 | 105 |
| 115 virtual void OnKeyStroke(FX_BOOL bKeyDown); | 106 virtual void OnKeyStroke(FX_BOOL bKeyDown, FX_DWORD nFlag); |
|
Nico
2015/08/08 23:47:40
Is this supposed to be an override? If not, why th
Lei Zhang
2015/08/10 07:03:22
No, CFFL_ListBox which inherits from CFFL_FormFill
| |
| 116 | 107 |
| 117 CPDF_Matrix GetCurMatrix(); | 108 CPDF_Matrix GetCurMatrix(); |
| 118 | 109 |
| 119 CPDF_Rect FFLtoPWL(const CPDF_Rect& rect); | 110 CPDF_Rect FFLtoPWL(const CPDF_Rect& rect); |
| 120 CPDF_Rect PWLtoFFL(const CPDF_Rect& rect); | 111 CPDF_Rect PWLtoFFL(const CPDF_Rect& rect); |
| 121 CPDF_Point FFLtoPWL(const CPDF_Point& point); | 112 CPDF_Point FFLtoPWL(const CPDF_Point& point); |
| 122 CPDF_Point PWLtoFFL(const CPDF_Point& point); | 113 CPDF_Point PWLtoFFL(const CPDF_Point& point); |
| 123 | 114 |
| 124 CPDF_Point WndtoPWL(CPDFSDK_PageView* pPageView, const CPDF_Point& pt); | 115 CPDF_Point WndtoPWL(CPDFSDK_PageView* pPageView, const CPDF_Point& pt); |
| 125 CPDF_Rect FFLtoWnd(CPDFSDK_PageView* pPageView, const CPDF_Rect& rect); | 116 CPDF_Rect FFLtoWnd(CPDFSDK_PageView* pPageView, const CPDF_Rect& rect); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 195 CFX_RenderDevice* pDevice, | 186 CFX_RenderDevice* pDevice, |
| 196 CPDF_Matrix* pUser2Device, | 187 CPDF_Matrix* pUser2Device, |
| 197 FX_DWORD dwFlags); | 188 FX_DWORD dwFlags); |
| 198 | 189 |
| 199 protected: | 190 protected: |
| 200 FX_BOOL m_bMouseIn; | 191 FX_BOOL m_bMouseIn; |
| 201 FX_BOOL m_bMouseDown; | 192 FX_BOOL m_bMouseDown; |
| 202 }; | 193 }; |
| 203 | 194 |
| 204 #endif // FPDFSDK_INCLUDE_FORMFILLER_FFL_FORMFILLER_H_ | 195 #endif // FPDFSDK_INCLUDE_FORMFILLER_FFL_FORMFILLER_H_ |
| OLD | NEW |