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_JAVASCRIPT_FIELD_H_ | 7 #ifndef FPDFSDK_JAVASCRIPT_FIELD_H_ |
8 #define FPDFSDK_JAVASCRIPT_FIELD_H_ | 8 #define FPDFSDK_JAVASCRIPT_FIELD_H_ |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 struct CJS_DelayData { | 77 struct CJS_DelayData { |
78 CFX_WideString sFieldName; | 78 CFX_WideString sFieldName; |
79 int nControlIndex; | 79 int nControlIndex; |
80 enum FIELD_PROP eProp; | 80 enum FIELD_PROP eProp; |
81 int32_t num; | 81 int32_t num; |
82 bool b; | 82 bool b; |
83 CFX_ByteString string; | 83 CFX_ByteString string; |
84 CFX_WideString widestring; | 84 CFX_WideString widestring; |
85 CFX_FloatRect rect; | 85 CFX_FloatRect rect; |
86 CPWL_Color color; | 86 CPWL_Color color; |
87 CFX_ArrayTemplate<FX_DWORD> wordarray; | 87 CFX_ArrayTemplate<uint32_t> wordarray; |
88 CJS_WideStringArray widestringarray; | 88 CJS_WideStringArray widestringarray; |
89 }; | 89 }; |
90 | 90 |
91 class Field : public CJS_EmbedObj { | 91 class Field : public CJS_EmbedObj { |
92 public: | 92 public: |
93 explicit Field(CJS_Object* pJSObject); | 93 explicit Field(CJS_Object* pJSObject); |
94 ~Field() override; | 94 ~Field() override; |
95 | 95 |
96 FX_BOOL alignment(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 96 FX_BOOL alignment(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
97 FX_BOOL borderStyle(IJS_Context* cc, | 97 FX_BOOL borderStyle(IJS_Context* cc, |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 const CFX_WideString& swFieldName, | 337 const CFX_WideString& swFieldName, |
338 int nControlIndex, | 338 int nControlIndex, |
339 bool b); | 339 bool b); |
340 static void SetCommitOnSelChange(CPDFSDK_Document* pDocument, | 340 static void SetCommitOnSelChange(CPDFSDK_Document* pDocument, |
341 const CFX_WideString& swFieldName, | 341 const CFX_WideString& swFieldName, |
342 int nControlIndex, | 342 int nControlIndex, |
343 bool b); | 343 bool b); |
344 static void SetCurrentValueIndices(CPDFSDK_Document* pDocument, | 344 static void SetCurrentValueIndices(CPDFSDK_Document* pDocument, |
345 const CFX_WideString& swFieldName, | 345 const CFX_WideString& swFieldName, |
346 int nControlIndex, | 346 int nControlIndex, |
347 const CFX_ArrayTemplate<FX_DWORD>& array); | 347 const CFX_ArrayTemplate<uint32_t>& array); |
348 static void SetDefaultStyle(CPDFSDK_Document* pDocument, | 348 static void SetDefaultStyle(CPDFSDK_Document* pDocument, |
349 const CFX_WideString& swFieldName, | 349 const CFX_WideString& swFieldName, |
350 int nControlIndex); | 350 int nControlIndex); |
351 static void SetDefaultValue(CPDFSDK_Document* pDocument, | 351 static void SetDefaultValue(CPDFSDK_Document* pDocument, |
352 const CFX_WideString& swFieldName, | 352 const CFX_WideString& swFieldName, |
353 int nControlIndex, | 353 int nControlIndex, |
354 const CFX_WideString& string); | 354 const CFX_WideString& string); |
355 static void SetDoNotScroll(CPDFSDK_Document* pDocument, | 355 static void SetDoNotScroll(CPDFSDK_Document* pDocument, |
356 const CFX_WideString& swFieldName, | 356 const CFX_WideString& swFieldName, |
357 int nControlIndex, | 357 int nControlIndex, |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 CPDF_FormControl* GetSmartFieldControl(CPDF_FormField* pFormField); | 470 CPDF_FormControl* GetSmartFieldControl(CPDF_FormField* pFormField); |
471 FX_BOOL ValueIsOccur(CPDF_FormField* pFormField, CFX_WideString csOptLabel); | 471 FX_BOOL ValueIsOccur(CPDF_FormField* pFormField, CFX_WideString csOptLabel); |
472 | 472 |
473 void AddDelay_Int(enum FIELD_PROP prop, int32_t n); | 473 void AddDelay_Int(enum FIELD_PROP prop, int32_t n); |
474 void AddDelay_Bool(enum FIELD_PROP prop, bool b); | 474 void AddDelay_Bool(enum FIELD_PROP prop, bool b); |
475 void AddDelay_String(enum FIELD_PROP prop, const CFX_ByteString& string); | 475 void AddDelay_String(enum FIELD_PROP prop, const CFX_ByteString& string); |
476 void AddDelay_WideString(enum FIELD_PROP prop, const CFX_WideString& string); | 476 void AddDelay_WideString(enum FIELD_PROP prop, const CFX_WideString& string); |
477 void AddDelay_Rect(enum FIELD_PROP prop, const CFX_FloatRect& rect); | 477 void AddDelay_Rect(enum FIELD_PROP prop, const CFX_FloatRect& rect); |
478 void AddDelay_Color(enum FIELD_PROP prop, const CPWL_Color& color); | 478 void AddDelay_Color(enum FIELD_PROP prop, const CPWL_Color& color); |
479 void AddDelay_WordArray(enum FIELD_PROP prop, | 479 void AddDelay_WordArray(enum FIELD_PROP prop, |
480 const CFX_ArrayTemplate<FX_DWORD>& array); | 480 const CFX_ArrayTemplate<uint32_t>& array); |
481 void AddDelay_WideStringArray(enum FIELD_PROP prop, | 481 void AddDelay_WideStringArray(enum FIELD_PROP prop, |
482 const CJS_WideStringArray& array); | 482 const CJS_WideStringArray& array); |
483 | 483 |
484 void DoDelay(); | 484 void DoDelay(); |
485 | 485 |
486 public: | 486 public: |
487 Document* m_pJSDoc; | 487 Document* m_pJSDoc; |
488 CPDFSDK_Document* m_pDocument; | 488 CPDFSDK_Document* m_pDocument; |
489 CFX_WideString m_FieldName; | 489 CFX_WideString m_FieldName; |
490 int m_nFormControlIndex; | 490 int m_nFormControlIndex; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 JS_STATIC_METHOD(setLock, Field); | 577 JS_STATIC_METHOD(setLock, Field); |
578 JS_STATIC_METHOD(signatureGetModifications, Field); | 578 JS_STATIC_METHOD(signatureGetModifications, Field); |
579 JS_STATIC_METHOD(signatureGetSeedValue, Field); | 579 JS_STATIC_METHOD(signatureGetSeedValue, Field); |
580 JS_STATIC_METHOD(signatureInfo, Field); | 580 JS_STATIC_METHOD(signatureInfo, Field); |
581 JS_STATIC_METHOD(signatureSetSeedValue, Field); | 581 JS_STATIC_METHOD(signatureSetSeedValue, Field); |
582 JS_STATIC_METHOD(signatureSign, Field); | 582 JS_STATIC_METHOD(signatureSign, Field); |
583 JS_STATIC_METHOD(signatureValidate, Field); | 583 JS_STATIC_METHOD(signatureValidate, Field); |
584 }; | 584 }; |
585 | 585 |
586 #endif // FPDFSDK_JAVASCRIPT_FIELD_H_ | 586 #endif // FPDFSDK_JAVASCRIPT_FIELD_H_ |
OLD | NEW |