BaseParagraph.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 
4 #include <system/string.h>
5 #include <system/icloneable.h>
6 #include <cstdint>
7 
8 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
9 
10 namespace Aspose
11 {
12 namespace Pdf
13 {
14 namespace Annotations
15 {
16 class LinkAnnotation;
17 } // namespace Annotations
18 class Cell;
19 class Document;
20 namespace Drawing
21 {
22 class Graph;
23 } // namespace Drawing
24 class FloatingBox;
25 class FormattedFragment;
26 class HeaderFooter;
27 enum class HorizontalAlignment;
28 class Hyperlink;
29 class Image;
30 class MarginInfo;
31 class Note;
32 class Page;
33 class PageGenerator;
34 class Rectangle;
35 class Table;
36 namespace Tests
37 {
38 namespace Generator
39 {
40 class Xml2PdfTests;
41 } // namespace Generator
42 } // namespace Tests
43 namespace Text
44 {
45 class TextFragment;
46 } // namespace Text
47 enum class VerticalAlignment;
48 } // namespace Pdf
49 } // namespace Aspose
50 namespace System
51 {
52 namespace Xml
53 {
54 class XmlReader;
55 class XmlTextWriter;
56 } // namespace Xml
57 } // namespace System
58 
59 namespace Aspose {
60 
61 namespace Pdf {
62 
66 class ASPOSE_PDF_SHARED_CLASS BaseParagraph : public System::ICloneable
67 {
68  typedef BaseParagraph ThisType;
70 
71  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
72  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
73 
75  friend class Aspose::Pdf::Note;
80  friend class Aspose::Pdf::Image;
81  friend class Aspose::Pdf::PageGenerator;
82  friend class Aspose::Pdf::Document;
83  friend class Aspose::Pdf::Page;
84  friend class Aspose::Pdf::Cell;
85  friend class Aspose::Pdf::Table;
86  friend class Aspose::Pdf::Tests::Generator::Xml2PdfTests;
87 
88 public:
89 
93  virtual ASPOSE_PDF_SHARED_API Aspose::Pdf::VerticalAlignment get_VerticalAlignment();
97  virtual ASPOSE_PDF_SHARED_API void set_VerticalAlignment(Aspose::Pdf::VerticalAlignment value);
101  virtual ASPOSE_PDF_SHARED_API Aspose::Pdf::HorizontalAlignment get_HorizontalAlignment();
105  virtual ASPOSE_PDF_SHARED_API void set_HorizontalAlignment(Aspose::Pdf::HorizontalAlignment value);
109  ASPOSE_PDF_SHARED_API System::SharedPtr<MarginInfo> get_Margin();
113  ASPOSE_PDF_SHARED_API void set_Margin(System::SharedPtr<MarginInfo> value);
118  ASPOSE_PDF_SHARED_API bool get_IsFirstParagraphInColumn() const;
123  ASPOSE_PDF_SHARED_API void set_IsFirstParagraphInColumn(bool value);
128  ASPOSE_PDF_SHARED_API bool get_IsKeptWithNext() const;
133  ASPOSE_PDF_SHARED_API void set_IsKeptWithNext(bool value);
138  ASPOSE_PDF_SHARED_API bool get_IsInNewPage() const;
143  ASPOSE_PDF_SHARED_API void set_IsInNewPage(bool value);
148  ASPOSE_PDF_SHARED_API bool get_IsInLineParagraph() const;
153  ASPOSE_PDF_SHARED_API void set_IsInLineParagraph(bool value);
157  virtual ASPOSE_PDF_SHARED_API System::SharedPtr<Aspose::Pdf::Hyperlink> get_Hyperlink();
161  virtual ASPOSE_PDF_SHARED_API void set_Hyperlink(System::SharedPtr<Aspose::Pdf::Hyperlink> value);
167  ASPOSE_PDF_SHARED_API int32_t get_ZIndex() const;
173  ASPOSE_PDF_SHARED_API void set_ZIndex(int32_t value);
174 
180  ASPOSE_PDF_SHARED_API System::SharedPtr<System::Object> Clone() override;
181 
182  ASPOSE_PDF_SHARED_API BaseParagraph();
183 
184 protected:
185 
189  System::String get_Id() const;
193  void set_Id(System::String value);
197  static bool get_IsZIndexSet();
201  static void set_IsZIndexSet(bool value);
205  const System::SharedPtr<Annotations::LinkAnnotation>& get_ReferencedFrom() const;
209  void set_ReferencedFrom(System::SharedPtr<Annotations::LinkAnnotation> value);
210 
211  void ChangePosition(double& curX, double& curY, double newX, double newY, bool isNextParagraphInline);
212  void ProcessHyperlink(System::SharedPtr<Page> page, System::SharedPtr<Rectangle> rect);
213  virtual ASPOSE_PDF_SHARED_API void Serialize(System::SharedPtr<System::Xml::XmlTextWriter> writer);
214  virtual ASPOSE_PDF_SHARED_API void Deserialize(System::SharedPtr<System::Xml::XmlReader> reader);
215 
216 private:
217 
218  Aspose::Pdf::HorizontalAlignment horizontalAlignment;
221  Aspose::Pdf::VerticalAlignment verticalAlignment;
222  int32_t zindex;
223  System::String pr_Id;
224  bool pr_IsFirstParagraphInColumn;
225  bool pr_IsKeptWithNext;
226  bool pr_IsInNewPage;
227  bool pr_IsInLineParagraph;
228  static bool pr_IsZIndexSet;
230 
231 };
232 
233 } // namespace Pdf
234 } // namespace Aspose
235 
236 
Represents graph - graphics generator paragraph.
Definition: Graph.h:53
VerticalAlignment
Enumeration of possible vertical alignment values.
Definition: VerticalAlignment.h:16
String class used across the library. Is a substitute for C# System.String when translating code...
Definition: string.h:121
Represents a FloatingBox in a Pdf document. FloatingBox is custom positioned.
Definition: FloatingBox.h:45
Represents fragment of Pdf text.
Definition: TextFragment.h:173
Class representing PDF document
Definition: Document.h:616
Definition: Artifact.h:67
Represents abstract formatted fragment.
Definition: FormattedFragment.h:60
This class represents generator paragraph note.
Definition: Note.h:36
HorizontalAlignment
Describes horizontal alignment.
Definition: HorizontalAlignment.h:16
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
means saving in XML format
Class representing page of PDF document.
Definition: Page.h:364
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
Represents a cell of the table&#39;s row.
Definition: Cell.h:65
The coordinates are in the page coordinate context.
Represents image.
Definition: Image.h:66
Represents a table that can be added to the page.
Definition: Table.h:86
Represents a abstract base object can be added to the page(doc.Paragraphs.Add()). ...
Definition: BaseParagraph.h:66
Whole PDF file will be submitted.