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_SRC_JAVASCRIPT_FIELD_H_ | 7 #ifndef FPDFSDK_SRC_JAVASCRIPT_FIELD_H_ |
8 #define FPDFSDK_SRC_JAVASCRIPT_FIELD_H_ | 8 #define FPDFSDK_SRC_JAVASCRIPT_FIELD_H_ |
9 | 9 |
10 #include <string> // For std::wstring. | 10 #include <string> // For std::wstring. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 }; | 74 }; |
75 | 75 |
76 struct CJS_DelayData { | 76 struct CJS_DelayData { |
77 CFX_WideString sFieldName; | 77 CFX_WideString sFieldName; |
78 int nControlIndex; | 78 int nControlIndex; |
79 enum FIELD_PROP eProp; | 79 enum FIELD_PROP eProp; |
80 int32_t num; | 80 int32_t num; |
81 bool b; | 81 bool b; |
82 CFX_ByteString string; | 82 CFX_ByteString string; |
83 CFX_WideString widestring; | 83 CFX_WideString widestring; |
84 CPDF_Rect rect; | 84 CFX_FloatRect rect; |
85 CPWL_Color color; | 85 CPWL_Color color; |
86 CFX_DWordArray wordarray; | 86 CFX_DWordArray wordarray; |
87 CJS_WideStringArray widestringarray; | 87 CJS_WideStringArray widestringarray; |
88 }; | 88 }; |
89 | 89 |
90 class Field : public CJS_EmbedObj { | 90 class Field : public CJS_EmbedObj { |
91 public: | 91 public: |
92 explicit Field(CJS_Object* pJSObject); | 92 explicit Field(CJS_Object* pJSObject); |
93 ~Field() override; | 93 ~Field() override; |
94 | 94 |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 const CFX_WideString& swFieldName, | 383 const CFX_WideString& swFieldName, |
384 int nControlIndex, | 384 int nControlIndex, |
385 bool b); | 385 bool b); |
386 static void SetPassword(CPDFSDK_Document* pDocument, | 386 static void SetPassword(CPDFSDK_Document* pDocument, |
387 const CFX_WideString& swFieldName, | 387 const CFX_WideString& swFieldName, |
388 int nControlIndex, | 388 int nControlIndex, |
389 bool b); | 389 bool b); |
390 static void SetRect(CPDFSDK_Document* pDocument, | 390 static void SetRect(CPDFSDK_Document* pDocument, |
391 const CFX_WideString& swFieldName, | 391 const CFX_WideString& swFieldName, |
392 int nControlIndex, | 392 int nControlIndex, |
393 const CPDF_Rect& rect); | 393 const CFX_FloatRect& rect); |
394 static void SetRichText(CPDFSDK_Document* pDocument, | 394 static void SetRichText(CPDFSDK_Document* pDocument, |
395 const CFX_WideString& swFieldName, | 395 const CFX_WideString& swFieldName, |
396 int nControlIndex, | 396 int nControlIndex, |
397 bool b); | 397 bool b); |
398 static void SetRichValue(CPDFSDK_Document* pDocument, | 398 static void SetRichValue(CPDFSDK_Document* pDocument, |
399 const CFX_WideString& swFieldName, | 399 const CFX_WideString& swFieldName, |
400 int nControlIndex); | 400 int nControlIndex); |
401 static void SetRotation(CPDFSDK_Document* pDocument, | 401 static void SetRotation(CPDFSDK_Document* pDocument, |
402 const CFX_WideString& swFieldName, | 402 const CFX_WideString& swFieldName, |
403 int nControlIndex, | 403 int nControlIndex, |
(...skipping 24 matching lines...) Expand all Loading... |
428 const CFX_WideString& string); | 428 const CFX_WideString& string); |
429 static void SetValue(CPDFSDK_Document* pDocument, | 429 static void SetValue(CPDFSDK_Document* pDocument, |
430 const CFX_WideString& swFieldName, | 430 const CFX_WideString& swFieldName, |
431 int nControlIndex, | 431 int nControlIndex, |
432 const CJS_WideStringArray& strArray); | 432 const CJS_WideStringArray& strArray); |
433 | 433 |
434 static void AddField(CPDFSDK_Document* pDocument, | 434 static void AddField(CPDFSDK_Document* pDocument, |
435 int nPageIndex, | 435 int nPageIndex, |
436 int nFieldType, | 436 int nFieldType, |
437 const CFX_WideString& sName, | 437 const CFX_WideString& sName, |
438 const CPDF_Rect& rcCoords); | 438 const CFX_FloatRect& rcCoords); |
439 | 439 |
440 static void UpdateFormField(CPDFSDK_Document* pDocument, | 440 static void UpdateFormField(CPDFSDK_Document* pDocument, |
441 CPDF_FormField* pFormField, | 441 CPDF_FormField* pFormField, |
442 FX_BOOL bChangeMark, | 442 FX_BOOL bChangeMark, |
443 FX_BOOL bResetAP, | 443 FX_BOOL bResetAP, |
444 FX_BOOL bRefresh); | 444 FX_BOOL bRefresh); |
445 static void UpdateFormControl(CPDFSDK_Document* pDocument, | 445 static void UpdateFormControl(CPDFSDK_Document* pDocument, |
446 CPDF_FormControl* pFormControl, | 446 CPDF_FormControl* pFormControl, |
447 FX_BOOL bChangeMark, | 447 FX_BOOL bChangeMark, |
448 FX_BOOL bResetAP, | 448 FX_BOOL bResetAP, |
(...skipping 17 matching lines...) Expand all Loading... |
466 int& iControlNo); | 466 int& iControlNo); |
467 std::vector<CPDF_FormField*> GetFormFields( | 467 std::vector<CPDF_FormField*> GetFormFields( |
468 const CFX_WideString& csFieldName) const; | 468 const CFX_WideString& csFieldName) const; |
469 CPDF_FormControl* GetSmartFieldControl(CPDF_FormField* pFormField); | 469 CPDF_FormControl* GetSmartFieldControl(CPDF_FormField* pFormField); |
470 FX_BOOL ValueIsOccur(CPDF_FormField* pFormField, CFX_WideString csOptLabel); | 470 FX_BOOL ValueIsOccur(CPDF_FormField* pFormField, CFX_WideString csOptLabel); |
471 | 471 |
472 void AddDelay_Int(enum FIELD_PROP prop, int32_t n); | 472 void AddDelay_Int(enum FIELD_PROP prop, int32_t n); |
473 void AddDelay_Bool(enum FIELD_PROP prop, bool b); | 473 void AddDelay_Bool(enum FIELD_PROP prop, bool b); |
474 void AddDelay_String(enum FIELD_PROP prop, const CFX_ByteString& string); | 474 void AddDelay_String(enum FIELD_PROP prop, const CFX_ByteString& string); |
475 void AddDelay_WideString(enum FIELD_PROP prop, const CFX_WideString& string); | 475 void AddDelay_WideString(enum FIELD_PROP prop, const CFX_WideString& string); |
476 void AddDelay_Rect(enum FIELD_PROP prop, const CPDF_Rect& rect); | 476 void AddDelay_Rect(enum FIELD_PROP prop, const CFX_FloatRect& rect); |
477 void AddDelay_Color(enum FIELD_PROP prop, const CPWL_Color& color); | 477 void AddDelay_Color(enum FIELD_PROP prop, const CPWL_Color& color); |
478 void AddDelay_WordArray(enum FIELD_PROP prop, const CFX_DWordArray& array); | 478 void AddDelay_WordArray(enum FIELD_PROP prop, const CFX_DWordArray& array); |
479 void AddDelay_WideStringArray(enum FIELD_PROP prop, | 479 void AddDelay_WideStringArray(enum FIELD_PROP prop, |
480 const CJS_WideStringArray& array); | 480 const CJS_WideStringArray& array); |
481 | 481 |
482 void DoDelay(); | 482 void DoDelay(); |
483 | 483 |
484 public: | 484 public: |
485 Document* m_pJSDoc; | 485 Document* m_pJSDoc; |
486 CPDFSDK_Document* m_pDocument; | 486 CPDFSDK_Document* m_pDocument; |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 JS_STATIC_METHOD(setLock, Field); | 575 JS_STATIC_METHOD(setLock, Field); |
576 JS_STATIC_METHOD(signatureGetModifications, Field); | 576 JS_STATIC_METHOD(signatureGetModifications, Field); |
577 JS_STATIC_METHOD(signatureGetSeedValue, Field); | 577 JS_STATIC_METHOD(signatureGetSeedValue, Field); |
578 JS_STATIC_METHOD(signatureInfo, Field); | 578 JS_STATIC_METHOD(signatureInfo, Field); |
579 JS_STATIC_METHOD(signatureSetSeedValue, Field); | 579 JS_STATIC_METHOD(signatureSetSeedValue, Field); |
580 JS_STATIC_METHOD(signatureSign, Field); | 580 JS_STATIC_METHOD(signatureSign, Field); |
581 JS_STATIC_METHOD(signatureValidate, Field); | 581 JS_STATIC_METHOD(signatureValidate, Field); |
582 }; | 582 }; |
583 | 583 |
584 #endif // FPDFSDK_SRC_JAVASCRIPT_FIELD_H_ | 584 #endif // FPDFSDK_SRC_JAVASCRIPT_FIELD_H_ |
OLD | NEW |