FX Bool considered harmful, part 3
[pdfium.git] / fpdfsdk / include / 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_INCLUDE_JAVASCRIPT_FIELD_H_
8 #define FPDFSDK_INCLUDE_JAVASCRIPT_FIELD_H_
9
10 #include <string>  // For std::wstring.
11
12 // TODO(tsepez): include PWL_Wnd.h for PWL_Color after fixing its IWYU.
13 #include "JS_Define.h"
14
15 class Document;
16
17 enum FIELD_PROP
18 {
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 {
57 public:
58         CJS_WideStringArray(){}
59         virtual ~CJS_WideStringArray()
60         {
61                 for (int i=0,sz=m_Data.GetSize(); i<sz; i++)
62                         delete m_Data.GetAt(i);
63                 m_Data.RemoveAll();
64         }
65
66         void Add(const CFX_WideString& string)
67         {
68                 m_Data.Add(new CFX_WideString(string));
69         }
70
71         int GetSize() const
72         {
73                 return m_Data.GetSize();
74         }
75
76         CFX_WideString GetAt(int i) const
77         {
78                 return *m_Data.GetAt(i);
79         }
80
81 private:
82         CFX_ArrayTemplate<CFX_WideString*>      m_Data;
83 };
84
85 struct CJS_DelayData
86 {
87         CFX_WideString                  sFieldName;
88         int                                             nControlIndex;
89         enum FIELD_PROP                 eProp;
90         int32_t                         num;
91         bool                                    b;
92         CFX_ByteString                  string;
93         CFX_WideString                  widestring;
94         CPDF_Rect                               rect;
95         CPWL_Color                              color;
96         CFX_DWordArray                  wordarray;
97         CJS_WideStringArray             widestringarray;
98 };
99
100 class Field : public CJS_EmbedObj
101 {
102 public:
103         Field(CJS_Object* pJSObject);
104         virtual ~Field(void);
105
106     bool alignment(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
107     bool borderStyle(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
108         bool buttonAlignX(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
109         bool buttonAlignY(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
110         bool buttonFitBounds(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
111         bool buttonPosition(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
112         bool buttonScaleHow(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
113     bool buttonScaleWhen(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
114         bool calcOrderIndex(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
115         bool charLimit(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
116         bool comb(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
117         bool commitOnSelChange(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
118         bool currentValueIndices(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
119     bool defaultStyle(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
120         bool defaultValue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
121         bool doNotScroll(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
122         bool doNotSpellCheck(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
123         bool delay(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
124         bool display(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
125     bool doc(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
126         bool editable(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
127         bool exportValues(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
128         bool fileSelect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
129         bool fillColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
130         bool hidden(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
131     bool highlight(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
132         bool lineWidth(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
133         bool multiline(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
134         bool multipleSelection(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
135         bool name(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
136         bool numItems(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
137     bool page(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
138         bool password(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
139         bool print(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
140         bool radiosInUnison(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
141         bool readonly(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
142         bool rect(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
143     bool required(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
144         bool richText(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
145         bool richValue(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
146         bool rotation(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
147         bool strokeColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
148         bool style(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
149         bool submitName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
150         bool textColor(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
151         bool textFont(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
152         bool textSize(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
153         bool type(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
154         bool userName(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
155         bool value(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
156         bool valueAsString(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
157         bool source(IFXJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
158
159         bool browseForFileToSubmit(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
160         bool buttonGetCaption(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
161         bool buttonGetIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
162         bool buttonImportIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
163         bool buttonSetCaption(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
164         bool buttonSetIcon(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
165         bool checkThisBox(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
166         bool clearItems(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
167         bool defaultIsChecked(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
168         bool deleteItemAt(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
169         bool getArray(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
170         bool getItemAt(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
171         bool getLock(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
172         bool insertItemAt(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
173         bool isBoxChecked(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
174         bool isDefaultChecked(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
175         bool setAction(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
176         bool setFocus(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
177         bool setItems(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
178         bool setLock(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
179         bool signatureGetModifications(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
180         bool signatureGetSeedValue(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
181         bool signatureInfo(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
182         bool signatureSetSeedValue(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
183         bool signatureSign(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
184         bool signatureValidate(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value& vRet, CFX_WideString& sError);
185
186 public:
187         static void SetAlignment(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CFX_ByteString& string);
188     static void SetBorderStyle(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CFX_ByteString& string);
189         static void SetButtonAlignX(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number);
190         static void SetButtonAlignY(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number);
191         static void SetButtonFitBounds(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, bool b);
192         static void SetButtonPosition(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number);
193         static void SetButtonScaleHow(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number);
194     static void SetButtonScaleWhen(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number);
195         static void SetCalcOrderIndex(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number);
196         static void SetCharLimit(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number);
197         static void SetComb(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, bool b);
198         static void SetCommitOnSelChange(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, bool b);
199         static void SetCurrentValueIndices(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CFX_DWordArray& array);
200     static void SetDefaultStyle(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex);
201         static void SetDefaultValue(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CFX_WideString& string);
202         static void SetDoNotScroll(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, bool b);
203         static void SetDisplay(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number);
204         static void SetFillColor(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CPWL_Color& color);
205         static void SetHidden(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, bool b);
206     static void SetHighlight(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CFX_ByteString& string);
207         static void SetLineWidth(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number);
208         static void SetMultiline(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, bool b);
209         static void SetMultipleSelection(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, bool b);
210         static void SetPassword(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, bool b);
211         static void SetRect(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CPDF_Rect& rect);
212         static void SetRichText(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, bool b);
213         static void SetRichValue(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex);
214         static void SetRotation(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number);
215         static void SetStrokeColor(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CPWL_Color& color);
216         static void SetStyle(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CFX_ByteString& string);
217         static void SetTextColor(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CPWL_Color& color);
218         static void SetTextFont(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CFX_ByteString& string);
219         static void SetTextSize(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, int number);
220         static void SetUserName(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CFX_WideString& string);
221         static void SetValue(CPDFSDK_Document* pDocument, const CFX_WideString& swFieldName, int nControlIndex, const CJS_WideStringArray& strArray);
222
223 public:
224         static void                                                     AddField(CPDFSDK_Document* pDocument, int nPageIndex, int nFieldType,
225                                                                                         const CFX_WideString& sName, const CPDF_Rect& rcCoords);
226 public:
227         static void                                                     UpdateFormField(CPDFSDK_Document* pDocument, CPDF_FormField* pFormField,
228                                                                                         bool bChangeMark, bool bResetAP, bool bRefresh);
229         static void                                                     UpdateFormControl(CPDFSDK_Document* pDocument, CPDF_FormControl* pFormControl,
230                                                                                         bool bChangeMark, bool bResetAP, bool bRefresh);
231
232         static CPDFSDK_Widget*                                  GetWidget(CPDFSDK_Document* pDocument, CPDF_FormControl* pFormControl);
233         static void                                                     GetFormFields(CPDFSDK_Document* pDocument, const CFX_WideString& csFieldName, CFX_PtrArray& FieldsArray);
234
235         static void                                                     DoDelay(CPDFSDK_Document* pDocument, CJS_DelayData* pData);
236
237 public:
238         bool                                                            AttachField(Document* pDocument, const CFX_WideString& csFieldName);
239         void                                                            SetDelay(bool bDelay);
240         void                                                            SetIsolate(v8::Isolate* isolate) {m_isolate = isolate;}
241 protected:
242         void                                                            ParseFieldName(const std::wstring &strFieldNameParsed,std::wstring &strFieldName,int & iControlNo);
243         void                                                            GetFormFields(const CFX_WideString& csFieldName, CFX_PtrArray& FieldsArray);
244         CPDF_FormControl*                                       GetSmartFieldControl(CPDF_FormField* pFormField);
245         bool                                                            ValueIsOccur(CPDF_FormField* pFormField, CFX_WideString csOptLabel);
246
247         void                                                            AddDelay_Int(enum FIELD_PROP prop, int32_t n);
248         void                                                            AddDelay_Bool(enum FIELD_PROP prop,bool b);
249         void                                                            AddDelay_String(enum FIELD_PROP prop, const CFX_ByteString& string);
250         void                                                            AddDelay_WideString(enum FIELD_PROP prop, const CFX_WideString& string);
251         void                                                            AddDelay_Rect(enum FIELD_PROP prop, const CPDF_Rect& rect);
252         void                                                            AddDelay_Color(enum FIELD_PROP prop, const CPWL_Color& color);
253         void                                                            AddDelay_WordArray(enum FIELD_PROP prop, const CFX_DWordArray& array);
254         void                                                            AddDelay_WideStringArray(enum FIELD_PROP prop, const CJS_WideStringArray& array);
255
256         void                                                            DoDelay();
257 public:
258         Document*                                                       m_pJSDoc;
259         CPDFSDK_Document*                                       m_pDocument;
260         CFX_WideString                                          m_FieldName;
261         int                                                                     m_nFormControlIndex;
262         bool                                                            m_bCanSet;
263
264         bool                                                            m_bDelay;
265         v8::Isolate*                                                    m_isolate;
266 };
267
268 class CJS_Field : public CJS_Object
269 {
270 public:
271         CJS_Field(JSFXObject pObject) : CJS_Object(pObject) {};
272         virtual ~CJS_Field(void){};
273
274         virtual bool    InitInstance(IFXJS_Context* cc);
275
276         DECLARE_JS_CLASS(CJS_Field);
277
278     JS_STATIC_PROP(alignment, Field);
279     JS_STATIC_PROP(borderStyle, Field);
280         JS_STATIC_PROP(buttonAlignX, Field);
281         JS_STATIC_PROP(buttonAlignY, Field);
282         JS_STATIC_PROP(buttonFitBounds, Field);
283         JS_STATIC_PROP(buttonPosition, Field);
284         JS_STATIC_PROP(buttonScaleHow, Field);
285     JS_STATIC_PROP(buttonScaleWhen, Field);
286         JS_STATIC_PROP(calcOrderIndex, Field);
287         JS_STATIC_PROP(charLimit, Field);
288         JS_STATIC_PROP(comb, Field);
289         JS_STATIC_PROP(commitOnSelChange, Field);
290         JS_STATIC_PROP(currentValueIndices, Field);
291     JS_STATIC_PROP(defaultStyle, Field);
292         JS_STATIC_PROP(defaultValue, Field);
293         JS_STATIC_PROP(doNotScroll, Field);
294         JS_STATIC_PROP(doNotSpellCheck, Field);
295         JS_STATIC_PROP(delay, Field);
296         JS_STATIC_PROP(display, Field);
297     JS_STATIC_PROP(doc, Field);
298         JS_STATIC_PROP(editable, Field);
299         JS_STATIC_PROP(exportValues, Field);
300         JS_STATIC_PROP(fileSelect, Field);
301         JS_STATIC_PROP(fillColor, Field);
302         JS_STATIC_PROP(hidden, Field);
303     JS_STATIC_PROP(highlight, Field);
304         JS_STATIC_PROP(lineWidth, Field);
305         JS_STATIC_PROP(multiline, Field);
306         JS_STATIC_PROP(multipleSelection, Field);
307         JS_STATIC_PROP(name, Field);
308         JS_STATIC_PROP(numItems, Field);
309     JS_STATIC_PROP(page, Field);
310         JS_STATIC_PROP(password, Field);
311         JS_STATIC_PROP(print, Field);
312         JS_STATIC_PROP(radiosInUnison, Field);
313         JS_STATIC_PROP(readonly, Field);
314         JS_STATIC_PROP(rect, Field);
315     JS_STATIC_PROP(required, Field);
316         JS_STATIC_PROP(richText, Field);
317         JS_STATIC_PROP(richValue, Field);
318         JS_STATIC_PROP(rotation, Field);
319         JS_STATIC_PROP(strokeColor, Field);
320         JS_STATIC_PROP(style, Field);
321         JS_STATIC_PROP(submitName, Field);
322         JS_STATIC_PROP(textColor, Field);
323         JS_STATIC_PROP(textFont, Field);
324         JS_STATIC_PROP(textSize, Field);
325         JS_STATIC_PROP(type, Field);
326         JS_STATIC_PROP(userName, Field);
327         JS_STATIC_PROP(value, Field);
328         JS_STATIC_PROP(valueAsString, Field);
329         JS_STATIC_PROP(source, Field);
330
331         JS_STATIC_METHOD(browseForFileToSubmit, Field);
332         JS_STATIC_METHOD(buttonGetCaption, Field);
333         JS_STATIC_METHOD(buttonGetIcon, Field);
334         JS_STATIC_METHOD(buttonImportIcon, Field);
335         JS_STATIC_METHOD(buttonSetCaption, Field);
336         JS_STATIC_METHOD(buttonSetIcon, Field);
337         JS_STATIC_METHOD(checkThisBox, Field);
338         JS_STATIC_METHOD(clearItems, Field);
339         JS_STATIC_METHOD(defaultIsChecked, Field);
340         JS_STATIC_METHOD(deleteItemAt, Field);
341         JS_STATIC_METHOD(getArray, Field);
342         JS_STATIC_METHOD(getItemAt, Field);
343         JS_STATIC_METHOD(getLock, Field);
344         JS_STATIC_METHOD(insertItemAt, Field);
345         JS_STATIC_METHOD(isBoxChecked, Field);
346         JS_STATIC_METHOD(isDefaultChecked, Field);
347         JS_STATIC_METHOD(setAction, Field);
348         JS_STATIC_METHOD(setFocus, Field);
349         JS_STATIC_METHOD(setItems, Field);
350         JS_STATIC_METHOD(setLock, Field);
351         JS_STATIC_METHOD(signatureGetModifications, Field);
352         JS_STATIC_METHOD(signatureGetSeedValue, Field);
353         JS_STATIC_METHOD(signatureInfo, Field);
354         JS_STATIC_METHOD(signatureSetSeedValue, Field);
355         JS_STATIC_METHOD(signatureSign, Field);
356         JS_STATIC_METHOD(signatureValidate, Field);
357 };
358
359 #endif  // FPDFSDK_INCLUDE_JAVASCRIPT_FIELD_H_