RichTextBoxField.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 
4 #include <system/shared_ptr.h>
5 
6 #include "InteractiveFeatures/Forms/TextModel.h"
7 #include "Aspose.PDF.Cpp/InteractiveFeatures/Forms/TextBoxField.h"
8 #include "Aspose.PDF.Cpp/InteractiveFeatures/Annotations/Annotation.h"
9 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
10 
11 namespace Aspose
12 {
13 namespace Pdf
14 {
15 namespace Annotations
16 {
17 enum class Justification;
18 } // namespace Annotations
19 class Document;
20 namespace Engine
21 {
22 namespace Data
23 {
24 class IPdfDictionary;
25 class IPdfObject;
26 class ITrailerable;
27 } // namespace Data
28 } // namespace Engine
29 namespace Forms
30 {
31 class Field;
32 } // namespace Forms
33 class Operator;
34 class Page;
35 class Rectangle;
36 } // namespace Pdf
37 } // namespace Aspose
38 namespace System
39 {
40 namespace Collections
41 {
42 namespace Generic
43 {
44 template <typename> class List;
45 } // namespace Generic
46 } // namespace Collections
47 class String;
48 namespace Xml
49 {
50 class XmlDocument;
51 class XmlNode;
52 } // namespace Xml
53 } // namespace System
54 
55 namespace Aspose {
56 
57 namespace Pdf {
58 
59 namespace Forms {
60 
64 class ASPOSE_PDF_SHARED_CLASS RichTextBoxField final : public Aspose::Pdf::Forms::TextBoxField
65 {
66  typedef RichTextBoxField ThisType;
68 
69  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
70  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
71 
73 
74 public:
75 
79  ASPOSE_PDF_SHARED_API System::String get_Style();
83  ASPOSE_PDF_SHARED_API void set_Style(System::String value);
87  ASPOSE_PDF_SHARED_API System::String get_RichTextValue();
91  ASPOSE_PDF_SHARED_API void set_RichTextValue(System::String value);
95  ASPOSE_PDF_SHARED_API System::String get_FormattedValue();
99  ASPOSE_PDF_SHARED_API void set_FormattedValue(System::String value);
103  ASPOSE_PDF_SHARED_API System::String get_Value() override;
107  ASPOSE_PDF_SHARED_API void set_Value(System::String value) override;
111  ASPOSE_PDF_SHARED_API Aspose::Pdf::Annotations::Justification get_Justify();
115  ASPOSE_PDF_SHARED_API void set_Justify(Aspose::Pdf::Annotations::Justification value);
116 
123 
124 protected:
125 
126  ASPOSE_PDF_SHARED_API bool AppearanceSupported() override;
132  ASPOSE_PDF_SHARED_API void Initialize(System::SharedPtr<Aspose::Pdf::Engine::Data::ITrailerable> trailer) override;
133 
135 
137 
138  virtual ASPOSE_PDF_SHARED_API ~RichTextBoxField();
139 
140 private:
141 
142  double textPositionX;
143  double textWidth;
144  double textPositionY;
145  double textStartPositionY;
149 
150  System::String ConvertBrs(System::String text);
152  System::String normalize(System::String s);
153  void SetRichTextValue(System::String value);
155  System::String GetInnerText(System::String value);
157  void OutText(System::String text, System::SharedPtr<TextModel::TextAttributes> textAttributes);
159  void ProcessParagraph(System::SharedPtr<System::Xml::XmlNode> paragraph, System::SharedPtr<TextModel::TextAttributes> textAttributes);
162 
163 };
164 
165 } // namespace Forms
166 } // namespace Pdf
167 } // namespace Aspose
168 
169 
virtual ASPOSE_PDF_SHARED_API System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Operator > > > CreateAppearanceProgram(System::SharedPtr< Annotation::AppearanceParameters > parameters, System::SharedPtr< Annotation > annotation)
Create program for displaying this annotation.
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
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(Field, CODEPORTING_ARGS(System::SharedPtr< Aspose::Pdf::Engine::Data::IPdfObject > annotation, System::SharedPtr< Document > document))
Justification
Enumerates the forms of quadding (justification) to be used in displaying the annotation�s text...
Definition: Justification.h:22
Definition: Artifact.h:67
Class describes rich text editor component.
Definition: RichTextBoxField.h:64
Base class for acro form fields.
Definition: Field.h:126
Specifies that the member is a field.
ASPOSE_PDF_SHARED_API void Initialize(System::SharedPtr< Aspose::Pdf::Engine::Data::ITrailerable > trailer, System::SharedPtr< Rectangle > rect) override
Initialize the annotation.
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: fwd.h:22
means saving in XML format
Class representing text box field.
Definition: TextBoxField.h:88
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
virtual ASPOSE_PDF_SHARED_API void set_Value(System::String value)
Sets value of the field.
virtual ASPOSE_PDF_SHARED_API System::String get_Value()
Gets value of the field.
The coordinates are in the page coordinate context.
ASPOSE_PDF_SHARED_API bool AppearanceSupported() override
This method must be overriden to return true in classes where apperance generation is supported...
Represents a abstract base object can be added to the page(doc.Paragraphs.Add()). ...
Definition: BaseParagraph.h:66
Whole PDF file will be submitted.