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

Side by Side Diff: xfa/fxfa/include/fxfa.h

Issue 1938163002: More define cleanup. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 7 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 | « xfa/fxfa/app/xfa_fftextedit.cpp ('k') | xfa/fxfa/parser/xfa_script_eventpseudomodel.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 XFA_FXFA_INCLUDE_FXFA_H_ 7 #ifndef XFA_FXFA_INCLUDE_FXFA_H_
8 #define XFA_FXFA_INCLUDE_FXFA_H_ 8 #define XFA_FXFA_INCLUDE_FXFA_H_
9 9
10 #include <vector> 10 #include <vector>
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 #define XFA_IDS_StringMonth_Nov 91 130 #define XFA_IDS_StringMonth_Nov 91
131 #define XFA_IDS_StringMonth_Dec 92 131 #define XFA_IDS_StringMonth_Dec 92
132 #define XFA_IDS_String_Today 93 132 #define XFA_IDS_String_Today 93
133 #define XFA_IDS_ValidateLimit 94 133 #define XFA_IDS_ValidateLimit 94
134 #define XFA_IDS_ValidateNullWarning 95 134 #define XFA_IDS_ValidateNullWarning 95
135 #define XFA_IDS_ValidateNullError 96 135 #define XFA_IDS_ValidateNullError 96
136 #define XFA_IDS_ValidateWarning 97 136 #define XFA_IDS_ValidateWarning 97
137 #define XFA_IDS_ValidateError 98 137 #define XFA_IDS_ValidateError 98
138 #define XFA_IDS_ValidateNumberError 99 138 #define XFA_IDS_ValidateNumberError 99
139 139
140 #define XFA_DOCVIEW_View 0x00000000
141 #define XFA_DOCVIEW_MasterPage 0x00000001
142 #define XFA_DOCVIEW_Design 0x00000002
143 #define XFA_DOCTYPE_Dynamic 0
144 #define XFA_DOCTYPE_Static 1
145 #define XFA_DOCTYPE_XDP 2
146 #define XFA_PARSESTATUS_StatusErr -3
147 #define XFA_PARSESTATUS_StreamErr -2
148 #define XFA_PARSESTATUS_SyntaxErr -1
149 #define XFA_PARSESTATUS_Ready 0
150 #define XFA_PARSESTATUS_Done 100
151 #define XFA_VALIDATE_preSubmit 1
152 #define XFA_VALIDATE_prePrint 2
153 #define XFA_VALIDATE_preExecute 3
154 #define XFA_VALIDATE_preSave 4
155
156 #define XFA_INVALIDATE_AllPages 0x00000000
157 #define XFA_INVALIDATE_CurrentPage 0x00000001
158 #define XFA_PRINTOPT_ShowDialog 0x00000001
159 #define XFA_PRINTOPT_CanCancel 0x00000002
160 #define XFA_PRINTOPT_ShrinkPage 0x00000004
161 #define XFA_PRINTOPT_AsImage 0x00000008
162 #define XFA_PRINTOPT_ReverseOrder 0x00000010
163 #define XFA_PRINTOPT_PrintAnnot 0x00000020
164 #define XFA_PAGEVIEWEVENT_PostAdded 1
165 #define XFA_PAGEVIEWEVENT_PostRemoved 3
166 #define XFA_PAGEVIEWEVENT_StopLayout 4
167 #define XFA_WIDGETEVENT_PostAdded 2
168 #define XFA_WIDGETEVENT_PreRemoved 3
169
170 #define XFA_EVENTERROR_Success 1
171 #define XFA_EVENTERROR_Error -1
172 #define XFA_EVENTERROR_NotExist 0
173 #define XFA_EVENTERROR_Disabled 2
174
175 #define XFA_RENDERSTATUS_Ready 1
176 #define XFA_RENDERSTATUS_ToBeContinued 2
177 #define XFA_RENDERSTATUS_Done 3
178 #define XFA_RENDERSTATUS_Failed -1
179
180 #define XFA_TRAVERSEWAY_Tranvalse 0x0001
181 #define XFA_TRAVERSEWAY_Form 0x0002
182 #define XFA_WIDGETFILTER_Visible 0x0001
183 #define XFA_WIDGETFILTER_Viewable 0x0010
184 #define XFA_WIDGETFILTER_Printable 0x0020
185 #define XFA_WIDGETFILTER_Field 0x0100
186 #define XFA_WIDGETFILTER_AllType 0x0F00
187
188 #define XFA_WIDGETSTATUS_Visible 0x00000001
189 #define XFA_WIDGETSTATUS_Invisible 0x00000002
190 #define XFA_WIDGETSTATUS_Hidden 0x00000004
191 #define XFA_WIDGETSTATUS_Viewable 0x00000010
192 #define XFA_WIDGETSTATUS_Printable 0x00000020
193 #define XFA_WIDGETSTATUS_Focused 0x00000100
194
195 enum XFA_EVENTTYPE {
196 XFA_EVENT_Click,
197 XFA_EVENT_Change,
198 XFA_EVENT_DocClose,
199 XFA_EVENT_DocReady,
200 XFA_EVENT_Enter,
201 XFA_EVENT_Exit,
202 XFA_EVENT_Full,
203 XFA_EVENT_IndexChange,
204 XFA_EVENT_Initialize,
205 XFA_EVENT_MouseDown,
206 XFA_EVENT_MouseEnter,
207 XFA_EVENT_MouseExit,
208 XFA_EVENT_MouseUp,
209 XFA_EVENT_PostExecute,
210 XFA_EVENT_PostOpen,
211 XFA_EVENT_PostPrint,
212 XFA_EVENT_PostSave,
213 XFA_EVENT_PostSign,
214 XFA_EVENT_PostSubmit,
215 XFA_EVENT_PreExecute,
216 XFA_EVENT_PreOpen,
217 XFA_EVENT_PrePrint,
218 XFA_EVENT_PreSave,
219 XFA_EVENT_PreSign,
220 XFA_EVENT_PreSubmit,
221 XFA_EVENT_Ready,
222 XFA_EVENT_InitCalculate,
223 XFA_EVENT_InitVariables,
224 XFA_EVENT_Calculate,
225 XFA_EVENT_Validate,
226 XFA_EVENT_Unknown,
227 };
228
229 enum XFA_WIDGETORDER {
230 XFA_WIDGETORDER_PreOrder,
231 };
232
233 enum XFA_WIDGETTYPE {
234 XFA_WIDGETTYPE_Barcode,
235 XFA_WIDGETTYPE_PushButton,
236 XFA_WIDGETTYPE_CheckButton,
237 XFA_WIDGETTYPE_RadioButton,
238 XFA_WIDGETTYPE_DatetimeEdit,
239 XFA_WIDGETTYPE_DecimalField,
240 XFA_WIDGETTYPE_NumericField,
241 XFA_WIDGETTYPE_Signature,
242 XFA_WIDGETTYPE_TextEdit,
243 XFA_WIDGETTYPE_DropdownList,
244 XFA_WIDGETTYPE_ListBox,
245 XFA_WIDGETTYPE_ImageField,
246 XFA_WIDGETTYPE_PasswordEdit,
247 XFA_WIDGETTYPE_Arc,
248 XFA_WIDGETTYPE_Rectangle,
249 XFA_WIDGETTYPE_Image,
250 XFA_WIDGETTYPE_Line,
251 XFA_WIDGETTYPE_Text,
252 XFA_WIDGETTYPE_ExcludeGroup,
253 XFA_WIDGETTYPE_Subform,
254 XFA_WIDGETTYPE_Unknown,
255 };
256
140 // Probably should be called IXFA_AppDelegate. 257 // Probably should be called IXFA_AppDelegate.
141 class IXFA_AppProvider { 258 class IXFA_AppProvider {
142 public: 259 public:
143 virtual ~IXFA_AppProvider() {} 260 virtual ~IXFA_AppProvider() {}
144 261
145 /** 262 /**
146 * Specifies the name of the client application in which a form currently 263 * Specifies the name of the client application in which a form currently
147 * exists. Such as Exchange-Pro. 264 * exists. Such as Exchange-Pro.
148 */ 265 */
149 virtual void SetAppType(const CFX_WideStringC& wsAppType) = 0; 266 virtual void SetAppType(const CFX_WideStringC& wsAppType) = 0;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 * @return TRUE Server permitted the post request, FALSE otherwise. 372 * @return TRUE Server permitted the post request, FALSE otherwise.
256 */ 373 */
257 virtual FX_BOOL PutRequestURL(const CFX_WideStringC& wsURL, 374 virtual FX_BOOL PutRequestURL(const CFX_WideStringC& wsURL,
258 const CFX_WideStringC& wsData, 375 const CFX_WideStringC& wsData,
259 const CFX_WideStringC& wsEncode) = 0; 376 const CFX_WideStringC& wsEncode) = 0;
260 377
261 virtual void LoadString(int32_t iStringID, CFX_WideString& wsString) = 0; 378 virtual void LoadString(int32_t iStringID, CFX_WideString& wsString) = 0;
262 virtual IFWL_AdapterTimerMgr* GetTimerMgr() = 0; 379 virtual IFWL_AdapterTimerMgr* GetTimerMgr() = 0;
263 }; 380 };
264 381
265 #define XFA_INVALIDATE_AllPages 0x00000000
266 #define XFA_INVALIDATE_CurrentPage 0x00000001
267 #define XFA_PRINTOPT_ShowDialog 0x00000001
268 #define XFA_PRINTOPT_CanCancel 0x00000002
269 #define XFA_PRINTOPT_ShrinkPage 0x00000004
270 #define XFA_PRINTOPT_AsImage 0x00000008
271 #define XFA_PRINTOPT_ReverseOrder 0x00000010
272 #define XFA_PRINTOPT_PrintAnnot 0x00000020
273 #define XFA_PAGEVIEWEVENT_PostAdded 1
274 #define XFA_PAGEVIEWEVENT_PostRemoved 3
275 #define XFA_PAGEVIEWEVENT_StopLayout 4
276 #define XFA_WIDGETEVENT_PostAdded 2
277 #define XFA_WIDGETEVENT_PreRemoved 3
278
279 class IXFA_DocProvider { 382 class IXFA_DocProvider {
280 public: 383 public:
281 virtual ~IXFA_DocProvider() {} 384 virtual ~IXFA_DocProvider() {}
282 385
283 virtual void SetChangeMark(CXFA_FFDoc* hDoc) = 0; 386 virtual void SetChangeMark(CXFA_FFDoc* hDoc) = 0;
284 virtual void InvalidateRect(CXFA_FFPageView* pPageView, 387 virtual void InvalidateRect(CXFA_FFPageView* pPageView,
285 const CFX_RectF& rt, 388 const CFX_RectF& rt,
286 uint32_t dwFlags = 0) = 0; 389 uint32_t dwFlags = 0) = 0;
287 virtual void DisplayCaret(CXFA_FFWidget* hWidget, 390 virtual void DisplayCaret(CXFA_FFWidget* hWidget,
288 FX_BOOL bVisible, 391 FX_BOOL bVisible,
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 FXJSE_HVALUE hValue) = 0; 469 FXJSE_HVALUE hValue) = 0;
367 virtual FX_BOOL SetGlobalProperty(CXFA_FFDoc* hDoc, 470 virtual FX_BOOL SetGlobalProperty(CXFA_FFDoc* hDoc,
368 const CFX_ByteStringC& szPropName, 471 const CFX_ByteStringC& szPropName,
369 FXJSE_HVALUE hValue) = 0; 472 FXJSE_HVALUE hValue) = 0;
370 virtual CPDF_Document* OpenPDF(CXFA_FFDoc* hDoc, 473 virtual CPDF_Document* OpenPDF(CXFA_FFDoc* hDoc,
371 IFX_FileRead* pFile, 474 IFX_FileRead* pFile,
372 FX_BOOL bTakeOverFile) = 0; 475 FX_BOOL bTakeOverFile) = 0;
373 virtual IFX_FileRead* OpenLinkedFile(CXFA_FFDoc* hDoc, 476 virtual IFX_FileRead* OpenLinkedFile(CXFA_FFDoc* hDoc,
374 const CFX_WideString& wsLink) = 0; 477 const CFX_WideString& wsLink) = 0;
375 }; 478 };
376 #define XFA_DOCVIEW_View 0x00000000
377 #define XFA_DOCVIEW_MasterPage 0x00000001
378 #define XFA_DOCVIEW_Design 0x00000002
379 #define XFA_DOCTYPE_Dynamic 0
380 #define XFA_DOCTYPE_Static 1
381 #define XFA_DOCTYPE_XDP 2
382 #define XFA_PARSESTATUS_StatusErr -3
383 #define XFA_PARSESTATUS_StreamErr -2
384 #define XFA_PARSESTATUS_SyntaxErr -1
385 #define XFA_PARSESTATUS_Ready 0
386 #define XFA_PARSESTATUS_Done 100
387 479
388 enum XFA_EVENTTYPE {
389 XFA_EVENT_Click,
390 XFA_EVENT_Change,
391 XFA_EVENT_DocClose,
392 XFA_EVENT_DocReady,
393 XFA_EVENT_Enter,
394 XFA_EVENT_Exit,
395 XFA_EVENT_Full,
396 XFA_EVENT_IndexChange,
397 XFA_EVENT_Initialize,
398 XFA_EVENT_MouseDown,
399 XFA_EVENT_MouseEnter,
400 XFA_EVENT_MouseExit,
401 XFA_EVENT_MouseUp,
402 XFA_EVENT_PostExecute,
403 XFA_EVENT_PostOpen,
404 XFA_EVENT_PostPrint,
405 XFA_EVENT_PostSave,
406 XFA_EVENT_PostSign,
407 XFA_EVENT_PostSubmit,
408 XFA_EVENT_PreExecute,
409 XFA_EVENT_PreOpen,
410 XFA_EVENT_PrePrint,
411 XFA_EVENT_PreSave,
412 XFA_EVENT_PreSign,
413 XFA_EVENT_PreSubmit,
414 XFA_EVENT_Ready,
415 XFA_EVENT_InitCalculate,
416 XFA_EVENT_InitVariables,
417 XFA_EVENT_Calculate,
418 XFA_EVENT_Validate,
419 XFA_EVENT_Unknown,
420 };
421 #define XFA_VALIDATE_preSubmit 1
422 #define XFA_VALIDATE_prePrint 2
423 #define XFA_VALIDATE_preExecute 3
424 #define XFA_VALIDATE_preSave 4
425 class CXFA_EventParam { 480 class CXFA_EventParam {
426 public: 481 public:
427 CXFA_EventParam() { 482 CXFA_EventParam() {
428 m_pTarget = NULL; 483 m_pTarget = NULL;
429 m_eType = XFA_EVENT_Unknown; 484 m_eType = XFA_EVENT_Unknown;
430 m_wsResult.clear(); 485 m_wsResult.clear();
431 Reset(); 486 Reset();
432 } 487 }
433 void Reset() { 488 void Reset() {
434 m_wsChange.clear(); 489 m_wsChange.clear();
(...skipping 29 matching lines...) Expand all
464 CFX_WideString m_wsFullText; 519 CFX_WideString m_wsFullText;
465 CFX_WideString m_wsNewContentType; 520 CFX_WideString m_wsNewContentType;
466 CFX_WideString m_wsNewText; 521 CFX_WideString m_wsNewText;
467 CFX_WideString m_wsPrevContentType; 522 CFX_WideString m_wsPrevContentType;
468 CFX_WideString m_wsPrevText; 523 CFX_WideString m_wsPrevText;
469 CFX_WideString m_wsSoapFaultCode; 524 CFX_WideString m_wsSoapFaultCode;
470 CFX_WideString m_wsSoapFaultString; 525 CFX_WideString m_wsSoapFaultString;
471 FX_BOOL m_bIsFormReady; 526 FX_BOOL m_bIsFormReady;
472 int32_t m_iValidateActivities; 527 int32_t m_iValidateActivities;
473 }; 528 };
474 #define XFA_EVENTERROR_Success 1
475 #define XFA_EVENTERROR_Error -1
476 #define XFA_EVENTERROR_NotExist 0
477 #define XFA_EVENTERROR_Disabled 2
478 enum XFA_WIDGETORDER {
479 XFA_WIDGETORDER_PreOrder,
480 };
481
482 #define XFA_TRAVERSEWAY_Tranvalse 0x0001
483 #define XFA_TRAVERSEWAY_Form 0x0002
484 #define XFA_WIDGETFILTER_Visible 0x0001
485 #define XFA_WIDGETFILTER_Viewable 0x0010
486 #define XFA_WIDGETFILTER_Printable 0x0020
487 #define XFA_WIDGETFILTER_Field 0x0100
488 #define XFA_WIDGETFILTER_AllType 0x0F00
489 529
490 class CXFA_RenderOptions { 530 class CXFA_RenderOptions {
491 public: 531 public:
492 CXFA_RenderOptions() : m_bPrint(FALSE), m_bHighlight(TRUE) {} 532 CXFA_RenderOptions() : m_bPrint(FALSE), m_bHighlight(TRUE) {}
493 FX_BOOL m_bPrint; 533 FX_BOOL m_bPrint;
494 FX_BOOL m_bHighlight; 534 FX_BOOL m_bHighlight;
495 }; 535 };
496 #define XFA_RENDERSTATUS_Ready 1
497 #define XFA_RENDERSTATUS_ToBeContinued 2
498 #define XFA_RENDERSTATUS_Done 3
499 #define XFA_RENDERSTATUS_Failed -1
500
501 enum XFA_WIDGETTYPE {
502 XFA_WIDGETTYPE_Barcode,
503 XFA_WIDGETTYPE_PushButton,
504 XFA_WIDGETTYPE_CheckButton,
505 XFA_WIDGETTYPE_RadioButton,
506 XFA_WIDGETTYPE_DatetimeEdit,
507 XFA_WIDGETTYPE_DecimalField,
508 XFA_WIDGETTYPE_NumericField,
509 XFA_WIDGETTYPE_Signature,
510 XFA_WIDGETTYPE_TextEdit,
511 XFA_WIDGETTYPE_DropdownList,
512 XFA_WIDGETTYPE_ListBox,
513 XFA_WIDGETTYPE_ImageField,
514 XFA_WIDGETTYPE_PasswordEdit,
515 XFA_WIDGETTYPE_Arc,
516 XFA_WIDGETTYPE_Rectangle,
517 XFA_WIDGETTYPE_Image,
518 XFA_WIDGETTYPE_Line,
519 XFA_WIDGETTYPE_Text,
520 XFA_WIDGETTYPE_ExcludeGroup,
521 XFA_WIDGETTYPE_Subform,
522 XFA_WIDGETTYPE_Unknown,
523 };
524 #define XFA_WIDGETSTATUS_Visible 0x00000001
525 #define XFA_WIDGETSTATUS_Invisible 0x00000002
526 #define XFA_WIDGETSTATUS_Hidden 0x00000004
527 #define XFA_WIDGETSTATUS_Viewable 0x00000010
528 #define XFA_WIDGETSTATUS_Printable 0x00000020
529 #define XFA_WIDGETSTATUS_Focused 0x00000100
530 536
531 class IXFA_WidgetIterator { 537 class IXFA_WidgetIterator {
532 public: 538 public:
533 virtual void Release() = 0; 539 virtual void Release() = 0;
534 virtual void Reset() = 0; 540 virtual void Reset() = 0;
535 virtual CXFA_FFWidget* MoveToFirst() = 0; 541 virtual CXFA_FFWidget* MoveToFirst() = 0;
536 virtual CXFA_FFWidget* MoveToLast() = 0; 542 virtual CXFA_FFWidget* MoveToLast() = 0;
537 virtual CXFA_FFWidget* MoveToNext() = 0; 543 virtual CXFA_FFWidget* MoveToNext() = 0;
538 virtual CXFA_FFWidget* MoveToPrevious() = 0; 544 virtual CXFA_FFWidget* MoveToPrevious() = 0;
539 virtual CXFA_FFWidget* GetCurrentWidget() = 0; 545 virtual CXFA_FFWidget* GetCurrentWidget() = 0;
540 virtual FX_BOOL SetCurrentWidget(CXFA_FFWidget* hWidget) = 0; 546 virtual FX_BOOL SetCurrentWidget(CXFA_FFWidget* hWidget) = 0;
541 547
542 protected: 548 protected:
543 ~IXFA_WidgetIterator() {} 549 ~IXFA_WidgetIterator() {}
544 }; 550 };
545 551
546 #endif // XFA_FXFA_INCLUDE_FXFA_H_ 552 #endif // XFA_FXFA_INCLUDE_FXFA_H_
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_fftextedit.cpp ('k') | xfa/fxfa/parser/xfa_script_eventpseudomodel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698