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> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "core/fxcrt/include/cfx_observable.h" | |
14 #include "fpdfsdk/include/fsdk_mgr.h" | |
Tom Sepez
2016/09/12 18:39:37
note: Dan, if you want to split CPDFSDK_Document
dsinclair
2016/09/12 18:49:43
Acknowledged.
| |
13 #include "fpdfsdk/javascript/JS_Define.h" | 15 #include "fpdfsdk/javascript/JS_Define.h" |
14 #include "fpdfsdk/pdfwindow/PWL_Wnd.h" // For CPWL_Color. | 16 #include "fpdfsdk/pdfwindow/PWL_Wnd.h" // For CPWL_Color. |
15 | 17 |
16 class CPDFSDK_Widget; | 18 class CPDFSDK_Widget; |
17 class Document; | 19 class Document; |
18 | 20 |
19 enum FIELD_PROP { | 21 enum FIELD_PROP { |
20 FP_ALIGNMENT, | 22 FP_ALIGNMENT, |
21 FP_BORDERSTYLE, | 23 FP_BORDERSTYLE, |
22 FP_BUTTONALIGNX, | 24 FP_BUTTONALIGNX, |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
452 void AddDelay_Rect(FIELD_PROP prop, const CFX_FloatRect& rect); | 454 void AddDelay_Rect(FIELD_PROP prop, const CFX_FloatRect& rect); |
453 void AddDelay_Color(FIELD_PROP prop, const CPWL_Color& color); | 455 void AddDelay_Color(FIELD_PROP prop, const CPWL_Color& color); |
454 void AddDelay_WordArray(FIELD_PROP prop, const std::vector<uint32_t>& array); | 456 void AddDelay_WordArray(FIELD_PROP prop, const std::vector<uint32_t>& array); |
455 void AddDelay_WideStringArray(FIELD_PROP prop, | 457 void AddDelay_WideStringArray(FIELD_PROP prop, |
456 const std::vector<CFX_WideString>& array); | 458 const std::vector<CFX_WideString>& array); |
457 | 459 |
458 void DoDelay(); | 460 void DoDelay(); |
459 | 461 |
460 public: | 462 public: |
461 Document* m_pJSDoc; | 463 Document* m_pJSDoc; |
462 CPDFSDK_Document* m_pDocument; | 464 CPDFSDK_Document::ObservedPtr m_pDocument; |
463 CFX_WideString m_FieldName; | 465 CFX_WideString m_FieldName; |
464 int m_nFormControlIndex; | 466 int m_nFormControlIndex; |
465 FX_BOOL m_bCanSet; | 467 FX_BOOL m_bCanSet; |
466 FX_BOOL m_bDelay; | 468 FX_BOOL m_bDelay; |
467 }; | 469 }; |
468 | 470 |
469 class CJS_Field : public CJS_Object { | 471 class CJS_Field : public CJS_Object { |
470 public: | 472 public: |
471 explicit CJS_Field(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} | 473 explicit CJS_Field(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} |
472 ~CJS_Field() override {} | 474 ~CJS_Field() override {} |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
549 JS_STATIC_METHOD(setLock, Field); | 551 JS_STATIC_METHOD(setLock, Field); |
550 JS_STATIC_METHOD(signatureGetModifications, Field); | 552 JS_STATIC_METHOD(signatureGetModifications, Field); |
551 JS_STATIC_METHOD(signatureGetSeedValue, Field); | 553 JS_STATIC_METHOD(signatureGetSeedValue, Field); |
552 JS_STATIC_METHOD(signatureInfo, Field); | 554 JS_STATIC_METHOD(signatureInfo, Field); |
553 JS_STATIC_METHOD(signatureSetSeedValue, Field); | 555 JS_STATIC_METHOD(signatureSetSeedValue, Field); |
554 JS_STATIC_METHOD(signatureSign, Field); | 556 JS_STATIC_METHOD(signatureSign, Field); |
555 JS_STATIC_METHOD(signatureValidate, Field); | 557 JS_STATIC_METHOD(signatureValidate, Field); |
556 }; | 558 }; |
557 | 559 |
558 #endif // FPDFSDK_JAVASCRIPT_FIELD_H_ | 560 #endif // FPDFSDK_JAVASCRIPT_FIELD_H_ |
OLD | NEW |