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_FSDK_BASEFORM_H_ | 7 #ifndef FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ |
8 #define FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ | 8 #define FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ |
9 | 9 |
10 #if _FX_OS_ == _FX_ANDROID_ | 10 #if _FX_OS_ == _FX_ANDROID_ |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 int nSelEnd;
//in[out] | 60 int nSelEnd;
//in[out] |
61 int nSelStart;
//in[out] | 61 int nSelStart;
//in[out] |
62 CFX_WideString sValue; //in[out] | 62 CFX_WideString sValue; //in[out] |
63 FX_BOOL bWillCommit; //in | 63 FX_BOOL bWillCommit; //in |
64 FX_BOOL bFieldFull; //in | 64 FX_BOOL bFieldFull; //in |
65 FX_BOOL bRC; //in[out
] | 65 FX_BOOL bRC; //in[out
] |
66 }PDFSDK_FieldAction; | 66 }PDFSDK_FieldAction; |
67 class CPDFSDK_Widget:public CPDFSDK_BAAnnot | 67 class CPDFSDK_Widget:public CPDFSDK_BAAnnot |
68 { | 68 { |
69 public: | 69 public: |
70 » XFA_HWIDGET» » » » » » GetMixXFAWidget(
); | 70 » IXFA_Widget*» » » » » » GetMixXFAWidget(
); |
71 » XFA_HWIDGET» » » » » » GetGroupMixXFAWi
dget(); | 71 » IXFA_Widget*» » » » » » GetGroupMixXFAWi
dget(); |
72 IXFA_WidgetHandler* GetXFAWidgetHandler(); | 72 IXFA_WidgetHandler* GetXFAWidgetHandler(); |
73 | 73 |
74 FX_BOOL HasXFAAAction(PD
FSDK_XFAAActionType eXFAAAT); | 74 FX_BOOL HasXFAAAction(PD
FSDK_XFAAActionType eXFAAAT); |
75 FX_BOOL OnXFAAAction(PDF
SDK_XFAAActionType eXFAAAT, PDFSDK_FieldAction& data, CPDFSDK_PageView* pPageVie
w); | 75 FX_BOOL OnXFAAAction(PDF
SDK_XFAAActionType eXFAAAT, PDFSDK_FieldAction& data, CPDFSDK_PageView* pPageVie
w); |
76 | 76 |
77 void Synchronize(FX_B
OOL bSynchronizeElse); | 77 void Synchronize(FX_B
OOL bSynchronizeElse); |
78 void SynchronizeXFAVa
lue(); | 78 void SynchronizeXFAVa
lue(); |
79 void SynchronizeXFAIt
ems(); | 79 void SynchronizeXFAIt
ems(); |
80 | 80 |
81 » static void» » » » » » SynchronizeXFAVa
lue(IXFA_DocView* pXFADocView, XFA_HWIDGET hWidget, | 81 » static void» » » » » » SynchronizeXFAVa
lue(IXFA_DocView* pXFADocView, IXFA_Widget* hWidget, |
82 CPDF_FormField* pFormField, CPDF_FormControl* pFormControl); | 82 CPDF_FormField* pFormField, CPDF_FormControl* pFormControl); |
83 » static void» » » » » » SynchronizeXFAIt
ems(IXFA_DocView* pXFADocView, XFA_HWIDGET hWidget, | 83 » static void» » » » » » SynchronizeXFAIt
ems(IXFA_DocView* pXFADocView, IXFA_Widget* hWidget, |
84 CPDF_FormField* pFormField, CPDF_FormControl* pFormControl); | 84 CPDF_FormField* pFormField, CPDF_FormControl* pFormControl); |
85 | 85 |
86 public: | 86 public: |
87 CPDFSDK_Widget(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView, CPDFSDK_
InterForm* pInterForm); | 87 CPDFSDK_Widget(CPDF_Annot* pAnnot, CPDFSDK_PageView* pPageView, CPDFSDK_
InterForm* pInterForm); |
88 virtual ~CPDFSDK_Widget(); | 88 virtual ~CPDFSDK_Widget(); |
89 | 89 |
90 virtual CFX_ByteString GetSubType() const; | 90 virtual CFX_ByteString GetSubType() const; |
91 | 91 |
92 virtual CPDF_Action GetAAction(CPDF_AAction:
:AActionType eAAT); | 92 virtual CPDF_Action GetAAction(CPDF_AAction:
:AActionType eAAT); |
93 | 93 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 void DrawAppearance(C
FX_RenderDevice* pDevice, const CPDF_Matrix* pUser2Device, | 185 void DrawAppearance(C
FX_RenderDevice* pDevice, const CPDF_Matrix* pUser2Device, |
186 CPDF_Annot::AppearanceMode mode, const CPDF_RenderOptions* pOpti
ons); | 186 CPDF_Annot::AppearanceMode mode, const CPDF_RenderOptions* pOpti
ons); |
187 public: | 187 public: |
188 FX_BOOL HitTest(FX_FLOAT
pageX, FX_FLOAT pageY); | 188 FX_BOOL HitTest(FX_FLOAT
pageX, FX_FLOAT pageY); |
189 private: | 189 private: |
190 CPDFSDK_InterForm* m_pInterForm; | 190 CPDFSDK_InterForm* m_pInterForm; |
191 FX_BOOL m_bAppModified; | 191 FX_BOOL m_bAppModified; |
192 FX_INT32 m_nAppAge; | 192 FX_INT32 m_nAppAge; |
193 FX_INT32 m_nValueAge; | 193 FX_INT32 m_nValueAge; |
194 | 194 |
195 » XFA_HWIDGET» » » » » » m_hMixXFAWidget; | 195 » IXFA_Widget*» » » » » » m_hMixXFAWidget; |
196 IXFA_WidgetHandler* m_pWidgetHandler; | 196 IXFA_WidgetHandler* m_pWidgetHandler; |
197 }; | 197 }; |
198 | 198 |
199 class CPDFSDK_XFAWidget : public CPDFSDK_Annot | 199 class CPDFSDK_XFAWidget : public CPDFSDK_Annot |
200 { | 200 { |
201 public: | 201 public: |
202 » CPDFSDK_XFAWidget(XFA_HWIDGET pAnnot, CPDFSDK_PageView* pPageView, CPDFS
DK_InterForm* pInterForm); | 202 » CPDFSDK_XFAWidget(IXFA_Widget* pAnnot, CPDFSDK_PageView* pPageView, CPDF
SDK_InterForm* pInterForm); |
203 virtual ~CPDFSDK_XFAWidget(){} | 203 virtual ~CPDFSDK_XFAWidget(){} |
204 | 204 |
205 public: | 205 public: |
206 virtual FX_BOOL IsXFAField(); | 206 virtual FX_BOOL IsXFAField(); |
207 » virtual XFA_HWIDGET» » » GetXFAWidget() { return m_hXFAWi
dget; } | 207 » virtual IXFA_Widget*» » » GetXFAWidget() { return m_hXFAWi
dget; } |
208 | 208 |
209 virtual CFX_ByteString GetType() const ; | 209 virtual CFX_ByteString GetType() const ; |
210 virtual CFX_ByteString GetSubType() const { return ""; } | 210 virtual CFX_ByteString GetSubType() const { return ""; } |
211 | 211 |
212 virtual CFX_FloatRect GetRect(); | 212 virtual CFX_FloatRect GetRect(); |
213 | 213 |
214 public: | 214 public: |
215 CPDFSDK_InterForm* GetInterForm() { return m_pInter
Form; } | 215 CPDFSDK_InterForm* GetInterForm() { return m_pInter
Form; } |
216 | 216 |
217 private: | 217 private: |
218 CPDFSDK_InterForm* m_pInterForm; | 218 CPDFSDK_InterForm* m_pInterForm; |
219 » XFA_HWIDGET» » » » » » m_hXFAWidget; | 219 » IXFA_Widget*» » » » » » m_hXFAWidget; |
220 }; | 220 }; |
221 | 221 |
222 #define CPDFSDK_WidgetMap CFX_MapPtrTemplate<CPDF_
FormControl*, CPDFSDK_Widget*> | 222 #define CPDFSDK_WidgetMap CFX_MapPtrTemplate<CPDF_
FormControl*, CPDFSDK_Widget*> |
223 #define CPDFSDK_XFAWidgetMap» » » CFX_MapPtrTemplate<XFA_HWIDGET,
CPDFSDK_XFAWidget*> | 223 #define CPDFSDK_XFAWidgetMap» » » CFX_MapPtrTemplate<IXFA_Widget*,
CPDFSDK_XFAWidget*> |
224 #define CPDFSDK_FieldSynchronizeMap CFX_MapPtrTemplate<CPDF_FormFiel
d*, int> | 224 #define CPDFSDK_FieldSynchronizeMap CFX_MapPtrTemplate<CPDF_FormFiel
d*, int> |
225 | 225 |
226 class CPDFSDK_InterForm : public CPDF_FormNotify | 226 class CPDFSDK_InterForm : public CPDF_FormNotify |
227 { | 227 { |
228 public: | 228 public: |
229 CPDFSDK_InterForm(CPDFSDK_Document* pDocument); | 229 CPDFSDK_InterForm(CPDFSDK_Document* pDocument); |
230 virtual ~CPDFSDK_InterForm(); | 230 virtual ~CPDFSDK_InterForm(); |
231 | 231 |
232 public: | 232 public: |
233 virtual void Destroy(); | 233 virtual void Destroy(); |
234 virtual CPDF_InterForm* GetInterForm(); | 234 virtual CPDF_InterForm* GetInterForm(); |
235 | 235 |
236 CPDFSDK_Document* GetDocument(); | 236 CPDFSDK_Document* GetDocument(); |
237 FX_BOOL HighlightWidgets
(); | 237 FX_BOOL HighlightWidgets
(); |
238 | 238 |
239 CPDFSDK_Widget* GetSibling(CPDFSDK_Widge
t* pWidget, FX_BOOL bNext) const; | 239 CPDFSDK_Widget* GetSibling(CPDFSDK_Widge
t* pWidget, FX_BOOL bNext) const; |
240 CPDFSDK_Widget* GetWidget(CPDF_FormContr
ol* pControl) const; | 240 CPDFSDK_Widget* GetWidget(CPDF_FormContr
ol* pControl) const; |
241 void GetWidgets(const
CFX_WideString& sFieldName, CFX_PtrArray& widgets); | 241 void GetWidgets(const
CFX_WideString& sFieldName, CFX_PtrArray& widgets); |
242 void GetWidgets(CPDF_
FormField* pField, CFX_PtrArray& widgets); | 242 void GetWidgets(CPDF_
FormField* pField, CFX_PtrArray& widgets); |
243 | 243 |
244 void AddMap(CPDF_Form
Control* pControl, CPDFSDK_Widget* pWidget); | 244 void AddMap(CPDF_Form
Control* pControl, CPDFSDK_Widget* pWidget); |
245 void RemoveMap(CPDF_F
ormControl* pControl); | 245 void RemoveMap(CPDF_F
ormControl* pControl); |
246 | 246 |
247 » void» » » » » » » AddXFAMap(XFA_HW
IDGET hWidget, CPDFSDK_XFAWidget* pWidget); | 247 » void» » » » » » » AddXFAMap(IXFA_W
idget* hWidget, CPDFSDK_XFAWidget* pWidget); |
248 » void» » » » » » » RemoveXFAMap(XFA
_HWIDGET hWidget); | 248 » void» » » » » » » RemoveXFAMap(IXF
A_Widget* hWidget); |
249 » CPDFSDK_XFAWidget*» » » » GetXFAWidget(XFA_HWIDGET
hWidget); | 249 » CPDFSDK_XFAWidget*» » » » GetXFAWidget(IXFA_Widget
* hWidget); |
250 | 250 |
251 void EnableCalculate(
FX_BOOL bEnabled); | 251 void EnableCalculate(
FX_BOOL bEnabled); |
252 FX_BOOL IsCalculateEnabl
ed() const; | 252 FX_BOOL IsCalculateEnabl
ed() const; |
253 | 253 |
254 void XfaEnableCalcula
te(FX_BOOL bEnabled); | 254 void XfaEnableCalcula
te(FX_BOOL bEnabled); |
255 FX_BOOL IsXfaCalculateEn
abled() const; | 255 FX_BOOL IsXfaCalculateEn
abled() const; |
256 | 256 |
257 FX_BOOL IsXfaValidations
Enabled(); | 257 FX_BOOL IsXfaValidations
Enabled(); |
258 void XfaSetValidation
sEnabled(FX_BOOL bEnabled); | 258 void XfaSetValidation
sEnabled(FX_BOOL bEnabled); |
259 | 259 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 static CPDF_Rect GetAnnotRect(CPD
FSDK_Annot* pAnnot); | 351 static CPDF_Rect GetAnnotRect(CPD
FSDK_Annot* pAnnot); |
352 | 352 |
353 CPDFSDK_PageView* m_pPageView; | 353 CPDFSDK_PageView* m_pPageView; |
354 CFX_ByteString m_sType; | 354 CFX_ByteString m_sType; |
355 CFX_ByteString m_sSubType; | 355 CFX_ByteString m_sSubType; |
356 int
m_nTabs; | 356 int
m_nTabs; |
357 CPDFSDK_Annots m_Annots; | 357 CPDFSDK_Annots m_Annots; |
358 }; | 358 }; |
359 | 359 |
360 #endif // FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ | 360 #endif // FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ |
OLD | NEW |