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