35 static void DoDelay(CPDFSDK_FormFillEnvironment* pFormFillEnv,
38 CJS_Field(v8::Local<v8::Object> pObject, CJS_Runtime* pRuntime);
41 bool AttachField(CJS_Document* pDocument,
const WideString& csFieldName);
55 JS_STATIC_PROP(currentValueIndices, current_value_indices, CJS_Field)
127 static uint32_t ObjDefnID;
128 static const char kName[];
132 CJS_Result get_alignment(CJS_Runtime* pRuntime);
133 CJS_Result set_alignment(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
135 CJS_Result get_border_style(CJS_Runtime* pRuntime);
136 CJS_Result set_border_style(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
138 CJS_Result get_button_align_x(CJS_Runtime* pRuntime);
139 CJS_Result set_button_align_x(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
141 CJS_Result get_button_align_y(CJS_Runtime* pRuntime);
142 CJS_Result set_button_align_y(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
144 CJS_Result get_button_fit_bounds(CJS_Runtime* pRuntime);
145 CJS_Result set_button_fit_bounds(CJS_Runtime* pRuntime,
146 v8::Local<v8::Value> vp);
148 CJS_Result get_button_position(CJS_Runtime* pRuntime);
149 CJS_Result set_button_position(CJS_Runtime* pRuntime,
150 v8::Local<v8::Value> vp);
152 CJS_Result get_button_scale_how(CJS_Runtime* pRuntime);
153 CJS_Result set_button_scale_how(CJS_Runtime* pRuntime,
154 v8::Local<v8::Value> vp);
156 CJS_Result get_button_scale_when(CJS_Runtime* pRuntime);
157 CJS_Result set_button_scale_when(CJS_Runtime* pRuntime,
158 v8::Local<v8::Value> vp);
160 CJS_Result get_calc_order_index(CJS_Runtime* pRuntime);
161 CJS_Result set_calc_order_index(CJS_Runtime* pRuntime,
162 v8::Local<v8::Value> vp);
164 CJS_Result get_char_limit(CJS_Runtime* pRuntime);
165 CJS_Result set_char_limit(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
168 CJS_Result set_comb(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
170 CJS_Result get_commit_on_sel_change(CJS_Runtime* pRuntime);
171 CJS_Result set_commit_on_sel_change(CJS_Runtime* pRuntime,
172 v8::Local<v8::Value> vp);
174 CJS_Result get_current_value_indices(CJS_Runtime* pRuntime);
175 CJS_Result set_current_value_indices(CJS_Runtime* pRuntime,
176 v8::Local<v8::Value> vp);
178 CJS_Result get_default_style(CJS_Runtime* pRuntime);
179 CJS_Result set_default_style(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
181 CJS_Result get_default_value(CJS_Runtime* pRuntime);
182 CJS_Result set_default_value(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
184 CJS_Result get_do_not_scroll(CJS_Runtime* pRuntime);
185 CJS_Result set_do_not_scroll(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
187 CJS_Result get_do_not_spell_check(CJS_Runtime* pRuntime);
188 CJS_Result set_do_not_spell_check(CJS_Runtime* pRuntime,
189 v8::Local<v8::Value> vp);
192 CJS_Result set_delay(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
194 CJS_Result get_display(CJS_Runtime* pRuntime);
195 CJS_Result set_display(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
198 CJS_Result set_doc(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
200 CJS_Result get_editable(CJS_Runtime* pRuntime);
201 CJS_Result set_editable(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
203 CJS_Result get_export_values(CJS_Runtime* pRuntime);
204 CJS_Result set_export_values(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
206 CJS_Result get_file_select(CJS_Runtime* pRuntime);
207 CJS_Result set_file_select(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
209 CJS_Result get_fill_color(CJS_Runtime* pRuntime);
210 CJS_Result set_fill_color(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
213 CJS_Result set_hidden(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
215 CJS_Result get_highlight(CJS_Runtime* pRuntime);
216 CJS_Result set_highlight(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
218 CJS_Result get_line_width(CJS_Runtime* pRuntime);
219 CJS_Result set_line_width(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
221 CJS_Result get_multiline(CJS_Runtime* pRuntime);
222 CJS_Result set_multiline(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
224 CJS_Result get_multiple_selection(CJS_Runtime* pRuntime);
225 CJS_Result set_multiple_selection(CJS_Runtime* pRuntime,
226 v8::Local<v8::Value> vp);
229 CJS_Result set_name(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
231 CJS_Result get_num_items(CJS_Runtime* pRuntime);
232 CJS_Result set_num_items(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
235 CJS_Result set_page(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
237 CJS_Result get_password(CJS_Runtime* pRuntime);
238 CJS_Result set_password(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
241 CJS_Result set_print(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
243 CJS_Result get_radios_in_unison(CJS_Runtime* pRuntime);
244 CJS_Result set_radios_in_unison(CJS_Runtime* pRuntime,
245 v8::Local<v8::Value> vp);
247 CJS_Result get_readonly(CJS_Runtime* pRuntime);
248 CJS_Result set_readonly(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
251 CJS_Result set_rect(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
253 CJS_Result get_required(CJS_Runtime* pRuntime);
254 CJS_Result set_required(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
256 CJS_Result get_rich_text(CJS_Runtime* pRuntime);
257 CJS_Result set_rich_text(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
259 CJS_Result get_rich_value(CJS_Runtime* pRuntime);
260 CJS_Result set_rich_value(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
262 CJS_Result get_rotation(CJS_Runtime* pRuntime);
263 CJS_Result set_rotation(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
265 CJS_Result get_stroke_color(CJS_Runtime* pRuntime);
266 CJS_Result set_stroke_color(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
269 CJS_Result set_style(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
271 CJS_Result get_submit_name(CJS_Runtime* pRuntime);
272 CJS_Result set_submit_name(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
274 CJS_Result get_text_font(CJS_Runtime* pRuntime);
275 CJS_Result set_text_font(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
277 CJS_Result get_text_size(CJS_Runtime* pRuntime);
278 CJS_Result set_text_size(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
281 CJS_Result set_type(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
283 CJS_Result get_user_name(CJS_Runtime* pRuntime);
284 CJS_Result set_user_name(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
287 CJS_Result set_value(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
289 CJS_Result get_value_as_string(CJS_Runtime* pRuntime);
290 CJS_Result set_value_as_string(CJS_Runtime* pRuntime,
291 v8::Local<v8::Value> vp);
294 CJS_Result set_source(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp);
296 CJS_Result browseForFileToSubmit(CJS_Runtime* pRuntime,
297 pdfium::span<v8::Local<v8::Value>> params);
298 CJS_Result buttonGetCaption(CJS_Runtime* pRuntime,
299 pdfium::span<v8::Local<v8::Value>> params);
300 CJS_Result buttonGetIcon(CJS_Runtime* pRuntime,
301 pdfium::span<v8::Local<v8::Value>> params);
302 CJS_Result buttonImportIcon(CJS_Runtime* pRuntime,
303 pdfium::span<v8::Local<v8::Value>> params);
304 CJS_Result buttonSetCaption(CJS_Runtime* pRuntime,
305 pdfium::span<v8::Local<v8::Value>> params);
306 CJS_Result buttonSetIcon(CJS_Runtime* pRuntime,
307 pdfium::span<v8::Local<v8::Value>> params);
308 CJS_Result checkThisBox(CJS_Runtime* pRuntime,
309 pdfium::span<v8::Local<v8::Value>> params);
311 pdfium::span<v8::Local<v8::Value>> params);
312 CJS_Result defaultIsChecked(CJS_Runtime* pRuntime,
313 pdfium::span<v8::Local<v8::Value>> params);
314 CJS_Result deleteItemAt(CJS_Runtime* pRuntime,
315 pdfium::span<v8::Local<v8::Value>> params);
317 pdfium::span<v8::Local<v8::Value>> params);
319 pdfium::span<v8::Local<v8::Value>> params);
321 pdfium::span<v8::Local<v8::Value>> params);
322 CJS_Result insertItemAt(CJS_Runtime* pRuntime,
323 pdfium::span<v8::Local<v8::Value>> params);
324 CJS_Result isBoxChecked(CJS_Runtime* pRuntime,
325 pdfium::span<v8::Local<v8::Value>> params);
326 CJS_Result isDefaultChecked(CJS_Runtime* pRuntime,
327 pdfium::span<v8::Local<v8::Value>> params);
329 pdfium::span<v8::Local<v8::Value>> params);
331 pdfium::span<v8::Local<v8::Value>> params);
333 pdfium::span<v8::Local<v8::Value>> params);
335 pdfium::span<v8::Local<v8::Value>> params);
337 CJS_Runtime* pRuntime,
338 pdfium::span<v8::Local<v8::Value>> params);
339 CJS_Result signatureGetSeedValue(CJS_Runtime* pRuntime,
340 pdfium::span<v8::Local<v8::Value>> params);
341 CJS_Result signatureInfo(CJS_Runtime* pRuntime,
342 pdfium::span<v8::Local<v8::Value>> params);
343 CJS_Result signatureSetSeedValue(CJS_Runtime* pRuntime,
344 pdfium::span<v8::Local<v8::Value>> params);
345 CJS_Result signatureSign(CJS_Runtime* pRuntime,
346 pdfium::span<v8::Local<v8::Value>> params);
347 CJS_Result signatureValidate(CJS_Runtime* pRuntime,
348 pdfium::span<v8::Local<v8::Value>> params);
350 std::vector<CPDF_FormField*> GetFormFields()
const;
354 void SetDelay(
bool bDelay);
355 void AddDelay_Int(
FIELD_PROP prop, int32_t n);
357 void AddDelay_String(
FIELD_PROP prop,
const ByteString& str);
359 void AddDelay_WordArray(
FIELD_PROP prop,
const std::vector<uint32_t>& array);
360 void AddDelay_WideStringArray(
FIELD_PROP prop,
361 const std::vector<WideString>& array);
364 ObservedPtr<CJS_Document> m_pJSDoc;
365 ObservedPtr<CPDFSDK_FormFillEnvironment> m_pFormFillEnv;
366 WideString m_FieldName;
367 int m_nFormControlIndex = -1;
368 bool m_bCanSet =
false;
369 bool m_bDelay =
false;