Clean up CPDF_AnnotList.
[pdfium.git] / fpdfsdk / src / javascript / Field.h
1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef FPDFSDK_SRC_JAVASCRIPT_FIELD_H_
8 #define FPDFSDK_SRC_JAVASCRIPT_FIELD_H_
9
10 #include <string>  // For std::wstring.
11
12 #include "../../include/pdfwindow/PWL_Wnd.h"  // For CPWL_Color.
13 #include "JS_Define.h"
14
15 class CPDFSDK_Widget;
16 class Document;
17
18 enum FIELD_PROP {
19   FP_ALIGNMENT,
20   FP_BORDERSTYLE,
21   FP_BUTTONALIGNX,
22   FP_BUTTONALIGNY,
23   FP_BUTTONFITBOUNDS,
24   FP_BUTTONPOSITION,
25   FP_BUTTONSCALEHOW,
26   FP_BUTTONSCALEWHEN,
27   FP_CALCORDERINDEX,
28   FP_CHARLIMIT,
29   FP_COMB,
30   FP_COMMITONSELCHANGE,
31   FP_CURRENTVALUEINDICES,
32   FP_DEFAULTVALUE,
33   FP_DONOTSCROLL,
34   FP_DISPLAY,
35   FP_FILLCOLOR,
36   FP_HIDDEN,
37   FP_HIGHLIGHT,
38   FP_LINEWIDTH,
39   FP_MULTILINE,
40   FP_MULTIPLESELECTION,
41   FP_PASSWORD,
42   FP_RECT,
43   FP_RICHTEXT,
44   FP_RICHVALUE,
45   FP_ROTATION,
46   FP_STROKECOLOR,
47   FP_STYLE,
48   FP_TEXTCOLOR,
49   FP_TEXTFONT,
50   FP_TEXTSIZE,
51   FP_USERNAME,
52   FP_VALUE
53 };
54
55 class CJS_WideStringArray {
56  public:
57   CJS_WideStringArray() {}
58   virtual ~CJS_WideStringArray() {
59     for (int i = 0, sz = m_Data.GetSize(); i < sz; i++)
60       delete m_Data.GetAt(i);
61     m_Data.RemoveAll();
62   }
63
64   void Add(const CFX_WideString& string) {
65     m_Data.Add(new CFX_WideString(string));
66   }
67
68   int GetSize() const { return m_Data.GetSize(); }
69
70   CFX_WideString GetAt(int i) const { return *m_Data.GetAt(i); }
71
72  private:
73   CFX_ArrayTemplate<CFX_WideString*> m_Data;
74 };
75
76 struct CJS_DelayData {
77   CFX_WideString sFieldName;
78   int nControlIndex;
79   enum FIELD_PROP eProp;
80   int32_t num;
81   bool b;
82   CFX_ByteString string;
83   CFX_WideString widestring;
84   CPDF_Rect rect;
85   CPWL_Color color;
86   CFX_DWordArray wordarray;
87   CJS_WideStringArray widestringarray;
88 };
89
90 class Field : public CJS_EmbedObj {
91  public:
92   Field(CJS_Object* pJSObject);
93   ~Field() override;
94
95   FX_BOOL alignment(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
96   FX_BOOL borderStyle(IJS_Context* cc,
97                       CJS_PropValue& vp,
98                       CFX_WideString& sError);
99   FX_BOOL buttonAlignX(IJS_Context* cc,
100                        CJS_PropValue& vp,
101                        CFX_WideString& sError);
102   FX_BOOL buttonAlignY(IJS_Context* cc,
103                        CJS_PropValue& vp,
104                        CFX_WideString& sError);
105   FX_BOOL buttonFitBounds(IJS_Context* cc,
106                           CJS_PropValue& vp,
107                           CFX_WideString& sError);
108   FX_BOOL buttonPosition(IJS_Context* cc,
109                          CJS_PropValue& vp,
110                          CFX_WideString& sError);
111   FX_BOOL buttonScaleHow(IJS_Context* cc,
112                          CJS_PropValue& vp,
113                          CFX_WideString& sError);
114   FX_BOOL buttonScaleWhen(IJS_Context* cc,
115                           CJS_PropValue& vp,
116                           CFX_WideString& sError);
117   FX_BOOL calcOrderIndex(IJS_Context* cc,
118                          CJS_PropValue& vp,
119                          CFX_WideString& sError);
120   FX_BOOL charLimit(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
121   FX_BOOL comb(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
122   FX_BOOL commitOnSelChange(IJS_Context* cc,
123                             CJS_PropValue& vp,
124                             CFX_WideString& sError);
125   FX_BOOL currentValueIndices(IJS_Context* cc,
126                               CJS_PropValue& vp,
127                               CFX_WideString& sError);
128   FX_BOOL defaultStyle(IJS_Context* cc,
129                        CJS_PropValue& vp,
130                        CFX_WideString& sError);
131   FX_BOOL defaultValue(IJS_Context* cc,
132                        CJS_PropValue& vp,
133                        CFX_WideString& sError);
134   FX_BOOL doNotScroll(IJS_Context* cc,
135                       CJS_PropValue& vp,
136                       CFX_WideString& sError);
137   FX_BOOL doNotSpellCheck(IJS_Context* cc,
138                           CJS_PropValue& vp,
139                           CFX_WideString& sError);
140   FX_BOOL delay(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
141   FX_BOOL display(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
142   FX_BOOL doc(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
143   FX_BOOL editable(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
144   FX_BOOL exportValues(IJS_Context* cc,
145                        CJS_PropValue& vp,
146                        CFX_WideString& sError);
147   FX_BOOL fileSelect(IJS_Context* cc,
148                      CJS_PropValue& vp,
149                      CFX_WideString& sError);
150   FX_BOOL fillColor(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
151   FX_BOOL hidden(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
152   FX_BOOL highlight(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
153   FX_BOOL lineWidth(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
154   FX_BOOL multiline(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
155   FX_BOOL multipleSelection(IJS_Context* cc,
156                             CJS_PropValue& vp,
157                             CFX_WideString& sError);
158   FX_BOOL name(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
159   FX_BOOL numItems(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
160   FX_BOOL page(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
161   FX_BOOL password(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
162   FX_BOOL print(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
163   FX_BOOL radiosInUnison(IJS_Context* cc,
164                          CJS_PropValue& vp,
165                          CFX_WideString& sError);
166   FX_BOOL readonly(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
167   FX_BOOL rect(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
168   FX_BOOL required(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
169   FX_BOOL richText(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
170   FX_BOOL richValue(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
171   FX_BOOL rotation(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
172   FX_BOOL strokeColor(IJS_Context* cc,
173                       CJS_PropValue& vp,
174                       CFX_WideString& sError);
175   FX_BOOL style(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
176   FX_BOOL submitName(IJS_Context* cc,
177                      CJS_PropValue& vp,
178                      CFX_WideString& sError);
179   FX_BOOL textColor(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
180   FX_BOOL textFont(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
181   FX_BOOL textSize(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
182   FX_BOOL type(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
183   FX_BOOL userName(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
184   FX_BOOL value(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
185   FX_BOOL valueAsString(IJS_Context* cc,
186                         CJS_PropValue& vp,
187                         CFX_WideString& sError);
188   FX_BOOL source(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
189
190   FX_BOOL browseForFileToSubmit(IJS_Context* cc,
191                                 const CJS_Parameters& params,
192                                 CJS_Value& vRet,
193                                 CFX_WideString& sError);
194   FX_BOOL buttonGetCaption(IJS_Context* cc,
195                            const CJS_Parameters& params,
196                            CJS_Value& vRet,
197                            CFX_WideString& sError);
198   FX_BOOL buttonGetIcon(IJS_Context* cc,
199                         const CJS_Parameters& params,
200                         CJS_Value& vRet,
201                         CFX_WideString& sError);
202   FX_BOOL buttonImportIcon(IJS_Context* cc,
203                            const CJS_Parameters& params,
204                            CJS_Value& vRet,
205                            CFX_WideString& sError);
206   FX_BOOL buttonSetCaption(IJS_Context* cc,
207                            const CJS_Parameters& params,
208                            CJS_Value& vRet,
209                            CFX_WideString& sError);
210   FX_BOOL buttonSetIcon(IJS_Context* cc,
211                         const CJS_Parameters& params,
212                         CJS_Value& vRet,
213                         CFX_WideString& sError);
214   FX_BOOL checkThisBox(IJS_Context* cc,
215                        const CJS_Parameters& params,
216                        CJS_Value& vRet,
217                        CFX_WideString& sError);
218   FX_BOOL clearItems(IJS_Context* cc,
219                      const CJS_Parameters& params,
220                      CJS_Value& vRet,
221                      CFX_WideString& sError);
222   FX_BOOL defaultIsChecked(IJS_Context* cc,
223                            const CJS_Parameters& params,
224                            CJS_Value& vRet,
225                            CFX_WideString& sError);
226   FX_BOOL deleteItemAt(IJS_Context* cc,
227                        const CJS_Parameters& params,
228                        CJS_Value& vRet,
229                        CFX_WideString& sError);
230   FX_BOOL getArray(IJS_Context* cc,
231                    const CJS_Parameters& params,
232                    CJS_Value& vRet,
233                    CFX_WideString& sError);
234   FX_BOOL getItemAt(IJS_Context* cc,
235                     const CJS_Parameters& params,
236                     CJS_Value& vRet,
237                     CFX_WideString& sError);
238   FX_BOOL getLock(IJS_Context* cc,
239                   const CJS_Parameters& params,
240                   CJS_Value& vRet,
241                   CFX_WideString& sError);
242   FX_BOOL insertItemAt(IJS_Context* cc,
243                        const CJS_Parameters& params,
244                        CJS_Value& vRet,
245                        CFX_WideString& sError);
246   FX_BOOL isBoxChecked(IJS_Context* cc,
247                        const CJS_Parameters& params,
248                        CJS_Value& vRet,
249                        CFX_WideString& sError);
250   FX_BOOL isDefaultChecked(IJS_Context* cc,
251                            const CJS_Parameters& params,
252                            CJS_Value& vRet,
253                            CFX_WideString& sError);
254   FX_BOOL setAction(IJS_Context* cc,
255                     const CJS_Parameters& params,
256                     CJS_Value& vRet,
257                     CFX_WideString& sError);
258   FX_BOOL setFocus(IJS_Context* cc,
259                    const CJS_Parameters& params,
260                    CJS_Value& vRet,
261                    CFX_WideString& sError);
262   FX_BOOL setItems(IJS_Context* cc,
263                    const CJS_Parameters& params,
264                    CJS_Value& vRet,
265                    CFX_WideString& sError);
266   FX_BOOL setLock(IJS_Context* cc,
267                   const CJS_Parameters& params,
268                   CJS_Value& vRet,
269                   CFX_WideString& sError);
270   FX_BOOL signatureGetModifications(IJS_Context* cc,
271                                     const CJS_Parameters& params,
272                                     CJS_Value& vRet,
273                                     CFX_WideString& sError);
274   FX_BOOL signatureGetSeedValue(IJS_Context* cc,
275                                 const CJS_Parameters& params,
276                                 CJS_Value& vRet,
277                                 CFX_WideString& sError);
278   FX_BOOL signatureInfo(IJS_Context* cc,
279                         const CJS_Parameters& params,
280                         CJS_Value& vRet,
281                         CFX_WideString& sError);
282   FX_BOOL signatureSetSeedValue(IJS_Context* cc,
283                                 const CJS_Parameters& params,
284                                 CJS_Value& vRet,
285                                 CFX_WideString& sError);
286   FX_BOOL signatureSign(IJS_Context* cc,
287                         const CJS_Parameters& params,
288                         CJS_Value& vRet,
289                         CFX_WideString& sError);
290   FX_BOOL signatureValidate(IJS_Context* cc,
291                             const CJS_Parameters& params,
292                             CJS_Value& vRet,
293                             CFX_WideString& sError);
294
295  public:
296   static void SetAlignment(CPDFSDK_Document* pDocument,
297                            const CFX_WideString& swFieldName,
298                            int nControlIndex,
299                            const CFX_ByteString& string);
300   static void SetBorderStyle(CPDFSDK_Document* pDocument,
301                              const CFX_WideString& swFieldName,
302                              int nControlIndex,
303                              const CFX_ByteString& string);
304   static void SetButtonAlignX(CPDFSDK_Document* pDocument,
305                               const CFX_WideString& swFieldName,
306                               int nControlIndex,
307                               int number);
308   static void SetButtonAlignY(CPDFSDK_Document* pDocument,
309                               const CFX_WideString& swFieldName,
310                               int nControlIndex,
311                               int number);
312   static void SetButtonFitBounds(CPDFSDK_Document* pDocument,
313                                  const CFX_WideString& swFieldName,
314                                  int nControlIndex,
315                                  bool b);
316   static void SetButtonPosition(CPDFSDK_Document* pDocument,
317                                 const CFX_WideString& swFieldName,
318                                 int nControlIndex,
319                                 int number);
320   static void SetButtonScaleHow(CPDFSDK_Document* pDocument,
321                                 const CFX_WideString& swFieldName,
322                                 int nControlIndex,
323                                 int number);
324   static void SetButtonScaleWhen(CPDFSDK_Document* pDocument,
325                                  const CFX_WideString& swFieldName,
326                                  int nControlIndex,
327                                  int number);
328   static void SetCalcOrderIndex(CPDFSDK_Document* pDocument,
329                                 const CFX_WideString& swFieldName,
330                                 int nControlIndex,
331                                 int number);
332   static void SetCharLimit(CPDFSDK_Document* pDocument,
333                            const CFX_WideString& swFieldName,
334                            int nControlIndex,
335                            int number);
336   static void SetComb(CPDFSDK_Document* pDocument,
337                       const CFX_WideString& swFieldName,
338                       int nControlIndex,
339                       bool b);
340   static void SetCommitOnSelChange(CPDFSDK_Document* pDocument,
341                                    const CFX_WideString& swFieldName,
342                                    int nControlIndex,
343                                    bool b);
344   static void SetCurrentValueIndices(CPDFSDK_Document* pDocument,
345                                      const CFX_WideString& swFieldName,
346                                      int nControlIndex,
347                                      const CFX_DWordArray& array);
348   static void SetDefaultStyle(CPDFSDK_Document* pDocument,
349                               const CFX_WideString& swFieldName,
350                               int nControlIndex);
351   static void SetDefaultValue(CPDFSDK_Document* pDocument,
352                               const CFX_WideString& swFieldName,
353                               int nControlIndex,
354                               const CFX_WideString& string);
355   static void SetDoNotScroll(CPDFSDK_Document* pDocument,
356                              const CFX_WideString& swFieldName,
357                              int nControlIndex,
358                              bool b);
359   static void SetDisplay(CPDFSDK_Document* pDocument,
360                          const CFX_WideString& swFieldName,
361                          int nControlIndex,
362                          int number);
363   static void SetFillColor(CPDFSDK_Document* pDocument,
364                            const CFX_WideString& swFieldName,
365                            int nControlIndex,
366                            const CPWL_Color& color);
367   static void SetHidden(CPDFSDK_Document* pDocument,
368                         const CFX_WideString& swFieldName,
369                         int nControlIndex,
370                         bool b);
371   static void SetHighlight(CPDFSDK_Document* pDocument,
372                            const CFX_WideString& swFieldName,
373                            int nControlIndex,
374                            const CFX_ByteString& string);
375   static void SetLineWidth(CPDFSDK_Document* pDocument,
376                            const CFX_WideString& swFieldName,
377                            int nControlIndex,
378                            int number);
379   static void SetMultiline(CPDFSDK_Document* pDocument,
380                            const CFX_WideString& swFieldName,
381                            int nControlIndex,
382                            bool b);
383   static void SetMultipleSelection(CPDFSDK_Document* pDocument,
384                                    const CFX_WideString& swFieldName,
385                                    int nControlIndex,
386                                    bool b);
387   static void SetPassword(CPDFSDK_Document* pDocument,
388                           const CFX_WideString& swFieldName,
389                           int nControlIndex,
390                           bool b);
391   static void SetRect(CPDFSDK_Document* pDocument,
392                       const CFX_WideString& swFieldName,
393                       int nControlIndex,
394                       const CPDF_Rect& rect);
395   static void SetRichText(CPDFSDK_Document* pDocument,
396                           const CFX_WideString& swFieldName,
397                           int nControlIndex,
398                           bool b);
399   static void SetRichValue(CPDFSDK_Document* pDocument,
400                            const CFX_WideString& swFieldName,
401                            int nControlIndex);
402   static void SetRotation(CPDFSDK_Document* pDocument,
403                           const CFX_WideString& swFieldName,
404                           int nControlIndex,
405                           int number);
406   static void SetStrokeColor(CPDFSDK_Document* pDocument,
407                              const CFX_WideString& swFieldName,
408                              int nControlIndex,
409                              const CPWL_Color& color);
410   static void SetStyle(CPDFSDK_Document* pDocument,
411                        const CFX_WideString& swFieldName,
412                        int nControlIndex,
413                        const CFX_ByteString& string);
414   static void SetTextColor(CPDFSDK_Document* pDocument,
415                            const CFX_WideString& swFieldName,
416                            int nControlIndex,
417                            const CPWL_Color& color);
418   static void SetTextFont(CPDFSDK_Document* pDocument,
419                           const CFX_WideString& swFieldName,
420                           int nControlIndex,
421                           const CFX_ByteString& string);
422   static void SetTextSize(CPDFSDK_Document* pDocument,
423                           const CFX_WideString& swFieldName,
424                           int nControlIndex,
425                           int number);
426   static void SetUserName(CPDFSDK_Document* pDocument,
427                           const CFX_WideString& swFieldName,
428                           int nControlIndex,
429                           const CFX_WideString& string);
430   static void SetValue(CPDFSDK_Document* pDocument,
431                        const CFX_WideString& swFieldName,
432                        int nControlIndex,
433                        const CJS_WideStringArray& strArray);
434
435  public:
436   static void AddField(CPDFSDK_Document* pDocument,
437                        int nPageIndex,
438                        int nFieldType,
439                        const CFX_WideString& sName,
440                        const CPDF_Rect& rcCoords);
441
442  public:
443   static void UpdateFormField(CPDFSDK_Document* pDocument,
444                               CPDF_FormField* pFormField,
445                               FX_BOOL bChangeMark,
446                               FX_BOOL bResetAP,
447                               FX_BOOL bRefresh);
448   static void UpdateFormControl(CPDFSDK_Document* pDocument,
449                                 CPDF_FormControl* pFormControl,
450                                 FX_BOOL bChangeMark,
451                                 FX_BOOL bResetAP,
452                                 FX_BOOL bRefresh);
453
454   static CPDFSDK_Widget* GetWidget(CPDFSDK_Document* pDocument,
455                                    CPDF_FormControl* pFormControl);
456   static void GetFormFields(CPDFSDK_Document* pDocument,
457                             const CFX_WideString& csFieldName,
458                             CFX_PtrArray& FieldsArray);
459
460   static void DoDelay(CPDFSDK_Document* pDocument, CJS_DelayData* pData);
461
462  public:
463   FX_BOOL AttachField(Document* pDocument, const CFX_WideString& csFieldName);
464   void SetDelay(FX_BOOL bDelay);
465   void SetIsolate(v8::Isolate* isolate) { m_isolate = isolate; }
466
467  protected:
468   void ParseFieldName(const std::wstring& strFieldNameParsed,
469                       std::wstring& strFieldName,
470                       int& iControlNo);
471   void GetFormFields(const CFX_WideString& csFieldName,
472                      CFX_PtrArray& FieldsArray);
473   CPDF_FormControl* GetSmartFieldControl(CPDF_FormField* pFormField);
474   FX_BOOL ValueIsOccur(CPDF_FormField* pFormField, CFX_WideString csOptLabel);
475
476   void AddDelay_Int(enum FIELD_PROP prop, int32_t n);
477   void AddDelay_Bool(enum FIELD_PROP prop, bool b);
478   void AddDelay_String(enum FIELD_PROP prop, const CFX_ByteString& string);
479   void AddDelay_WideString(enum FIELD_PROP prop, const CFX_WideString& string);
480   void AddDelay_Rect(enum FIELD_PROP prop, const CPDF_Rect& rect);
481   void AddDelay_Color(enum FIELD_PROP prop, const CPWL_Color& color);
482   void AddDelay_WordArray(enum FIELD_PROP prop, const CFX_DWordArray& array);
483   void AddDelay_WideStringArray(enum FIELD_PROP prop,
484                                 const CJS_WideStringArray& array);
485
486   void DoDelay();
487
488  public:
489   Document* m_pJSDoc;
490   CPDFSDK_Document* m_pDocument;
491   CFX_WideString m_FieldName;
492   int m_nFormControlIndex;
493   FX_BOOL m_bCanSet;
494
495   FX_BOOL m_bDelay;
496   v8::Isolate* m_isolate;
497 };
498
499 class CJS_Field : public CJS_Object {
500  public:
501   CJS_Field(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
502   ~CJS_Field(void) override {}
503
504   void InitInstance(IJS_Runtime* pIRuntime) override;
505
506   DECLARE_JS_CLASS();
507   JS_STATIC_PROP(alignment, Field);
508   JS_STATIC_PROP(borderStyle, Field);
509   JS_STATIC_PROP(buttonAlignX, Field);
510   JS_STATIC_PROP(buttonAlignY, Field);
511   JS_STATIC_PROP(buttonFitBounds, Field);
512   JS_STATIC_PROP(buttonPosition, Field);
513   JS_STATIC_PROP(buttonScaleHow, Field);
514   JS_STATIC_PROP(buttonScaleWhen, Field);
515   JS_STATIC_PROP(calcOrderIndex, Field);
516   JS_STATIC_PROP(charLimit, Field);
517   JS_STATIC_PROP(comb, Field);
518   JS_STATIC_PROP(commitOnSelChange, Field);
519   JS_STATIC_PROP(currentValueIndices, Field);
520   JS_STATIC_PROP(defaultStyle, Field);
521   JS_STATIC_PROP(defaultValue, Field);
522   JS_STATIC_PROP(doNotScroll, Field);
523   JS_STATIC_PROP(doNotSpellCheck, Field);
524   JS_STATIC_PROP(delay, Field);
525   JS_STATIC_PROP(display, Field);
526   JS_STATIC_PROP(doc, Field);
527   JS_STATIC_PROP(editable, Field);
528   JS_STATIC_PROP(exportValues, Field);
529   JS_STATIC_PROP(fileSelect, Field);
530   JS_STATIC_PROP(fillColor, Field);
531   JS_STATIC_PROP(hidden, Field);
532   JS_STATIC_PROP(highlight, Field);
533   JS_STATIC_PROP(lineWidth, Field);
534   JS_STATIC_PROP(multiline, Field);
535   JS_STATIC_PROP(multipleSelection, Field);
536   JS_STATIC_PROP(name, Field);
537   JS_STATIC_PROP(numItems, Field);
538   JS_STATIC_PROP(page, Field);
539   JS_STATIC_PROP(password, Field);
540   JS_STATIC_PROP(print, Field);
541   JS_STATIC_PROP(radiosInUnison, Field);
542   JS_STATIC_PROP(readonly, Field);
543   JS_STATIC_PROP(rect, Field);
544   JS_STATIC_PROP(required, Field);
545   JS_STATIC_PROP(richText, Field);
546   JS_STATIC_PROP(richValue, Field);
547   JS_STATIC_PROP(rotation, Field);
548   JS_STATIC_PROP(strokeColor, Field);
549   JS_STATIC_PROP(style, Field);
550   JS_STATIC_PROP(submitName, Field);
551   JS_STATIC_PROP(textColor, Field);
552   JS_STATIC_PROP(textFont, Field);
553   JS_STATIC_PROP(textSize, Field);
554   JS_STATIC_PROP(type, Field);
555   JS_STATIC_PROP(userName, Field);
556   JS_STATIC_PROP(value, Field);
557   JS_STATIC_PROP(valueAsString, Field);
558   JS_STATIC_PROP(source, Field);
559
560   JS_STATIC_METHOD(browseForFileToSubmit, Field);
561   JS_STATIC_METHOD(buttonGetCaption, Field);
562   JS_STATIC_METHOD(buttonGetIcon, Field);
563   JS_STATIC_METHOD(buttonImportIcon, Field);
564   JS_STATIC_METHOD(buttonSetCaption, Field);
565   JS_STATIC_METHOD(buttonSetIcon, Field);
566   JS_STATIC_METHOD(checkThisBox, Field);
567   JS_STATIC_METHOD(clearItems, Field);
568   JS_STATIC_METHOD(defaultIsChecked, Field);
569   JS_STATIC_METHOD(deleteItemAt, Field);
570   JS_STATIC_METHOD(getArray, Field);
571   JS_STATIC_METHOD(getItemAt, Field);
572   JS_STATIC_METHOD(getLock, Field);
573   JS_STATIC_METHOD(insertItemAt, Field);
574   JS_STATIC_METHOD(isBoxChecked, Field);
575   JS_STATIC_METHOD(isDefaultChecked, Field);
576   JS_STATIC_METHOD(setAction, Field);
577   JS_STATIC_METHOD(setFocus, Field);
578   JS_STATIC_METHOD(setItems, Field);
579   JS_STATIC_METHOD(setLock, Field);
580   JS_STATIC_METHOD(signatureGetModifications, Field);
581   JS_STATIC_METHOD(signatureGetSeedValue, Field);
582   JS_STATIC_METHOD(signatureInfo, Field);
583   JS_STATIC_METHOD(signatureSetSeedValue, Field);
584   JS_STATIC_METHOD(signatureSign, Field);
585   JS_STATIC_METHOD(signatureValidate, Field);
586 };
587
588 #endif  // FPDFSDK_SRC_JAVASCRIPT_FIELD_H_