AppearanceDictionary.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 
4 #include <system/collections/keyvalue_pair.h>
5 #include <system/collections/ienumerator.h>
6 #include <system/collections/idictionary.h>
7 #include <system/array.h>
8 #include <cstdint>
9 
10 #include "Aspose.PDF.Cpp/XForm.h"
11 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
12 
13 namespace Aspose
14 {
15 namespace Pdf
16 {
17 namespace Annotations
18 {
19 class Annotation;
20 class PDF3DAnnotation;
21 } // namespace Annotations
22 namespace Collections
23 {
24 template <typename, typename> class AsposeHashDictionary;
25 } // namespace Collections
26 namespace Engine
27 {
28 namespace Data
29 {
30 class IPdfDictionary;
31 class IPdfPrimitive;
32 } // namespace Data
33 } // namespace Engine
34 namespace Facades
35 {
36 class Form;
37 } // namespace Facades
38 namespace Forms
39 {
40 class RadioButtonOptionField;
41 } // namespace Forms
42 namespace Tests
43 {
44 class RegressionTests_v7_4;
45 } // namespace Tests
46 } // namespace Pdf
47 } // namespace Aspose
48 namespace System
49 {
50 namespace Collections
51 {
52 namespace Generic
53 {
54 template <typename> class ICollection;
55 } // namespace Generic
56 } // namespace Collections
57 } // namespace System
58 
59 namespace Aspose {
60 
61 namespace Pdf {
62 
63 namespace Annotations {
64 
68 class ASPOSE_PDF_SHARED_CLASS AppearanceDictionary final : public System::Collections::Generic::IDictionary<System::String, System::SharedPtr<Aspose::Pdf::XForm>>
69 {
72 
73  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
74  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
75 
80  friend class Aspose::Pdf::Tests::RegressionTests_v7_4;
81 
82 private:
83 
84  class AppearanceDictionaryEnumerator : public System::Collections::Generic::IEnumerator<System::Collections::Generic::KeyValuePair<System::String, System::SharedPtr<Aspose::Pdf::XForm>>>
85  {
86  typedef AppearanceDictionaryEnumerator ThisType;
88 
89  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
90  RTTI_INFO_DECL();
91  CODEPORTING_ABSTRACT_ENUMERATOR_ITERATOR_METHODS_DECLARATION(CODEPORTING_ARGS(System::Collections::Generic::KeyValuePair<System::String, System::SharedPtr<XForm>>), CODEPORTING_NO_API_KEYWORD);
92 
93  public:
94 
96 
97  AppearanceDictionaryEnumerator(System::SharedPtr<AppearanceDictionary> bridge);
98 
99  bool MoveNext() override;
100  void Reset() override;
101  void Dispose() override;
102 
103  private:
104 
106  int32_t viewed;
108 
109  };
110 
111 
112 public:
113 
117  ASPOSE_PDF_SHARED_API bool get_IsReadOnly() const override;
121  ASPOSE_PDF_SHARED_API bool get_IsFixedSize() const;
127  ASPOSE_PDF_SHARED_API System::SharedPtr<System::Collections::Generic::ICollection<System::String>> get_Keys() const override;
132  ASPOSE_PDF_SHARED_API System::SharedPtr<System::Collections::Generic::ICollection<System::SharedPtr<XForm>>> get_Values() const override;
136  ASPOSE_PDF_SHARED_API bool get_IsSynchronized();
140  ASPOSE_PDF_SHARED_API System::SharedPtr<System::Object> get_SyncRoot() const;
144  ASPOSE_PDF_SHARED_API int32_t get_Count() const override;
145 
149  ASPOSE_PDF_SHARED_API void Clear() override;
160  ASPOSE_PDF_SHARED_API void CopyTo(System::ArrayPtr<System::SharedPtr<XForm>> array, int32_t index);
161 
174  ASPOSE_PDF_SHARED_API System::SharedPtr<XForm> idx_get(const System::String& key) const override;
187  ASPOSE_PDF_SHARED_API void idx_set(const System::String& key, System::SharedPtr<XForm> value) override;
188 
198  ASPOSE_PDF_SHARED_API void Add(const System::String& key, const System::SharedPtr<XForm>& value) override;
204  ASPOSE_PDF_SHARED_API bool ContainsKey(const System::String& key) const override;
210  ASPOSE_PDF_SHARED_API bool Remove(const System::String& key) override;
217  ASPOSE_PDF_SHARED_API bool TryGetValue(const System::String& key, System::SharedPtr<XForm>& value) const override;
222  ASPOSE_PDF_SHARED_API void Add(const System::Collections::Generic::KeyValuePair<System::String, System::SharedPtr<XForm>>& item) override;
228  ASPOSE_PDF_SHARED_API bool Contains(const System::Collections::Generic::KeyValuePair<System::String, System::SharedPtr<XForm>>& item) const override;
234  ASPOSE_PDF_SHARED_API void CopyTo(System::ArrayPtr<System::Collections::Generic::KeyValuePair<System::String, System::SharedPtr<XForm>>> array, int32_t arrayIndex) override;
240  ASPOSE_PDF_SHARED_API bool Remove(const System::Collections::Generic::KeyValuePair<System::String, System::SharedPtr<XForm>>& item) override;
241 
242 protected:
243 
245 
246  ASPOSE_PDF_SHARED_API System::SharedPtr<System::Collections::Generic::ICollection<System::String>> get_KeysInternal() const;
247  ASPOSE_PDF_SHARED_API System::SharedPtr<System::Collections::Generic::ICollection<System::SharedPtr<XForm>>> get_ValuesInternal() const;
248 
250 
251  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(AppearanceDictionary, CODEPORTING_ARGS(System::SharedPtr<Aspose::Pdf::Engine::Data::IPdfDictionary> dict));
257  System::SharedPtr<XForm> GetForm(System::String key) const;
263  void SetForm(System::String key, System::SharedPtr<XForm> form);
265 
266  virtual ASPOSE_PDF_SHARED_API ~AppearanceDictionary();
267 
268 private:
269 
272 
273  static void ParseKey(System::String key, System::String& head, System::String& tail);
275  void SetForm(System::String head, System::String tail, System::SharedPtr<XForm> form);
276 
277 };
278 
279 } // namespace Annotations
280 } // namespace Pdf
281 } // namespace Aspose
282 
283 
String class used across the library. Is a substitute for C# System.String when translating code...
Definition: string.h:121
Annotation appearance dictionary specifying how the annotation shall be presented visually on the pag...
Definition: AppearanceDictionary.h:68
Class representing Acro form object.
Definition: Form.h:115
Definition: Artifact.h:67
Pair of key and value. This type should be allocated on stack and passed to functions by value or by ...
Definition: PdfXmpMetadata.h:41
System::SharedPtr< Aspose::Pdf::Engine::Data::IPdfDictionary > dict
Definition: AppearanceDictionary.h:244
Definition: signed_info.h:13
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: fwd.h:22
Class represents item of RadioButton field.
Definition: RadioButtonOptionField.h:62
Interface of enumerator which can be used to iterate through some elements. Objects of this class sho...
Definition: BaseOperatorCollection.h:47
Definition: AFRelationship.h:4
Class PDF3DAnnotation. This class cannot be inherited.
Definition: PDF3DAnnotation.h:85
Class representing annotation object.
Definition: Annotation.h:303
Interface for dictionary-alike containers. Objects of this class should only be allocated using Syste...
Definition: Document.h:592
Whole PDF file will be submitted.