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

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

Issue 1244503002: Merge to XFA: Tidy up CPDFDOC_Environment. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Address comments, also remove two noisy unused var. 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 CPDF_Rect PWLtoFFL(const CPDF_Rect & rect); 100 CPDF_Rect PWLtoFFL(const CPDF_Rect & rect);
104 CPDF_Point FFLtoPWL(const CPDF_Poin t& point); 101 CPDF_Point FFLtoPWL(const CPDF_Poin t& point);
105 CPDF_Point PWLtoFFL(const CPDF_Poin t& point); 102 CPDF_Point PWLtoFFL(const CPDF_Poin t& point);
106 103
107 CPDF_Point WndtoPWL(CPDFSDK_PageVie w* pPageView, const CPDF_Point& pt); 104 CPDF_Point WndtoPWL(CPDFSDK_PageVie w* pPageView, const CPDF_Point& pt);
108 CPDF_Rect FFLtoWnd(CPDFSDK_PageVie w* pPageView, const CPDF_Rect& rect); 105 CPDF_Rect FFLtoWnd(CPDFSDK_PageVie w* pPageView, const CPDF_Rect& rect);
109 106
110 void SetWindowRect(CPDFSDK_Pa geView* pPageView, const CPDF_Rect& rcWindow); 107 void SetWindowRect(CPDFSDK_Pa geView* pPageView, const CPDF_Rect& rcWindow);
111 CPDF_Rect GetWindowRect(CPDFSDK_Pa geView* pPageView); 108 CPDF_Rect GetWindowRect(CPDFSDK_Pa geView* pPageView);
112 109
113 static void FFL_FreeData(void* pData );
114
115 FX_BOOL CommitData(CPDFSDK_PageV iew* pPageView, FX_UINT nFlag); 110 FX_BOOL CommitData(CPDFSDK_PageV iew* pPageView, FX_UINT nFlag);
116 virtual FX_BOOL IsDataChanged(CPDFSDK_PageView* pPageView); 111 virtual FX_BOOL IsDataChanged(CPDFSDK_PageView* pPageView);
117 virtual void SaveData(CPDFSDK_PageView* pPage View); 112 virtual void SaveData(CPDFSDK_PageView* pPage View);
118 113
119 virtual void GetKeyStrokeData(CPDFSDK_PageVie w* pPageView, FFL_KeyStrokeData& data); 114 virtual void GetKeyStrokeData(CPDFSDK_PageVie w* pPageView, FFL_KeyStrokeData& data);
120 virtual FX_BOOL IsFieldFull(CPDFSDK_PageView* pP ageView); 115 virtual FX_BOOL IsFieldFull(CPDFSDK_PageView* pP ageView);
121 116
122 CPWL_Wnd* GetPDFWindow(CPDFSDK_Pag eView* pPageView, FX_BOOL bNew); 117 CPWL_Wnd* GetPDFWindow(CPDFSDK_Pag eView* pPageView, FX_BOOL bNew);
123 void DestroyPDFWindow(CPDFSDK _PageView* pPageView); 118 void DestroyPDFWindow(CPDFSDK _PageView* pPageView);
124 void EscapeFiller(CPDFSDK_Pag eView* pPageView, FX_BOOL bDestroyPDFWindow); 119 void EscapeFiller(CPDFSDK_Pag eView* pPageView, FX_BOOL bDestroyPDFWindow);
(...skipping 28 matching lines...) Expand all
153 { 148 {
154 public: 149 public:
155 CFFL_Button(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget); 150 CFFL_Button(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pWidget);
156 virtual ~CFFL_Button(); 151 virtual ~CFFL_Button();
157 152
158 virtual void OnMouseEnter(CPDFSDK_PageView *p PageView, CPDFSDK_Annot* pAnnot); 153 virtual void OnMouseEnter(CPDFSDK_PageView *p PageView, CPDFSDK_Annot* pAnnot);
159 virtual void OnMouseExit(CPDFSDK_PageView *pP ageView, CPDFSDK_Annot* pAnnot); 154 virtual void OnMouseExit(CPDFSDK_PageView *pP ageView, CPDFSDK_Annot* pAnnot);
160 virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point); 155 virtual FX_BOOL OnLButtonDown(CPDFSDK_PageView * pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point);
161 virtual FX_BOOL OnLButtonUp(CPDFSDK_PageView *pP ageView, 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);
162 virtual FX_BOOL OnMouseMove(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);
163 » virtual void» » » » OnDraw(CPDFSDK_PageView *pPageVi ew/*, HDC hDC*/, CPDFSDK_Annot* pAnnot, 158 » virtual void» » » » OnDraw(CPDFSDK_PageView *pPageVi ew, CPDFSDK_Annot* pAnnot,
164 » » » » » » » » CFX_RenderDevice * pDevice, CPDF_Matrix* pUser2Device, 159 » » » » » » » » » CFX_Rend erDevice* pDevice, CPDF_Matrix* pUser2Device,
165 » » » » » » » » /*const CRect& r cWindow,*/ FX_DWORD dwFlags); 160 » » » » » » » » » FX_DWORD dwFlags);
166 161
167 » virtual»void» » » » OnDrawDeactive(CPDFSDK_PageView *pPageView, /*HDC hDC,*/ CPDFSDK_Annot* pAnnot, 162 » virtual»void» » » » OnDrawDeactive(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot,
168 » » » » » » » » CFX_RenderDevice * pDevice, CPDF_Matrix* pUser2Device, 163 » » » » » » » » » CFX_Rend erDevice* pDevice, CPDF_Matrix* pUser2Device,
169 » » » » » » » » /*const CRect& r cWindow, */FX_DWORD dwFlags); 164 » » » » » » » » » FX_DWORD dwFlags);
170 protected: 165 protected:
171 FX_BOOL m_bMouseIn; 166 FX_BOOL m_bMouseIn;
172 FX_BOOL m_bMouseDown; 167 FX_BOOL m_bMouseDown;
173 }; 168 };
174 169
175 #endif // FPDFSDK_INCLUDE_FORMFILLER_FFL_FORMFILLER_H_ 170 #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