John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 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. |
Lei Zhang | a6d9f0e | 2015-06-13 00:48:38 -0700 | [diff] [blame] | 4 | |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 5 | // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | |
Dan Sinclair | f766ad2 | 2016-03-14 13:51:24 -0400 | [diff] [blame^] | 7 | #ifndef FPDFSDK_JAVASCRIPT_FIELD_H_ |
| 8 | #define FPDFSDK_JAVASCRIPT_FIELD_H_ |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 9 | |
Dan Sinclair | 3ebd121 | 2016-03-09 09:59:23 -0500 | [diff] [blame] | 10 | #include <string> |
| 11 | #include <vector> |
Tom Sepez | 9a3f812 | 2015-04-07 15:35:48 -0700 | [diff] [blame] | 12 | |
Lei Zhang | bde53d2 | 2015-11-12 22:21:30 -0800 | [diff] [blame] | 13 | #include "fpdfsdk/include/pdfwindow/PWL_Wnd.h" // For CPWL_Color. |
Dan Sinclair | f766ad2 | 2016-03-14 13:51:24 -0400 | [diff] [blame^] | 14 | #include "fpdfsdk/javascript/JS_Define.h" |
Tom Sepez | 9a3f812 | 2015-04-07 15:35:48 -0700 | [diff] [blame] | 15 | |
Tom Sepez | 3745841 | 2015-10-06 11:33:46 -0700 | [diff] [blame] | 16 | class CPDFSDK_Widget; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 17 | class Document; |
| 18 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 19 | enum FIELD_PROP { |
| 20 | FP_ALIGNMENT, |
| 21 | FP_BORDERSTYLE, |
| 22 | FP_BUTTONALIGNX, |
| 23 | FP_BUTTONALIGNY, |
| 24 | FP_BUTTONFITBOUNDS, |
| 25 | FP_BUTTONPOSITION, |
| 26 | FP_BUTTONSCALEHOW, |
| 27 | FP_BUTTONSCALEWHEN, |
| 28 | FP_CALCORDERINDEX, |
| 29 | FP_CHARLIMIT, |
| 30 | FP_COMB, |
| 31 | FP_COMMITONSELCHANGE, |
| 32 | FP_CURRENTVALUEINDICES, |
| 33 | FP_DEFAULTVALUE, |
| 34 | FP_DONOTSCROLL, |
| 35 | FP_DISPLAY, |
| 36 | FP_FILLCOLOR, |
| 37 | FP_HIDDEN, |
| 38 | FP_HIGHLIGHT, |
| 39 | FP_LINEWIDTH, |
| 40 | FP_MULTILINE, |
| 41 | FP_MULTIPLESELECTION, |
| 42 | FP_PASSWORD, |
| 43 | FP_RECT, |
| 44 | FP_RICHTEXT, |
| 45 | FP_RICHVALUE, |
| 46 | FP_ROTATION, |
| 47 | FP_STROKECOLOR, |
| 48 | FP_STYLE, |
| 49 | FP_TEXTCOLOR, |
| 50 | FP_TEXTFONT, |
| 51 | FP_TEXTSIZE, |
| 52 | FP_USERNAME, |
| 53 | FP_VALUE |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 54 | }; |
| 55 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 56 | class CJS_WideStringArray { |
| 57 | public: |
| 58 | CJS_WideStringArray() {} |
| 59 | virtual ~CJS_WideStringArray() { |
| 60 | for (int i = 0, sz = m_Data.GetSize(); i < sz; i++) |
| 61 | delete m_Data.GetAt(i); |
| 62 | m_Data.RemoveAll(); |
| 63 | } |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 64 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 65 | void Add(const CFX_WideString& string) { |
| 66 | m_Data.Add(new CFX_WideString(string)); |
| 67 | } |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 68 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 69 | int GetSize() const { return m_Data.GetSize(); } |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 70 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 71 | CFX_WideString GetAt(int i) const { return *m_Data.GetAt(i); } |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 72 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 73 | private: |
| 74 | CFX_ArrayTemplate<CFX_WideString*> m_Data; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 75 | }; |
| 76 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 77 | struct CJS_DelayData { |
| 78 | CFX_WideString sFieldName; |
| 79 | int nControlIndex; |
| 80 | enum FIELD_PROP eProp; |
| 81 | int32_t num; |
| 82 | bool b; |
| 83 | CFX_ByteString string; |
| 84 | CFX_WideString widestring; |
Tom Sepez | 281a9ea | 2016-02-26 14:24:28 -0800 | [diff] [blame] | 85 | CFX_FloatRect rect; |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 86 | CPWL_Color color; |
| 87 | CFX_DWordArray wordarray; |
| 88 | CJS_WideStringArray widestringarray; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 89 | }; |
| 90 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 91 | class Field : public CJS_EmbedObj { |
| 92 | public: |
Lei Zhang | d88a364 | 2015-11-10 09:38:57 -0800 | [diff] [blame] | 93 | explicit Field(CJS_Object* pJSObject); |
Lei Zhang | 2b1a2d5 | 2015-08-14 22:16:22 -0700 | [diff] [blame] | 94 | ~Field() override; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 95 | |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 96 | FX_BOOL alignment(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 97 | FX_BOOL borderStyle(IJS_Context* cc, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 98 | CJS_PropValue& vp, |
| 99 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 100 | FX_BOOL buttonAlignX(IJS_Context* cc, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 101 | CJS_PropValue& vp, |
| 102 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 103 | FX_BOOL buttonAlignY(IJS_Context* cc, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 104 | CJS_PropValue& vp, |
| 105 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 106 | FX_BOOL buttonFitBounds(IJS_Context* cc, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 107 | CJS_PropValue& vp, |
| 108 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 109 | FX_BOOL buttonPosition(IJS_Context* cc, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 110 | CJS_PropValue& vp, |
| 111 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 112 | FX_BOOL buttonScaleHow(IJS_Context* cc, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 113 | CJS_PropValue& vp, |
| 114 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 115 | FX_BOOL buttonScaleWhen(IJS_Context* cc, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 116 | CJS_PropValue& vp, |
| 117 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 118 | FX_BOOL calcOrderIndex(IJS_Context* cc, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 119 | CJS_PropValue& vp, |
| 120 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 121 | FX_BOOL charLimit(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 122 | FX_BOOL comb(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 123 | FX_BOOL commitOnSelChange(IJS_Context* cc, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 124 | CJS_PropValue& vp, |
| 125 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 126 | FX_BOOL currentValueIndices(IJS_Context* cc, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 127 | CJS_PropValue& vp, |
| 128 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 129 | FX_BOOL defaultStyle(IJS_Context* cc, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 130 | CJS_PropValue& vp, |
| 131 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 132 | FX_BOOL defaultValue(IJS_Context* cc, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 133 | CJS_PropValue& vp, |
| 134 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 135 | FX_BOOL doNotScroll(IJS_Context* cc, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 136 | CJS_PropValue& vp, |
| 137 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 138 | FX_BOOL doNotSpellCheck(IJS_Context* cc, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 139 | CJS_PropValue& vp, |
| 140 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 141 | FX_BOOL delay(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 142 | FX_BOOL display(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 143 | FX_BOOL doc(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 144 | FX_BOOL editable(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 145 | FX_BOOL exportValues(IJS_Context* cc, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 146 | CJS_PropValue& vp, |
| 147 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 148 | FX_BOOL fileSelect(IJS_Context* cc, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 149 | CJS_PropValue& vp, |
| 150 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 151 | FX_BOOL fillColor(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 152 | FX_BOOL hidden(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 153 | FX_BOOL highlight(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 154 | FX_BOOL lineWidth(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 155 | FX_BOOL multiline(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 156 | FX_BOOL multipleSelection(IJS_Context* cc, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 157 | CJS_PropValue& vp, |
| 158 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 159 | FX_BOOL name(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 160 | FX_BOOL numItems(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 161 | FX_BOOL page(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 162 | FX_BOOL password(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 163 | FX_BOOL print(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 164 | FX_BOOL radiosInUnison(IJS_Context* cc, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 165 | CJS_PropValue& vp, |
| 166 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 167 | FX_BOOL readonly(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 168 | FX_BOOL rect(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 169 | FX_BOOL required(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 170 | FX_BOOL richText(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 171 | FX_BOOL richValue(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 172 | FX_BOOL rotation(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 173 | FX_BOOL strokeColor(IJS_Context* cc, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 174 | CJS_PropValue& vp, |
| 175 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 176 | FX_BOOL style(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 177 | FX_BOOL submitName(IJS_Context* cc, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 178 | CJS_PropValue& vp, |
| 179 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 180 | FX_BOOL textColor(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 181 | FX_BOOL textFont(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 182 | FX_BOOL textSize(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 183 | FX_BOOL type(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 184 | FX_BOOL userName(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 185 | FX_BOOL value(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 186 | FX_BOOL valueAsString(IJS_Context* cc, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 187 | CJS_PropValue& vp, |
| 188 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 189 | FX_BOOL source(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 190 | |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 191 | FX_BOOL browseForFileToSubmit(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 192 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 193 | CJS_Value& vRet, |
| 194 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 195 | FX_BOOL buttonGetCaption(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 196 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 197 | CJS_Value& vRet, |
| 198 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 199 | FX_BOOL buttonGetIcon(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 200 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 201 | CJS_Value& vRet, |
| 202 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 203 | FX_BOOL buttonImportIcon(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 204 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 205 | CJS_Value& vRet, |
| 206 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 207 | FX_BOOL buttonSetCaption(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 208 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 209 | CJS_Value& vRet, |
| 210 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 211 | FX_BOOL buttonSetIcon(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 212 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 213 | CJS_Value& vRet, |
| 214 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 215 | FX_BOOL checkThisBox(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 216 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 217 | CJS_Value& vRet, |
| 218 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 219 | FX_BOOL clearItems(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 220 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 221 | CJS_Value& vRet, |
| 222 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 223 | FX_BOOL defaultIsChecked(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 224 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 225 | CJS_Value& vRet, |
| 226 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 227 | FX_BOOL deleteItemAt(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 228 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 229 | CJS_Value& vRet, |
| 230 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 231 | FX_BOOL getArray(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 232 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 233 | CJS_Value& vRet, |
| 234 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 235 | FX_BOOL getItemAt(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 236 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 237 | CJS_Value& vRet, |
| 238 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 239 | FX_BOOL getLock(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 240 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 241 | CJS_Value& vRet, |
| 242 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 243 | FX_BOOL insertItemAt(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 244 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 245 | CJS_Value& vRet, |
| 246 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 247 | FX_BOOL isBoxChecked(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 248 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 249 | CJS_Value& vRet, |
| 250 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 251 | FX_BOOL isDefaultChecked(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 252 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 253 | CJS_Value& vRet, |
| 254 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 255 | FX_BOOL setAction(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 256 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 257 | CJS_Value& vRet, |
| 258 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 259 | FX_BOOL setFocus(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 260 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 261 | CJS_Value& vRet, |
| 262 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 263 | FX_BOOL setItems(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 264 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 265 | CJS_Value& vRet, |
| 266 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 267 | FX_BOOL setLock(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 268 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 269 | CJS_Value& vRet, |
| 270 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 271 | FX_BOOL signatureGetModifications(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 272 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 273 | CJS_Value& vRet, |
| 274 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 275 | FX_BOOL signatureGetSeedValue(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 276 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 277 | CJS_Value& vRet, |
| 278 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 279 | FX_BOOL signatureInfo(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 280 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 281 | CJS_Value& vRet, |
| 282 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 283 | FX_BOOL signatureSetSeedValue(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 284 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 285 | CJS_Value& vRet, |
| 286 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 287 | FX_BOOL signatureSign(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 288 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 289 | CJS_Value& vRet, |
| 290 | CFX_WideString& sError); |
Tom Sepez | ba038bc | 2015-10-08 12:03:00 -0700 | [diff] [blame] | 291 | FX_BOOL signatureValidate(IJS_Context* cc, |
Lei Zhang | 945fdb7 | 2015-11-11 10:18:16 -0800 | [diff] [blame] | 292 | const std::vector<CJS_Value>& params, |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 293 | CJS_Value& vRet, |
| 294 | CFX_WideString& sError); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 295 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 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, |
Tom Sepez | 281a9ea | 2016-02-26 14:24:28 -0800 | [diff] [blame] | 394 | const CFX_FloatRect& rect); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 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); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 434 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 435 | static void AddField(CPDFSDK_Document* pDocument, |
| 436 | int nPageIndex, |
| 437 | int nFieldType, |
| 438 | const CFX_WideString& sName, |
Tom Sepez | 281a9ea | 2016-02-26 14:24:28 -0800 | [diff] [blame] | 439 | const CFX_FloatRect& rcCoords); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 440 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 441 | static void UpdateFormField(CPDFSDK_Document* pDocument, |
| 442 | CPDF_FormField* pFormField, |
| 443 | FX_BOOL bChangeMark, |
| 444 | FX_BOOL bResetAP, |
| 445 | FX_BOOL bRefresh); |
| 446 | static void UpdateFormControl(CPDFSDK_Document* pDocument, |
| 447 | CPDF_FormControl* pFormControl, |
| 448 | FX_BOOL bChangeMark, |
| 449 | FX_BOOL bResetAP, |
| 450 | FX_BOOL bRefresh); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 451 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 452 | static CPDFSDK_Widget* GetWidget(CPDFSDK_Document* pDocument, |
| 453 | CPDF_FormControl* pFormControl); |
Lei Zhang | d88a364 | 2015-11-10 09:38:57 -0800 | [diff] [blame] | 454 | static std::vector<CPDF_FormField*> GetFormFields( |
| 455 | CPDFSDK_Document* pDocument, |
| 456 | const CFX_WideString& csFieldName); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 457 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 458 | static void DoDelay(CPDFSDK_Document* pDocument, CJS_DelayData* pData); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 459 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 460 | FX_BOOL AttachField(Document* pDocument, const CFX_WideString& csFieldName); |
| 461 | void SetDelay(FX_BOOL bDelay); |
| 462 | void SetIsolate(v8::Isolate* isolate) { m_isolate = isolate; } |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 463 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 464 | protected: |
| 465 | void ParseFieldName(const std::wstring& strFieldNameParsed, |
| 466 | std::wstring& strFieldName, |
| 467 | int& iControlNo); |
Lei Zhang | d88a364 | 2015-11-10 09:38:57 -0800 | [diff] [blame] | 468 | std::vector<CPDF_FormField*> GetFormFields( |
| 469 | const CFX_WideString& csFieldName) const; |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 470 | CPDF_FormControl* GetSmartFieldControl(CPDF_FormField* pFormField); |
| 471 | FX_BOOL ValueIsOccur(CPDF_FormField* pFormField, CFX_WideString csOptLabel); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 472 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 473 | void AddDelay_Int(enum FIELD_PROP prop, int32_t n); |
| 474 | void AddDelay_Bool(enum FIELD_PROP prop, bool b); |
| 475 | void AddDelay_String(enum FIELD_PROP prop, const CFX_ByteString& string); |
| 476 | void AddDelay_WideString(enum FIELD_PROP prop, const CFX_WideString& string); |
Tom Sepez | 281a9ea | 2016-02-26 14:24:28 -0800 | [diff] [blame] | 477 | void AddDelay_Rect(enum FIELD_PROP prop, const CFX_FloatRect& rect); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 478 | void AddDelay_Color(enum FIELD_PROP prop, const CPWL_Color& color); |
| 479 | void AddDelay_WordArray(enum FIELD_PROP prop, const CFX_DWordArray& array); |
| 480 | void AddDelay_WideStringArray(enum FIELD_PROP prop, |
| 481 | const CJS_WideStringArray& array); |
| 482 | |
| 483 | void DoDelay(); |
| 484 | |
| 485 | public: |
| 486 | Document* m_pJSDoc; |
| 487 | CPDFSDK_Document* m_pDocument; |
| 488 | CFX_WideString m_FieldName; |
| 489 | int m_nFormControlIndex; |
| 490 | FX_BOOL m_bCanSet; |
| 491 | |
| 492 | FX_BOOL m_bDelay; |
| 493 | v8::Isolate* m_isolate; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 494 | }; |
| 495 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 496 | class CJS_Field : public CJS_Object { |
| 497 | public: |
Lei Zhang | d88a364 | 2015-11-10 09:38:57 -0800 | [diff] [blame] | 498 | explicit CJS_Field(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {} |
Lei Zhang | 2b1a2d5 | 2015-08-14 22:16:22 -0700 | [diff] [blame] | 499 | ~CJS_Field(void) override {} |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 500 | |
Tom Sepez | 3342090 | 2015-10-13 15:00:10 -0700 | [diff] [blame] | 501 | void InitInstance(IJS_Runtime* pIRuntime) override; |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 502 | |
Tom Sepez | cd56a7d | 2015-10-06 11:45:28 -0700 | [diff] [blame] | 503 | DECLARE_JS_CLASS(); |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 504 | JS_STATIC_PROP(alignment, Field); |
| 505 | JS_STATIC_PROP(borderStyle, Field); |
| 506 | JS_STATIC_PROP(buttonAlignX, Field); |
| 507 | JS_STATIC_PROP(buttonAlignY, Field); |
| 508 | JS_STATIC_PROP(buttonFitBounds, Field); |
| 509 | JS_STATIC_PROP(buttonPosition, Field); |
| 510 | JS_STATIC_PROP(buttonScaleHow, Field); |
| 511 | JS_STATIC_PROP(buttonScaleWhen, Field); |
| 512 | JS_STATIC_PROP(calcOrderIndex, Field); |
| 513 | JS_STATIC_PROP(charLimit, Field); |
| 514 | JS_STATIC_PROP(comb, Field); |
| 515 | JS_STATIC_PROP(commitOnSelChange, Field); |
| 516 | JS_STATIC_PROP(currentValueIndices, Field); |
| 517 | JS_STATIC_PROP(defaultStyle, Field); |
| 518 | JS_STATIC_PROP(defaultValue, Field); |
| 519 | JS_STATIC_PROP(doNotScroll, Field); |
| 520 | JS_STATIC_PROP(doNotSpellCheck, Field); |
| 521 | JS_STATIC_PROP(delay, Field); |
| 522 | JS_STATIC_PROP(display, Field); |
| 523 | JS_STATIC_PROP(doc, Field); |
| 524 | JS_STATIC_PROP(editable, Field); |
| 525 | JS_STATIC_PROP(exportValues, Field); |
| 526 | JS_STATIC_PROP(fileSelect, Field); |
| 527 | JS_STATIC_PROP(fillColor, Field); |
| 528 | JS_STATIC_PROP(hidden, Field); |
| 529 | JS_STATIC_PROP(highlight, Field); |
| 530 | JS_STATIC_PROP(lineWidth, Field); |
| 531 | JS_STATIC_PROP(multiline, Field); |
| 532 | JS_STATIC_PROP(multipleSelection, Field); |
| 533 | JS_STATIC_PROP(name, Field); |
| 534 | JS_STATIC_PROP(numItems, Field); |
| 535 | JS_STATIC_PROP(page, Field); |
| 536 | JS_STATIC_PROP(password, Field); |
| 537 | JS_STATIC_PROP(print, Field); |
| 538 | JS_STATIC_PROP(radiosInUnison, Field); |
| 539 | JS_STATIC_PROP(readonly, Field); |
| 540 | JS_STATIC_PROP(rect, Field); |
| 541 | JS_STATIC_PROP(required, Field); |
| 542 | JS_STATIC_PROP(richText, Field); |
| 543 | JS_STATIC_PROP(richValue, Field); |
| 544 | JS_STATIC_PROP(rotation, Field); |
| 545 | JS_STATIC_PROP(strokeColor, Field); |
| 546 | JS_STATIC_PROP(style, Field); |
| 547 | JS_STATIC_PROP(submitName, Field); |
| 548 | JS_STATIC_PROP(textColor, Field); |
| 549 | JS_STATIC_PROP(textFont, Field); |
| 550 | JS_STATIC_PROP(textSize, Field); |
| 551 | JS_STATIC_PROP(type, Field); |
| 552 | JS_STATIC_PROP(userName, Field); |
| 553 | JS_STATIC_PROP(value, Field); |
| 554 | JS_STATIC_PROP(valueAsString, Field); |
| 555 | JS_STATIC_PROP(source, Field); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 556 | |
Nico Weber | 9d8ec5a | 2015-08-04 13:00:21 -0700 | [diff] [blame] | 557 | JS_STATIC_METHOD(browseForFileToSubmit, Field); |
| 558 | JS_STATIC_METHOD(buttonGetCaption, Field); |
| 559 | JS_STATIC_METHOD(buttonGetIcon, Field); |
| 560 | JS_STATIC_METHOD(buttonImportIcon, Field); |
| 561 | JS_STATIC_METHOD(buttonSetCaption, Field); |
| 562 | JS_STATIC_METHOD(buttonSetIcon, Field); |
| 563 | JS_STATIC_METHOD(checkThisBox, Field); |
| 564 | JS_STATIC_METHOD(clearItems, Field); |
| 565 | JS_STATIC_METHOD(defaultIsChecked, Field); |
| 566 | JS_STATIC_METHOD(deleteItemAt, Field); |
| 567 | JS_STATIC_METHOD(getArray, Field); |
| 568 | JS_STATIC_METHOD(getItemAt, Field); |
| 569 | JS_STATIC_METHOD(getLock, Field); |
| 570 | JS_STATIC_METHOD(insertItemAt, Field); |
| 571 | JS_STATIC_METHOD(isBoxChecked, Field); |
| 572 | JS_STATIC_METHOD(isDefaultChecked, Field); |
| 573 | JS_STATIC_METHOD(setAction, Field); |
| 574 | JS_STATIC_METHOD(setFocus, Field); |
| 575 | JS_STATIC_METHOD(setItems, Field); |
| 576 | JS_STATIC_METHOD(setLock, Field); |
| 577 | JS_STATIC_METHOD(signatureGetModifications, Field); |
| 578 | JS_STATIC_METHOD(signatureGetSeedValue, Field); |
| 579 | JS_STATIC_METHOD(signatureInfo, Field); |
| 580 | JS_STATIC_METHOD(signatureSetSeedValue, Field); |
| 581 | JS_STATIC_METHOD(signatureSign, Field); |
| 582 | JS_STATIC_METHOD(signatureValidate, Field); |
John Abd-El-Malek | 3f3b45c | 2014-05-23 17:28:10 -0700 | [diff] [blame] | 583 | }; |
| 584 | |
Dan Sinclair | f766ad2 | 2016-03-14 13:51:24 -0400 | [diff] [blame^] | 585 | #endif // FPDFSDK_JAVASCRIPT_FIELD_H_ |