Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2176)

Side by Side Diff: fpdfsdk/include/formfiller/FFL_FormFiller.h

Issue 1235393002: Tidy up CPDFDOC_Environment. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Nits. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | fpdfsdk/include/fsdk_mgr.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 CPDFSDK_Annot; 13 class CPDFSDK_Annot;
14 class CFFL_FormFiller; 14 class CFFL_FormFiller;
15 class CFFL_Notify; 15 class CFFL_Notify;
16 class CPDFDoc_Environment; 16 class CPDFDoc_Environment;
17 class CPDFSDK_PageView; 17 class CPDFSDK_PageView;
18 class CPDFSDK_Document; 18 class CPDFSDK_Document;
19 class CPDFSDK_Widget; 19 class CPDFSDK_Widget;
20 20
21
22 struct FFL_KeyStrokeData 21 struct FFL_KeyStrokeData
23 { 22 {
24 CFX_WideString swValue; 23 CFX_WideString swValue;
25 FX_BOOL bFull; 24 FX_BOOL bFull;
26 int nSelStart; 25 int nSelStart;
27 int nSelEnd; 26 int nSelEnd;
28 }; 27 };
29 28
30 29 class CFFL_FormFiller : public IPWL_Provider, public CPWL_TimerHandler
31
32 class CFFL_FormFiller : /*public IBA_AnnotFiller,*/ public IPWL_Provider, public CPWL_TimerHandler
33 { 30 {
34 public: 31 public:
35 CFFL_FormFiller(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot); 32 CFFL_FormFiller(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot);
36 virtual ~CFFL_FormFiller(); 33 virtual ~CFFL_FormFiller();
37 34
38 virtual FX_RECT GetViewBBox(CPDFSDK_PageView *pP ageView, CPDFSDK_Annot* pAnnot); 35 virtual FX_RECT GetViewBBox(CPDFSDK_PageView *pP ageView, CPDFSDK_Annot* pAnnot);
39 » virtual void» » » » OnDraw(CPDFSDK_PageView *pPageVi ew, /*HDC hDC,*/ CPDFSDK_Annot* pAnnot, 36 » virtual void» » » » OnDraw(CPDFSDK_PageView *pPageVi ew, CPDFSDK_Annot* pAnnot,
40 CFX_Rend erDevice* pDevice, CPDF_Matrix* pUser2Device, 37 CFX_Rend erDevice* pDevice, CPDF_Matrix* pUser2Device,
41 » » » » » » » » » /*const CRect& rcWindow, */FX_DWORD dwFlags); 38 » » » » » » » » » FX_DWORD dwFlags);
42 » virtual void» » » » OnDrawDeactive(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFSDK_Annot* pAnnot, 39 » virtual void» » » » OnDrawDeactive(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot,
43 » » » » » » » » CFX_RenderDevice * pDevice, CPDF_Matrix* pUser2Device, 40 » » » » » » » » » CFX_Rend erDevice* pDevice, CPDF_Matrix* pUser2Device,
44 » » » » » » » » /*const CRect& r cWindow, */FX_DWORD dwFlags); 41 » » » » » » » » » FX_DWORD dwFlags);
45 42
46 virtual void OnCreate(CPDFSDK_Annot* pAnnot); 43 virtual void OnCreate(CPDFSDK_Annot* pAnnot);
47 virtual void OnLoad(CPDFSDK_Annot* pAnnot); 44 virtual void OnLoad(CPDFSDK_Annot* pAnnot);
48 virtual void OnDelete(CPDFSDK_Annot* pAnnot); 45 virtual void OnDelete(CPDFSDK_Annot* pAnnot);
49 46
50 virtual void OnMouseEnter(CPDFSDK_PageView *p PageView, CPDFSDK_Annot* pAnnot); 47 virtual void OnMouseEnter(CPDFSDK_PageView *p PageView, CPDFSDK_Annot* pAnnot);
51 virtual void OnMouseExit(CPDFSDK_PageView *pP ageView, CPDFSDK_Annot* pAnnot); 48 virtual void OnMouseExit(CPDFSDK_PageView *pP ageView, CPDFSDK_Annot* pAnnot);
52 49
53 virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point); 50 virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
54 virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView *pP ageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point); 51 virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView *pP ageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 CPDF_Rect PWLtoFFL(const CPDF_Rect & rect); 96 CPDF_Rect PWLtoFFL(const CPDF_Rect & rect);
100 CPDF_Point FFLtoPWL(const CPDF_Poin t& point); 97 CPDF_Point FFLtoPWL(const CPDF_Poin t& point);
101 CPDF_Point PWLtoFFL(const CPDF_Poin t& point); 98 CPDF_Point PWLtoFFL(const CPDF_Poin t& point);
102 99
103 CPDF_Point WndtoPWL(CPDFSDK_PageVie w* pPageView, const CPDF_Point& pt); 100 CPDF_Point WndtoPWL(CPDFSDK_PageVie w* pPageView, const CPDF_Point& pt);
104 CPDF_Rect FFLtoWnd(CPDFSDK_PageVie w* pPageView, const CPDF_Rect& rect); 101 CPDF_Rect FFLtoWnd(CPDFSDK_PageVie w* pPageView, const CPDF_Rect& rect);
105 102
106 void SetWindowRect(CPDFSDK_Pa geView* pPageView, const CPDF_Rect& rcWindow); 103 void SetWindowRect(CPDFSDK_Pa geView* pPageView, const CPDF_Rect& rcWindow);
107 CPDF_Rect GetWindowRect(CPDFSDK_Pa geView* pPageView); 104 CPDF_Rect GetWindowRect(CPDFSDK_Pa geView* pPageView);
108 105
109 static void FFL_FreeData(void* pData );
110
111 FX_BOOL CommitData(CPDFSDK_PageV iew* pPageView, FX_UINT nFlag); 106 FX_BOOL CommitData(CPDFSDK_PageV iew* pPageView, FX_UINT nFlag);
112 virtual FX_BOOL IsDataChanged(CPDFSDK_PageView* pPageView); 107 virtual FX_BOOL IsDataChanged(CPDFSDK_PageView* pPageView);
113 virtual void SaveData(CPDFSDK_PageView* pPage View); 108 virtual void SaveData(CPDFSDK_PageView* pPage View);
114 109
115 virtual void GetKeyStrokeData(CPDFSDK_PageVie w* pPageView, FFL_KeyStrokeData& data); 110 virtual void GetKeyStrokeData(CPDFSDK_PageVie w* pPageView, FFL_KeyStrokeData& data);
116 111
117 CPWL_Wnd* GetPDFWindow(CPDFSDK_Pag eView* pPageView, FX_BOOL bNew); 112 CPWL_Wnd* GetPDFWindow(CPDFSDK_Pag eView* pPageView, FX_BOOL bNew);
118 void DestroyPDFWindow(CPDFSDK _PageView* pPageView); 113 void DestroyPDFWindow(CPDFSDK _PageView* pPageView);
119 void EscapeFiller(CPDFSDK_Pag eView* pPageView, FX_BOOL bDestroyPDFWindow); 114 void EscapeFiller(CPDFSDK_Pag eView* pPageView, FX_BOOL bDestroyPDFWindow);
120 115
(...skipping 27 matching lines...) Expand all
148 { 143 {
149 public: 144 public:
150 CFFL_Button(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget); 145 CFFL_Button(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget);
151 virtual ~CFFL_Button(); 146 virtual ~CFFL_Button();
152 147
153 virtual void OnMouseEnter(CPDFSDK_PageView *p PageView, CPDFSDK_Annot* pAnnot); 148 virtual void OnMouseEnter(CPDFSDK_PageView *p PageView, CPDFSDK_Annot* pAnnot);
154 virtual void OnMouseExit(CPDFSDK_PageView *pP ageView, CPDFSDK_Annot* pAnnot); 149 virtual void OnMouseExit(CPDFSDK_PageView *pP ageView, CPDFSDK_Annot* pAnnot);
155 virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point); 150 virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
156 virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView *pP ageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point); 151 virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView *pP ageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
157 virtual FX_BOOL OnMouseMove(CPDFSDK_PageView *pP ageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point); 152 virtual FX_BOOL OnMouseMove(CPDFSDK_PageView *pP ageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
158 » virtual void» » » » OnDraw(CPDFSDK_PageView *pPageVi ew/*, HDC hDC*/, CPDFSDK_Annot* pAnnot, 153 » virtual void» » » » OnDraw(CPDFSDK_PageView *pPageVi ew, CPDFSDK_Annot* pAnnot,
159 » » » » » » » » CFX_RenderDevice * pDevice, CPDF_Matrix* pUser2Device, 154 » » » » » » » » » CFX_Rend erDevice* pDevice, CPDF_Matrix* pUser2Device,
160 » » » » » » » » /*const CRect& r cWindow,*/ FX_DWORD dwFlags); 155 » » » » » » » » » FX_DWORD dwFlags);
161 156
162 » virtual»void» » » » OnDrawDeactive(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFSDK_Annot* pAnnot, 157 » virtual»void» » » » OnDrawDeactive(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot,
163 » » » » » » » » CFX_RenderDevice * pDevice, CPDF_Matrix* pUser2Device, 158 » » » » » » » » » CFX_Rend erDevice* pDevice, CPDF_Matrix* pUser2Device,
164 » » » » » » » » /*const CRect& r cWindow, */FX_DWORD dwFlags); 159 » » » » » » » » » FX_DWORD dwFlags);
165 protected: 160 protected:
166 FX_BOOL m_bMouseIn; 161 FX_BOOL m_bMouseIn;
167 FX_BOOL m_bMouseDown; 162 FX_BOOL m_bMouseDown;
168 }; 163 };
169 164
170 #endif // FPDFSDK_INCLUDE_FORMFILLER_FFL_FORMFILLER_H_ 165 #endif // FPDFSDK_INCLUDE_FORMFILLER_FFL_FORMFILLER_H_
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/include/fsdk_mgr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698