FloatingBox.h
1 #pragma once
2 // Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
3 
4 #include <system/array.h>
5 
6 #include "Aspose.PDF.Cpp/Generator/BaseParagraph.h"
7 #include "Aspose.PDF.Cpp/aspose_pdf_api_defs.h"
8 
9 namespace Aspose
10 {
11 namespace Pdf
12 {
13 class BorderInfo;
14 class Color;
15 class ColumnInfo;
16 class Image;
17 class MarginInfo;
18 class Operator;
19 class Page;
20 class PageGenerator;
21 class Paragraphs;
22 } // namespace Pdf
23 } // namespace Aspose
24 namespace System
25 {
26 namespace Collections
27 {
28 namespace Generic
29 {
30 template <typename> class List;
31 } // namespace Generic
32 } // namespace Collections
33 namespace Xml
34 {
35 class XmlReader;
36 class XmlTextWriter;
37 } // namespace Xml
38 } // namespace System
39 
40 namespace Aspose {
41 
42 namespace Pdf {
43 
45 class ASPOSE_PDF_SHARED_CLASS FloatingBox : public Aspose::Pdf::BaseParagraph
46 {
47  typedef FloatingBox ThisType;
49 
50  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
51  ASPOSE_PDF_SHARED_RTTI_INFO_DECL();
52 
53  friend class Aspose::Pdf::PageGenerator;
54 
55 public:
56 
60  ASPOSE_PDF_SHARED_API const System::SharedPtr<Aspose::Pdf::ColumnInfo>& get_ColumnInfo() const;
64  ASPOSE_PDF_SHARED_API void set_ColumnInfo(System::SharedPtr<Aspose::Pdf::ColumnInfo> value);
68  ASPOSE_PDF_SHARED_API double get_Width() const;
72  ASPOSE_PDF_SHARED_API void set_Width(double value);
76  ASPOSE_PDF_SHARED_API double get_Height() const;
80  ASPOSE_PDF_SHARED_API void set_Height(double value);
85  ASPOSE_PDF_SHARED_API bool get_IsNeedRepeating() const;
90  ASPOSE_PDF_SHARED_API void set_IsNeedRepeating(bool value);
94  ASPOSE_PDF_SHARED_API System::SharedPtr<Aspose::Pdf::Paragraphs> get_Paragraphs() const;
98  ASPOSE_PDF_SHARED_API void set_Paragraphs(System::SharedPtr<Aspose::Pdf::Paragraphs> value);
102  ASPOSE_PDF_SHARED_API const System::SharedPtr<BorderInfo>& get_Border() const;
106  ASPOSE_PDF_SHARED_API void set_Border(System::SharedPtr<BorderInfo> value);
110  ASPOSE_PDF_SHARED_API const System::SharedPtr<Color>& get_BackgroundColor() const;
114  ASPOSE_PDF_SHARED_API void set_BackgroundColor(System::SharedPtr<Color> value);
118  ASPOSE_PDF_SHARED_API const System::SharedPtr<Image>& get_BackgroundImage() const;
122  ASPOSE_PDF_SHARED_API void set_BackgroundImage(System::SharedPtr<Image> value);
126  ASPOSE_PDF_SHARED_API System::SharedPtr<MarginInfo> get_Padding() const;
130  ASPOSE_PDF_SHARED_API void set_Padding(System::SharedPtr<MarginInfo> value);
134  ASPOSE_PDF_SHARED_API double get_Left() const;
138  ASPOSE_PDF_SHARED_API void set_Left(double value);
142  ASPOSE_PDF_SHARED_API double get_Top() const;
146  ASPOSE_PDF_SHARED_API void set_Top(double value);
147 
153  ASPOSE_PDF_SHARED_API FloatingBox(float width, float height);
157  ASPOSE_PDF_SHARED_API FloatingBox();
158 
163  ASPOSE_PDF_SHARED_API System::SharedPtr<System::Object> Clone() override;
164 
165 protected:
166 
167  bool Process(double& curX, double& curY, double pageHeight, double pageWidth, System::SharedPtr<MarginInfo> pageMargin, System::SharedPtr<Page> page, double bottomY, System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Operator>>> operators, bool isHeaderFooter);
168  ASPOSE_PDF_SHARED_API void Serialize(System::SharedPtr<System::Xml::XmlTextWriter> writer) override;
169  ASPOSE_PDF_SHARED_API void Deserialize(System::SharedPtr<System::Xml::XmlReader> reader) override;
170 
171 private:
172 
173  double height;
174  bool isHeightSet;
175  bool isWidthSet;
178  double width;
180  bool pr_IsNeedRepeating;
182  System::SharedPtr<Color> pr_BackgroundColor;
183  System::SharedPtr<Image> pr_BackgroundImage;
184  double pr_Left;
185  double pr_Top;
186 
187  bool ProcessColumns(System::ArrayPtr<double> columnWidths, double columnSpacing, System::SharedPtr<MarginInfo> margin, double& boxWidth, double& boxHeight, System::SharedPtr<Page> page, System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Operator>>> list, double curX, double curY, double bottomY, bool& result, double& footNoteHeight, bool isFooter);
188  void ProcessHalfDevideFootNote(System::SharedPtr<Page> page, System::SharedPtr<Aspose::Pdf::Paragraphs> backupParagraphs, System::SharedPtr<Aspose::Pdf::Paragraphs> backupFooterParagraphs, int32_t paragraphsCount, System::ArrayPtr<double> columnWidths, double columnSpacing, double& boxWidth, double& boxHeight, double curX, double curY, System::SharedPtr<MarginInfo> margin, double bottomY, System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Operator>>> list, double footNoteMaxHeight, bool isFooter);
189 
190 };
191 
192 } // namespace Pdf
193 } // namespace Aspose
194 
195 
class ASPOSECPP_SHARED_CLASS List
Definition: ienumerable.h:17
Represents a FloatingBox in a Pdf document. FloatingBox is custom positioned.
Definition: FloatingBox.h:45
Definition: Artifact.h:67
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
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
List forward declaration.
Definition: Artifact.h:74
The coordinates are in the page coordinate context.
means saving without change of format, i.e. as PDF use it please instead of &#39;SaveFormat.None&#39;, that is obsolete one
Represents a abstract base object can be added to the page(doc.Paragraphs.Add()). ...
Definition: BaseParagraph.h:66
Whole PDF file will be submitted.