xref: /aosp_15_r20/external/pdfium/core/fpdfdoc/cpdf_generateap.h (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1 // Copyright 2016 The PDFium Authors
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 CORE_FPDFDOC_CPDF_GENERATEAP_H_
8 #define CORE_FPDFDOC_CPDF_GENERATEAP_H_
9 
10 #include "core/fpdfdoc/cpdf_annot.h"
11 
12 class CPDF_Dictionary;
13 class CPDF_Document;
14 
15 class CPDF_GenerateAP {
16  public:
17   enum FormType { kTextField, kComboBox, kListBox };
18 
19   static void GenerateFormAP(CPDF_Document* pDoc,
20                              CPDF_Dictionary* pAnnotDict,
21                              FormType type);
22 
23   static void GenerateEmptyAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict);
24 
25   static bool GenerateAnnotAP(CPDF_Document* pDoc,
26                               CPDF_Dictionary* pAnnotDict,
27                               CPDF_Annot::Subtype subtype);
28 
29   CPDF_GenerateAP() = delete;
30   CPDF_GenerateAP(const CPDF_GenerateAP&) = delete;
31   CPDF_GenerateAP& operator=(const CPDF_GenerateAP&) = delete;
32 };
33 
34 #endif  // CORE_FPDFDOC_CPDF_GENERATEAP_H_
35