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 20 matching lines...) Expand all Loading... |
31 class CPDF_FormField; | 31 class CPDF_FormField; |
32 struct CPWL_Color; | 32 struct CPWL_Color; |
33 | 33 |
34 #ifdef PDF_ENABLE_XFA | 34 #ifdef PDF_ENABLE_XFA |
35 typedef enum _PDFSDK_XFAAActionType { | 35 typedef enum _PDFSDK_XFAAActionType { |
36 PDFSDK_XFA_Click = 0, | 36 PDFSDK_XFA_Click = 0, |
37 PDFSDK_XFA_Full, | 37 PDFSDK_XFA_Full, |
38 PDFSDK_XFA_PreOpen, | 38 PDFSDK_XFA_PreOpen, |
39 PDFSDK_XFA_PostOpen | 39 PDFSDK_XFA_PostOpen |
40 } PDFSDK_XFAAActionType; | 40 } PDFSDK_XFAAActionType; |
| 41 #endif // PDF_ENABLE_XFA |
41 | 42 |
42 #endif | |
43 typedef struct _PDFSDK_FieldAction { | 43 typedef struct _PDFSDK_FieldAction { |
44 _PDFSDK_FieldAction() { | 44 _PDFSDK_FieldAction() { |
45 bModifier = FALSE; | 45 bModifier = FALSE; |
46 bShift = FALSE; | 46 bShift = FALSE; |
47 nCommitKey = 0; | 47 nCommitKey = 0; |
48 bKeyDown = FALSE; | 48 bKeyDown = FALSE; |
49 nSelEnd = nSelStart = 0; | 49 nSelEnd = nSelStart = 0; |
50 bWillCommit = FALSE; | 50 bWillCommit = FALSE; |
51 bFieldFull = FALSE; | 51 bFieldFull = FALSE; |
52 bRC = TRUE; | 52 bRC = TRUE; |
(...skipping 30 matching lines...) Expand all Loading... |
83 void SynchronizeXFAItems(); | 83 void SynchronizeXFAItems(); |
84 | 84 |
85 static void SynchronizeXFAValue(IXFA_DocView* pXFADocView, | 85 static void SynchronizeXFAValue(IXFA_DocView* pXFADocView, |
86 IXFA_Widget* hWidget, | 86 IXFA_Widget* hWidget, |
87 CPDF_FormField* pFormField, | 87 CPDF_FormField* pFormField, |
88 CPDF_FormControl* pFormControl); | 88 CPDF_FormControl* pFormControl); |
89 static void SynchronizeXFAItems(IXFA_DocView* pXFADocView, | 89 static void SynchronizeXFAItems(IXFA_DocView* pXFADocView, |
90 IXFA_Widget* hWidget, | 90 IXFA_Widget* hWidget, |
91 CPDF_FormField* pFormField, | 91 CPDF_FormField* pFormField, |
92 CPDF_FormControl* pFormControl); | 92 CPDF_FormControl* pFormControl); |
| 93 #endif // PDF_ENABLE_XFA |
93 | 94 |
94 #endif | |
95 CPDFSDK_Widget(CPDF_Annot* pAnnot, | 95 CPDFSDK_Widget(CPDF_Annot* pAnnot, |
96 CPDFSDK_PageView* pPageView, | 96 CPDFSDK_PageView* pPageView, |
97 CPDFSDK_InterForm* pInterForm); | 97 CPDFSDK_InterForm* pInterForm); |
98 ~CPDFSDK_Widget() override; | 98 ~CPDFSDK_Widget() override; |
99 | 99 |
100 // CPDFSDK_Annot | 100 // CPDFSDK_Annot |
101 CFX_ByteString GetSubType() const override; | 101 CFX_ByteString GetSubType() const override; |
102 CPDF_Action GetAAction(CPDF_AAction::AActionType eAAT) override; | 102 CPDF_Action GetAAction(CPDF_AAction::AActionType eAAT) override; |
103 FX_BOOL IsAppearanceValid() override; | 103 FX_BOOL IsAppearanceValid() override; |
104 | 104 |
(...skipping 11 matching lines...) Expand all Loading... |
116 FX_BOOL GetFillColor(FX_COLORREF& color) const; | 116 FX_BOOL GetFillColor(FX_COLORREF& color) const; |
117 FX_BOOL GetBorderColor(FX_COLORREF& color) const; | 117 FX_BOOL GetBorderColor(FX_COLORREF& color) const; |
118 FX_BOOL GetTextColor(FX_COLORREF& color) const; | 118 FX_BOOL GetTextColor(FX_COLORREF& color) const; |
119 FX_FLOAT GetFontSize() const; | 119 FX_FLOAT GetFontSize() const; |
120 | 120 |
121 int GetSelectedIndex(int nIndex) const; | 121 int GetSelectedIndex(int nIndex) const; |
122 #ifndef PDF_ENABLE_XFA | 122 #ifndef PDF_ENABLE_XFA |
123 CFX_WideString GetValue() const; | 123 CFX_WideString GetValue() const; |
124 #else | 124 #else |
125 CFX_WideString GetValue(FX_BOOL bDisplay = TRUE) const; | 125 CFX_WideString GetValue(FX_BOOL bDisplay = TRUE) const; |
126 #endif | 126 #endif // PDF_ENABLE_XFA |
127 CFX_WideString GetDefaultValue() const; | 127 CFX_WideString GetDefaultValue() const; |
128 CFX_WideString GetOptionLabel(int nIndex) const; | 128 CFX_WideString GetOptionLabel(int nIndex) const; |
129 int CountOptions() const; | 129 int CountOptions() const; |
130 FX_BOOL IsOptionSelected(int nIndex) const; | 130 FX_BOOL IsOptionSelected(int nIndex) const; |
131 int GetTopVisibleIndex() const; | 131 int GetTopVisibleIndex() const; |
132 FX_BOOL IsChecked() const; | 132 FX_BOOL IsChecked() const; |
133 /* | 133 /* |
134 BF_ALIGN_LEFT | 134 BF_ALIGN_LEFT |
135 BF_ALIGN_MIDDL | 135 BF_ALIGN_MIDDL |
136 BF_ALIGN_RIGHT | 136 BF_ALIGN_RIGHT |
137 */ | 137 */ |
138 int GetAlignment() const; | 138 int GetAlignment() const; |
139 int GetMaxLen() const; | 139 int GetMaxLen() const; |
140 #ifdef PDF_ENABLE_XFA | 140 #ifdef PDF_ENABLE_XFA |
141 CFX_WideString GetName() const; | 141 CFX_WideString GetName() const; |
142 #endif | 142 #endif // PDF_ENABLE_XFA |
143 CFX_WideString GetAlternateName() const; | 143 CFX_WideString GetAlternateName() const; |
144 | 144 |
145 // Set Properties. | 145 // Set Properties. |
146 void SetCheck(FX_BOOL bChecked, FX_BOOL bNotify); | 146 void SetCheck(FX_BOOL bChecked, FX_BOOL bNotify); |
147 void SetValue(const CFX_WideString& sValue, FX_BOOL bNotify); | 147 void SetValue(const CFX_WideString& sValue, FX_BOOL bNotify); |
148 void SetDefaultValue(const CFX_WideString& sValue); | 148 void SetDefaultValue(const CFX_WideString& sValue); |
149 void SetOptionSelection(int index, FX_BOOL bSelected, FX_BOOL bNotify); | 149 void SetOptionSelection(int index, FX_BOOL bSelected, FX_BOOL bNotify); |
150 void ClearSelection(FX_BOOL bNotify); | 150 void ClearSelection(FX_BOOL bNotify); |
151 void SetTopVisibleIndex(int index); | 151 void SetTopVisibleIndex(int index); |
152 | 152 |
153 #ifdef PDF_ENABLE_XFA | 153 #ifdef PDF_ENABLE_XFA |
154 void ResetAppearance(FX_BOOL bValueChanged); | 154 void ResetAppearance(FX_BOOL bValueChanged); |
155 #endif | 155 #endif // PDF_ENABLE_XFA |
156 void ResetAppearance(const FX_WCHAR* sValue, FX_BOOL bValueChanged); | 156 void ResetAppearance(const FX_WCHAR* sValue, FX_BOOL bValueChanged); |
157 void ResetFieldAppearance(FX_BOOL bValueChanged); | 157 void ResetFieldAppearance(FX_BOOL bValueChanged); |
158 void UpdateField(); | 158 void UpdateField(); |
159 CFX_WideString OnFormat(FX_BOOL& bFormated); | 159 CFX_WideString OnFormat(FX_BOOL& bFormated); |
160 | 160 |
161 // Message. | 161 // Message. |
162 FX_BOOL OnAAction(CPDF_AAction::AActionType type, | 162 FX_BOOL OnAAction(CPDF_AAction::AActionType type, |
163 PDFSDK_FieldAction& data, | 163 PDFSDK_FieldAction& data, |
164 CPDFSDK_PageView* pPageView); | 164 CPDFSDK_PageView* pPageView); |
165 | 165 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 FX_BOOL IsWidgetAppearanceValid(CPDF_Annot::AppearanceMode mode); | 204 FX_BOOL IsWidgetAppearanceValid(CPDF_Annot::AppearanceMode mode); |
205 void DrawAppearance(CFX_RenderDevice* pDevice, | 205 void DrawAppearance(CFX_RenderDevice* pDevice, |
206 const CPDF_Matrix* pUser2Device, | 206 const CPDF_Matrix* pUser2Device, |
207 CPDF_Annot::AppearanceMode mode, | 207 CPDF_Annot::AppearanceMode mode, |
208 const CPDF_RenderOptions* pOptions) override; | 208 const CPDF_RenderOptions* pOptions) override; |
209 | 209 |
210 FX_BOOL HitTest(FX_FLOAT pageX, FX_FLOAT pageY); | 210 FX_BOOL HitTest(FX_FLOAT pageX, FX_FLOAT pageY); |
211 | 211 |
212 #ifndef PDF_ENABLE_XFA | 212 #ifndef PDF_ENABLE_XFA |
213 private: | 213 private: |
214 #endif | 214 #endif // PDF_ENABLE_XFA |
215 CPDFSDK_InterForm* m_pInterForm; | 215 CPDFSDK_InterForm* m_pInterForm; |
216 FX_BOOL m_bAppModified; | 216 FX_BOOL m_bAppModified; |
217 int32_t m_nAppAge; | 217 int32_t m_nAppAge; |
218 int32_t m_nValueAge; | 218 int32_t m_nValueAge; |
| 219 |
219 #ifdef PDF_ENABLE_XFA | 220 #ifdef PDF_ENABLE_XFA |
220 | |
221 mutable IXFA_Widget* m_hMixXFAWidget; | 221 mutable IXFA_Widget* m_hMixXFAWidget; |
222 mutable IXFA_WidgetHandler* m_pWidgetHandler; | 222 mutable IXFA_WidgetHandler* m_pWidgetHandler; |
223 #endif | 223 #endif // PDF_ENABLE_XFA |
224 }; | 224 }; |
225 | 225 |
226 #ifdef PDF_ENABLE_XFA | 226 #ifdef PDF_ENABLE_XFA |
227 class CPDFSDK_XFAWidget : public CPDFSDK_Annot { | 227 class CPDFSDK_XFAWidget : public CPDFSDK_Annot { |
228 public: | 228 public: |
229 CPDFSDK_XFAWidget(IXFA_Widget* pAnnot, | 229 CPDFSDK_XFAWidget(IXFA_Widget* pAnnot, |
230 CPDFSDK_PageView* pPageView, | 230 CPDFSDK_PageView* pPageView, |
231 CPDFSDK_InterForm* pInterForm); | 231 CPDFSDK_InterForm* pInterForm); |
232 ~CPDFSDK_XFAWidget() override {} | 232 ~CPDFSDK_XFAWidget() override {} |
233 | 233 |
234 FX_BOOL IsXFAField() override; | 234 FX_BOOL IsXFAField() override; |
235 IXFA_Widget* GetXFAWidget() const override { return m_hXFAWidget; } | 235 IXFA_Widget* GetXFAWidget() const override { return m_hXFAWidget; } |
236 CFX_ByteString GetType() const override; | 236 CFX_ByteString GetType() const override; |
237 CFX_ByteString GetSubType() const override { return ""; } | 237 CFX_ByteString GetSubType() const override { return ""; } |
238 CFX_FloatRect GetRect() const override; | 238 CFX_FloatRect GetRect() const override; |
239 | 239 |
240 CPDFSDK_InterForm* GetInterForm() { return m_pInterForm; } | 240 CPDFSDK_InterForm* GetInterForm() { return m_pInterForm; } |
241 | 241 |
242 private: | 242 private: |
243 CPDFSDK_InterForm* m_pInterForm; | 243 CPDFSDK_InterForm* m_pInterForm; |
244 IXFA_Widget* m_hXFAWidget; | 244 IXFA_Widget* m_hXFAWidget; |
245 }; | 245 }; |
246 | |
247 #define CPDFSDK_XFAWidgetMap \ | 246 #define CPDFSDK_XFAWidgetMap \ |
248 CFX_MapPtrTemplate<IXFA_Widget*, CPDFSDK_XFAWidget*> | 247 CFX_MapPtrTemplate<IXFA_Widget*, CPDFSDK_XFAWidget*> |
249 #define CPDFSDK_FieldSynchronizeMap CFX_MapPtrTemplate<CPDF_FormField*, int> | 248 #define CPDFSDK_FieldSynchronizeMap CFX_MapPtrTemplate<CPDF_FormField*, int> |
| 249 #endif // PDF_ENABLE_XFA |
250 | 250 |
251 #endif | |
252 class CPDFSDK_InterForm : public CPDF_FormNotify { | 251 class CPDFSDK_InterForm : public CPDF_FormNotify { |
253 public: | 252 public: |
254 explicit CPDFSDK_InterForm(CPDFSDK_Document* pDocument); | 253 explicit CPDFSDK_InterForm(CPDFSDK_Document* pDocument); |
255 ~CPDFSDK_InterForm() override; | 254 ~CPDFSDK_InterForm() override; |
256 | 255 |
257 CPDF_InterForm* GetInterForm() const { return m_pInterForm; } | 256 CPDF_InterForm* GetInterForm() const { return m_pInterForm; } |
258 CPDFSDK_Document* GetDocument() const { return m_pDocument; } | 257 CPDFSDK_Document* GetDocument() const { return m_pDocument; } |
259 | 258 |
260 FX_BOOL HighlightWidgets(); | 259 FX_BOOL HighlightWidgets(); |
261 | 260 |
262 CPDFSDK_Widget* GetSibling(CPDFSDK_Widget* pWidget, FX_BOOL bNext) const; | 261 CPDFSDK_Widget* GetSibling(CPDFSDK_Widget* pWidget, FX_BOOL bNext) const; |
263 CPDFSDK_Widget* GetWidget(CPDF_FormControl* pControl) const; | 262 CPDFSDK_Widget* GetWidget(CPDF_FormControl* pControl) const; |
264 void GetWidgets(const CFX_WideString& sFieldName, | 263 void GetWidgets(const CFX_WideString& sFieldName, |
265 std::vector<CPDFSDK_Widget*>* widgets) const; | 264 std::vector<CPDFSDK_Widget*>* widgets) const; |
266 void GetWidgets(CPDF_FormField* pField, | 265 void GetWidgets(CPDF_FormField* pField, |
267 std::vector<CPDFSDK_Widget*>* widgets) const; | 266 std::vector<CPDFSDK_Widget*>* widgets) const; |
268 | 267 |
269 void AddMap(CPDF_FormControl* pControl, CPDFSDK_Widget* pWidget); | 268 void AddMap(CPDF_FormControl* pControl, CPDFSDK_Widget* pWidget); |
270 void RemoveMap(CPDF_FormControl* pControl); | 269 void RemoveMap(CPDF_FormControl* pControl); |
271 | 270 |
| 271 void EnableCalculate(FX_BOOL bEnabled); |
| 272 FX_BOOL IsCalculateEnabled() const; |
| 273 |
272 #ifdef PDF_ENABLE_XFA | 274 #ifdef PDF_ENABLE_XFA |
273 void AddXFAMap(IXFA_Widget* hWidget, CPDFSDK_XFAWidget* pWidget); | 275 void AddXFAMap(IXFA_Widget* hWidget, CPDFSDK_XFAWidget* pWidget); |
274 void RemoveXFAMap(IXFA_Widget* hWidget); | 276 void RemoveXFAMap(IXFA_Widget* hWidget); |
275 CPDFSDK_XFAWidget* GetXFAWidget(IXFA_Widget* hWidget); | 277 CPDFSDK_XFAWidget* GetXFAWidget(IXFA_Widget* hWidget); |
276 | |
277 #endif | |
278 void EnableCalculate(FX_BOOL bEnabled); | |
279 FX_BOOL IsCalculateEnabled() const; | |
280 | |
281 #ifdef PDF_ENABLE_XFA | |
282 void XfaEnableCalculate(FX_BOOL bEnabled); | 278 void XfaEnableCalculate(FX_BOOL bEnabled); |
283 FX_BOOL IsXfaCalculateEnabled() const; | 279 FX_BOOL IsXfaCalculateEnabled() const; |
284 | |
285 FX_BOOL IsXfaValidationsEnabled(); | 280 FX_BOOL IsXfaValidationsEnabled(); |
286 void XfaSetValidationsEnabled(FX_BOOL bEnabled); | 281 void XfaSetValidationsEnabled(FX_BOOL bEnabled); |
| 282 #endif // PDF_ENABLE_XFA |
287 | 283 |
288 #endif | |
289 #ifdef _WIN32 | 284 #ifdef _WIN32 |
290 CPDF_Stream* LoadImageFromFile(const CFX_WideString& sFile); | 285 CPDF_Stream* LoadImageFromFile(const CFX_WideString& sFile); |
291 #endif | 286 #endif |
292 | 287 |
293 void OnKeyStrokeCommit(CPDF_FormField* pFormField, | 288 void OnKeyStrokeCommit(CPDF_FormField* pFormField, |
294 CFX_WideString& csValue, | 289 CFX_WideString& csValue, |
295 FX_BOOL& bRC); | 290 FX_BOOL& bRC); |
296 void OnValidate(CPDF_FormField* pFormField, | 291 void OnValidate(CPDF_FormField* pFormField, |
297 CFX_WideString& csValue, | 292 CFX_WideString& csValue, |
298 FX_BOOL& bRC); | 293 FX_BOOL& bRC); |
(...skipping 19 matching lines...) Expand all Loading... |
318 FX_BOOL bUrlEncoded); | 313 FX_BOOL bUrlEncoded); |
319 FX_BOOL SubmitForm(const CFX_WideString& sDestination, FX_BOOL bUrlEncoded); | 314 FX_BOOL SubmitForm(const CFX_WideString& sDestination, FX_BOOL bUrlEncoded); |
320 FX_BOOL ExportFormToFDFTextBuf(CFX_ByteTextBuf& textBuf); | 315 FX_BOOL ExportFormToFDFTextBuf(CFX_ByteTextBuf& textBuf); |
321 FX_BOOL ExportFieldsToFDFTextBuf(const std::vector<CPDF_FormField*>& fields, | 316 FX_BOOL ExportFieldsToFDFTextBuf(const std::vector<CPDF_FormField*>& fields, |
322 FX_BOOL bIncludeOrExclude, | 317 FX_BOOL bIncludeOrExclude, |
323 CFX_ByteTextBuf& textBuf); | 318 CFX_ByteTextBuf& textBuf); |
324 CFX_WideString GetTemporaryFileName(const CFX_WideString& sFileExt); | 319 CFX_WideString GetTemporaryFileName(const CFX_WideString& sFileExt); |
325 | 320 |
326 #ifdef PDF_ENABLE_XFA | 321 #ifdef PDF_ENABLE_XFA |
327 void SynchronizeField(CPDF_FormField* pFormField, FX_BOOL bSynchronizeElse); | 322 void SynchronizeField(CPDF_FormField* pFormField, FX_BOOL bSynchronizeElse); |
| 323 #endif // PDF_ENABLE_XFA |
328 | 324 |
329 #endif | |
330 private: | 325 private: |
331 // CPDF_FormNotify | 326 // CPDF_FormNotify |
332 int BeforeValueChange(const CPDF_FormField* pField, | 327 int BeforeValueChange(const CPDF_FormField* pField, |
333 CFX_WideString& csValue) override; | 328 CFX_WideString& csValue) override; |
334 int AfterValueChange(const CPDF_FormField* pField) override; | 329 int AfterValueChange(const CPDF_FormField* pField) override; |
335 int BeforeSelectionChange(const CPDF_FormField* pField, | 330 int BeforeSelectionChange(const CPDF_FormField* pField, |
336 CFX_WideString& csValue) override; | 331 CFX_WideString& csValue) override; |
337 int AfterSelectionChange(const CPDF_FormField* pField) override; | 332 int AfterSelectionChange(const CPDF_FormField* pField) override; |
338 int AfterCheckedStatusChange(const CPDF_FormField* pField, | 333 int AfterCheckedStatusChange(const CPDF_FormField* pField, |
339 const CFX_ByteArray& statusArray) override; | 334 const CFX_ByteArray& statusArray) override; |
340 int BeforeFormReset(const CPDF_InterForm* pForm) override; | 335 int BeforeFormReset(const CPDF_InterForm* pForm) override; |
341 int AfterFormReset(const CPDF_InterForm* pForm) override; | 336 int AfterFormReset(const CPDF_InterForm* pForm) override; |
342 int BeforeFormImportData(const CPDF_InterForm* pForm) override; | 337 int BeforeFormImportData(const CPDF_InterForm* pForm) override; |
343 int AfterFormImportData(const CPDF_InterForm* pForm) override; | 338 int AfterFormImportData(const CPDF_InterForm* pForm) override; |
344 | 339 |
345 FX_BOOL FDFToURLEncodedData(CFX_WideString csFDFFile, | 340 FX_BOOL FDFToURLEncodedData(CFX_WideString csFDFFile, |
346 CFX_WideString csTxtFile); | 341 CFX_WideString csTxtFile); |
347 FX_BOOL FDFToURLEncodedData(uint8_t*& pBuf, FX_STRSIZE& nBufSize); | 342 FX_BOOL FDFToURLEncodedData(uint8_t*& pBuf, FX_STRSIZE& nBufSize); |
348 int GetPageIndexByAnnotDict(CPDF_Document* pDocument, | 343 int GetPageIndexByAnnotDict(CPDF_Document* pDocument, |
349 CPDF_Dictionary* pAnnotDict) const; | 344 CPDF_Dictionary* pAnnotDict) const; |
350 | 345 |
351 using CPDFSDK_WidgetMap = std::map<CPDF_FormControl*, CPDFSDK_Widget*>; | 346 using CPDFSDK_WidgetMap = std::map<CPDF_FormControl*, CPDFSDK_Widget*>; |
352 | 347 |
353 CPDFSDK_Document* m_pDocument; | 348 CPDFSDK_Document* m_pDocument; |
354 CPDF_InterForm* m_pInterForm; | 349 CPDF_InterForm* m_pInterForm; |
355 CPDFSDK_WidgetMap m_Map; | 350 CPDFSDK_WidgetMap m_Map; |
356 #ifdef PDF_ENABLE_XFA | 351 #ifdef PDF_ENABLE_XFA |
357 CPDFSDK_XFAWidgetMap m_XFAMap; | 352 CPDFSDK_XFAWidgetMap m_XFAMap; |
358 CPDFSDK_FieldSynchronizeMap m_FieldSynchronizeMap; | 353 CPDFSDK_FieldSynchronizeMap m_FieldSynchronizeMap; |
359 #endif | |
360 FX_BOOL m_bCalculate; | |
361 #ifdef PDF_ENABLE_XFA | |
362 FX_BOOL m_bXfaCalculate; | 354 FX_BOOL m_bXfaCalculate; |
363 FX_BOOL m_bXfaValidationsEnabled; | 355 FX_BOOL m_bXfaValidationsEnabled; |
364 #endif | 356 #endif // PDF_ENABLE_XFA |
| 357 FX_BOOL m_bCalculate; |
365 FX_BOOL m_bBusy; | 358 FX_BOOL m_bBusy; |
366 | 359 |
367 public: | 360 public: |
368 FX_BOOL IsNeedHighLight(int nFieldType); | 361 FX_BOOL IsNeedHighLight(int nFieldType); |
369 void RemoveAllHighLight(); | 362 void RemoveAllHighLight(); |
370 void SetHighlightAlpha(uint8_t alpha) { m_iHighlightAlpha = alpha; } | 363 void SetHighlightAlpha(uint8_t alpha) { m_iHighlightAlpha = alpha; } |
371 uint8_t GetHighlightAlpha() { return m_iHighlightAlpha; } | 364 uint8_t GetHighlightAlpha() { return m_iHighlightAlpha; } |
372 void SetHighlightColor(FX_COLORREF clr, int nFieldType); | 365 void SetHighlightColor(FX_COLORREF clr, int nFieldType); |
373 FX_COLORREF GetHighlightColor(int nFieldType); | 366 FX_COLORREF GetHighlightColor(int nFieldType); |
374 | 367 |
375 private: | 368 private: |
376 #ifndef PDF_ENABLE_XFA | 369 #ifndef PDF_ENABLE_XFA |
377 static const int kNumFieldTypes = 6; | 370 static const int kNumFieldTypes = 6; |
378 #else | 371 #else // PDF_ENABLE_XFA |
379 static const int kNumFieldTypes = 7; | 372 static const int kNumFieldTypes = 7; |
380 #endif | 373 #endif // PDF_ENABLE_XFA |
| 374 |
381 FX_COLORREF m_aHighlightColor[kNumFieldTypes]; | 375 FX_COLORREF m_aHighlightColor[kNumFieldTypes]; |
382 uint8_t m_iHighlightAlpha; | 376 uint8_t m_iHighlightAlpha; |
383 FX_BOOL m_bNeedHightlight[kNumFieldTypes]; | 377 FX_BOOL m_bNeedHightlight[kNumFieldTypes]; |
384 }; | 378 }; |
385 | 379 |
386 #define BAI_STRUCTURE 0 | 380 #define BAI_STRUCTURE 0 |
387 #define BAI_ROW 1 | 381 #define BAI_ROW 1 |
388 #define BAI_COLUMN 2 | 382 #define BAI_COLUMN 2 |
389 | 383 |
390 #define CPDFSDK_Annots CFX_ArrayTemplate<CPDFSDK_Annot*> | 384 #define CPDFSDK_Annots CFX_ArrayTemplate<CPDFSDK_Annot*> |
(...skipping 17 matching lines...) Expand all Loading... |
408 static CPDF_Rect GetAnnotRect(CPDFSDK_Annot* pAnnot); | 402 static CPDF_Rect GetAnnotRect(CPDFSDK_Annot* pAnnot); |
409 | 403 |
410 CPDFSDK_PageView* m_pPageView; | 404 CPDFSDK_PageView* m_pPageView; |
411 CFX_ByteString m_sType; | 405 CFX_ByteString m_sType; |
412 CFX_ByteString m_sSubType; | 406 CFX_ByteString m_sSubType; |
413 int m_nTabs; | 407 int m_nTabs; |
414 CPDFSDK_Annots m_Annots; | 408 CPDFSDK_Annots m_Annots; |
415 }; | 409 }; |
416 | 410 |
417 #endif // FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ | 411 #endif // FPDFSDK_INCLUDE_FSDK_BASEFORM_H_ |
OLD | NEW |