ChoiceField.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 
4 #include <system/array.h>
5 #include <cstdint>
6 
7 #include "Aspose.PDF.Cpp/InteractiveFeatures/Forms/Field.h"
8 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
9 
10 namespace Aspose
11 {
12 namespace Pdf
13 {
14 class Document;
15 namespace Engine
16 {
17 namespace Data
18 {
19 class IPdfObject;
20 } // namespace Data
21 } // namespace Engine
22 namespace Forms
23 {
24 class ComboBoxField;
25 class ListBoxField;
26 class OptionCollection;
27 class RadioButtonField;
28 } // namespace Forms
29 class Page;
30 namespace Plugins
31 {
32 class FormComboBoxFieldSetOptions;
33 } // namespace Plugins
34 class Rectangle;
35 } // namespace Pdf
36 } // namespace Aspose
37 namespace System
38 {
39 namespace Collections
40 {
41 namespace Generic
42 {
43 template <typename> class List;
44 } // namespace Generic
45 } // namespace Collections
46 } // namespace System
47 
48 namespace Aspose {
49 
50 namespace Pdf {
51 
52 namespace Forms {
53 
57 class ASPOSE_PDF_SHARED_CLASS ChoiceField : public Aspose::Pdf::Forms::Field
58 {
59  typedef ChoiceField ThisType;
61 
62  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
63  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
64 
69 
70 public:
71 
75  ASPOSE_PDF_SHARED_API bool get_CommitImmediately();
79  ASPOSE_PDF_SHARED_API void set_CommitImmediately(bool value);
83  ASPOSE_PDF_SHARED_API bool get_MultiSelect();
87  ASPOSE_PDF_SHARED_API void set_MultiSelect(bool value);
91  virtual ASPOSE_PDF_SHARED_API int32_t get_Selected();
95  virtual ASPOSE_PDF_SHARED_API void set_Selected(int32_t value);
99  virtual ASPOSE_PDF_SHARED_API System::ArrayPtr<int32_t> get_SelectedItems();
103  virtual ASPOSE_PDF_SHARED_API void set_SelectedItems(System::ArrayPtr<int32_t> value);
107  virtual ASPOSE_PDF_SHARED_API System::SharedPtr<OptionCollection> get_Options();
111  ASPOSE_PDF_SHARED_API System::String get_Value() override;
115  ASPOSE_PDF_SHARED_API void set_Value(System::String value) override;
116 
127  ASPOSE_PDF_SHARED_API ChoiceField(System::SharedPtr<Document> doc);
134 
139  virtual ASPOSE_PDF_SHARED_API void AddOption(System::String optionName);
145  virtual ASPOSE_PDF_SHARED_API void AddOption(System::String export_, System::String name);
150  virtual ASPOSE_PDF_SHARED_API void DeleteOption(System::String optionName);
151 
152 protected:
153 
154  static const ASPOSE_PDF_SHARED_API int32_t ValueNotSelected;
155 
161 
163  ChoiceField();
164 
165  ASPOSE_PDF_SHARED_API System::SharedPtr<Field> CreateCopy() override;
166 
167  virtual ASPOSE_PDF_SHARED_API ~ChoiceField();
168 
169 private:
170 
172 
173 };
174 
175 } // namespace Forms
176 } // namespace Pdf
177 } // namespace Aspose
178 
179 
String class used across the library. Is a substitute for C# System.String when translating code...
Definition: string.h:121
class ASPOSECPP_SHARED_CLASS List
Definition: ienumerable.h:17
ASPOSE_PDF_SHARED_API void set_Value(System::String value)
Gets/sets the value to determine property Value for created/modified field (if will be set)...
Class representing Combobox field of the form.
Definition: ComboBoxField.h:63
Definition: Artifact.h:67
ASPOSE_PDF_SHARED_API void set_Selected(System::Nullable< int32_t > value)
Gets/sets the value to determine property Selected for modified field (if will be set)...
ASPOSE_PDF_SHARED_API System::String get_Value() const
Gets/sets the value to determine property Value for created/modified field (if will be set)...
ASPOSE_PDF_SHARED_API const System::SharedPtr< System::Collections::Generic::List< System::String > > & get_Options() const
Gets/sets the value to determine property Options for modified field (if will be set).
Base class for acro form fields.
Definition: Field.h:130
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: fwd.h:22
Represents base class for choice fields.
Definition: ChoiceField.h:57
Definition: AFRelationship.h:4
Class represents ListBox field.
Definition: ListBoxField.h:54
Defies a method that enables object cloning - creating a copy of an object. Objects of this class sho...
Definition: icloneable.h:15
Class representing radio button field.
Definition: RadioButtonField.h:75
static const ASPOSE_PDF_SHARED_API int32_t ValueNotSelected
Definition: ChoiceField.h:154
List forward declaration.
Definition: Artifact.h:74
The coordinates are in the page coordinate context.
Represents a abstract base object can be added to the page(doc.Paragraphs.Add()). ...
Definition: BaseParagraph.h:66
Represents options for set properties in ComboBoxField by FormEditor plugin.
Definition: FormComboBoxFieldSetOptions.h:41
ASPOSE_PDF_SHARED_API System::Nullable< int32_t > get_Selected() const
Gets/sets the value to determine property Selected for modified field (if will be set)...
Whole PDF file will be submitted.