PoDoFo  1.0.0-dev
PdfCheckBox.h
1 
7 #ifndef PDF_CHECKBOX_H
8 #define PDF_CHECKBOX_H
9 
10 #include "PdfButton.h"
11 #include "PdfXObject.h"
12 
13 namespace PoDoFo
14 {
17  class PODOFO_API PdfCheckBox final : public PdfToggleButton
18  {
19  friend class PdfField;
20 
21  private:
22  PdfCheckBox(PdfAcroForm& acroform, const std::shared_ptr<PdfField>& parent);
23 
24  PdfCheckBox(PdfAnnotationWidget& widget, const std::shared_ptr<PdfField>& parent);
25 
26  PdfCheckBox(PdfObject& obj, PdfAcroForm* acroform);
27 
28  public:
34  void SetAppearanceChecked(const PdfXObject& xobj);
35 
41  void SetAppearanceUnchecked(const PdfXObject& xobj);
42 
47  void SetChecked(bool isChecked);
48 
52  bool IsChecked() const;
53 
54  PdfCheckBox* GetParent();
55  const PdfCheckBox* GetParent() const;
56 
57  private:
58 
64  void AddAppearanceStream(const PdfName& name, const PdfReference& reference);
65  };
66 }
67 
68 #endif // PDF_CHECKBOX_H
A checkbox can be checked or unchecked by the user.
Definition: PdfCheckBox.h:18
This class represents a PdfName.
Definition: PdfName.h:24
This class represents a PDF indirect Object in memory.
Definition: PdfObject.h:35
A reference is a pointer to a object in the PDF file of the form "4 0 R", where 4 is the object numbe...
Definition: PdfReference.h:24
A XObject is a content stream with several drawing commands and data which can be used throughout a P...
Definition: PdfXObject.h:30
SPDX-FileCopyrightText: (C) 2022 Francesco Pretto ceztko@gmail.com SPDX-License-Identifier: LGPL-2....
Definition: basetypes.h:16