RadioButtonField.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 
4 #include <system/string.h>
5 
6 #include "Aspose.PDF.Cpp/InteractiveFeatures/Forms/ChoiceField.h"
7 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
8 
9 namespace Aspose
10 {
11 namespace Pdf
12 {
13 namespace Annotations
14 {
15 namespace JavascriptExtensions
16 {
17 class ThisObjectExtension;
18 } // namespace JavascriptExtensions
19 } // namespace Annotations
20 class ApsToPdfConverter;
21 class Document;
22 namespace Engine
23 {
24 namespace Data
25 {
26 class IPdfObject;
27 class ITrailerable;
28 } // namespace Data
29 } // namespace Engine
30 namespace Facades
31 {
32 class FormEditor;
33 } // namespace Facades
34 namespace Forms
35 {
36 enum class BoxShape;
37 enum class BoxStyle;
38 class Field;
39 class OptionCollection;
40 class RadioButtonOptionField;
41 } // namespace Forms
42 class Operator;
43 class Page;
44 class Point;
45 class Rectangle;
46 namespace Tests
47 {
48 class RegressionTests_v10_5;
49 class RegressionTests_v23_08;
50 class RegressionTests_v7_9;
51 class RegressionTests_v9_6;
52 } // namespace Tests
53 } // namespace Pdf
54 } // namespace Aspose
55 namespace System
56 {
57 namespace Collections
58 {
59 namespace Generic
60 {
61 template <typename> class List;
62 } // namespace Generic
63 } // namespace Collections
64 } // namespace System
65 
66 namespace Aspose {
67 
68 namespace Pdf {
69 
70 namespace Forms {
71 
75 class ASPOSE_PDF_SHARED_CLASS RadioButtonField final : public Aspose::Pdf::Forms::ChoiceField
76 {
77  typedef RadioButtonField ThisType;
79 
80  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
81  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
82 
83  friend class Aspose::Pdf::ApsToPdfConverter;
86  friend class Aspose::Pdf::Annotations::JavascriptExtensions::ThisObjectExtension;
87  friend class Aspose::Pdf::Tests::RegressionTests_v10_5;
88  friend class Aspose::Pdf::Tests::RegressionTests_v23_08;
89  friend class Aspose::Pdf::Tests::RegressionTests_v7_9;
90  friend class Aspose::Pdf::Tests::RegressionTests_v9_6;
91 
92 public:
93 
97  ASPOSE_PDF_SHARED_API BoxStyle get_Style();
101  ASPOSE_PDF_SHARED_API void set_Style(BoxStyle value);
105  ASPOSE_PDF_SHARED_API int32_t get_Selected() override;
109  ASPOSE_PDF_SHARED_API void set_Selected(int32_t value) override;
113  ASPOSE_PDF_SHARED_API System::SharedPtr<OptionCollection> get_Options() override;
120  ASPOSE_PDF_SHARED_API bool get_NoToggleToOff();
127  ASPOSE_PDF_SHARED_API void set_NoToggleToOff(bool value);
131  ASPOSE_PDF_SHARED_API int32_t get_PageIndex() override;
135  ASPOSE_PDF_SHARED_API System::String get_Value() override;
139  ASPOSE_PDF_SHARED_API void set_Value(System::String value) override;
140 
145  ASPOSE_PDF_SHARED_API RadioButtonField(System::SharedPtr<Aspose::Pdf::Page> page);
150  ASPOSE_PDF_SHARED_API RadioButtonField(System::SharedPtr<Document> doc);
151 
156  ASPOSE_PDF_SHARED_API void Add(const System::SharedPtr<RadioButtonOptionField>& newItem);
162  ASPOSE_PDF_SHARED_API void AddOption(System::String optionName, System::SharedPtr<Rectangle> rect);
167  ASPOSE_PDF_SHARED_API void AddOption(System::String optionName) override;
172  ASPOSE_PDF_SHARED_API void SetPosition(System::SharedPtr<Point> point) override;
173 
174 protected:
175 
179  BoxShape get_Shape();
183  void set_Shape(BoxShape value);
184  bool get_ResetActiveState() const;
185  void set_ResetActiveState(bool value);
186 
192  ASPOSE_PDF_SHARED_API bool IsEqualTo(System::String value) override;
193  ASPOSE_PDF_SHARED_API System::String GetConformXFAValue(System::String value) override;
194 
196 
197  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(RadioButtonField, CODEPORTING_ARGS(System::SharedPtr<Aspose::Pdf::Engine::Data::IPdfObject> annotation, System::SharedPtr<Document> document));
198 
200 
201  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(RadioButtonField, CODEPORTING_ARGS(System::SharedPtr<Aspose::Pdf::Page> page, System::SharedPtr<Rectangle> rect));
202 
204 
205  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(RadioButtonField, CODEPORTING_ARGS(System::SharedPtr<Document> doc, System::SharedPtr<Rectangle> rect));
210  ASPOSE_PDF_SHARED_API void Initialize(System::SharedPtr<Aspose::Pdf::Engine::Data::ITrailerable> trailer) override;
211  ASPOSE_PDF_SHARED_API void UpdateAppearances() override;
212  ASPOSE_PDF_SHARED_API System::SharedPtr<Field> CreateCopy() override;
213 
214  virtual ASPOSE_PDF_SHARED_API ~RadioButtonField();
215 
216 private:
217 
219  bool _resetActiveState;
220  int32_t _entryCount;
221 
223  int32_t GetStateIndex();
224  void SetStateIndex(int32_t index);
225  void circle(System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Operator>>> op, double x, double y, double r);
226  System::SharedPtr<Point> getLowestLeftPoint();
227  void FixField();
228 
229 };
230 
231 } // namespace Forms
232 } // namespace Pdf
233 } // namespace Aspose
234 
235 
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
Definition: Artifact.h:67
BoxStyle
Represents styles of check box.
Definition: BoxStyle.h:18
Definition: signed_info.h:13
Base class for acro form fields.
Definition: Field.h:129
Specifies that the member is a field.
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
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
A printer&#39;s point (1/72 of an inch).
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
Class for editing forms (ading/deleting field etc)
Definition: FormEditor.h:73
Whole PDF file will be submitted.