blob: 148bb4ce24fe122df9a9e264413e3a7206a61ceb [file] [log] [blame]
Lei Zhang28df4062018-10-05 21:18:16 +00001// Copyright 2018 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#ifndef CONSTANTS_FORM_FLAGS_H_
6#define CONSTANTS_FORM_FLAGS_H_
7
8namespace pdfium {
9namespace form_flags {
10
11// PDF 1.7 spec, table 8.70.
12// Field flags common to all field types.
13constexpr uint32_t kReadOnly = 1 << 0;
14constexpr uint32_t kRequired = 1 << 1;
15constexpr uint32_t kNoExport = 1 << 2;
16
Lei Zhanga676aca2019-02-02 00:41:09 +000017// PDF 1.7 spec, table 8.75.
18// Field flags specific to button fields.
19constexpr uint32_t kButtonNoToggleToOff = 1 << 14;
20constexpr uint32_t kButtonRadio = 1 << 15;
21constexpr uint32_t kButtonPushbutton = 1 << 16;
22constexpr uint32_t kButtonRadiosInUnison = 1 << 25;
23
24// PDF 1.7 spec, table 8.77.
25// Field flags specific to text fields.
26constexpr uint32_t kTextMultiline = 1 << 12;
27constexpr uint32_t kTextPassword = 1 << 13;
28constexpr uint32_t kTextFileSelect = 1 << 20;
29constexpr uint32_t kTextDoNotSpellCheck = 1 << 22;
30constexpr uint32_t kTextDoNotScroll = 1 << 23;
31constexpr uint32_t kTextComb = 1 << 24;
32constexpr uint32_t kTextRichText = 1 << 25;
33
34// PDF 1.7 spec, table 8.79.
35// Field flags specific to choice fields.
36constexpr uint32_t kChoiceCombo = 1 << 17;
37constexpr uint32_t kChoiceEdit = 1 << 18;
38constexpr uint32_t kChoiceSort = 1 << 19;
39constexpr uint32_t kChoiceMultiSelect = 1 << 21;
40constexpr uint32_t kChoiceDoNotSpellCheck = 1 << 22;
41constexpr uint32_t kChoiceCommitOnSelChange = 1 << 26;
42
Lei Zhang28df4062018-10-05 21:18:16 +000043} // namespace form_flags
44} // namespace pdfium
45
46#endif // CONSTANTS_FORM_FLAGS_H_