Aspose.Tasks for C++
HeaderFooterInfo.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="HeaderFooterInfo.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2025 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/array.h>
9 #include <drawing/size.h>
10 
11 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
12 
13 namespace Aspose
14 {
15 namespace Tasks
16 {
17 namespace IO
18 {
19 namespace MSProject
20 {
21 class MPPPageHeaderFooterReader;
22 class MPPPageHeaderFooterWriter;
23 class RtfImageInfo;
24 } // namespace MSProject
25 } // namespace IO
26 namespace Visualization
27 {
28 class ApsDefaultPage;
29 class ApsGanttPageLegend;
30 class HeaderFooterRtfInfo;
31 } // namespace Visualization
32 } // namespace Tasks
33 } // namespace Aspose
34 namespace System
35 {
36 namespace Drawing
37 {
38 class Image;
39 } // namespace Drawing
40 } // namespace System
41 
42 namespace Aspose {
43 
44 namespace Tasks {
45 
46 namespace Visualization {
47 
48 /// <summary>
49 /// Represents visual content of the header, footer or legend which is used for printing \ rendering of views.
50 /// </summary>
51 class ASPOSE_TASKS_SHARED_CLASS HeaderFooterInfo : public System::Object
52 {
53  typedef HeaderFooterInfo ThisType;
54  typedef System::Object BaseType;
55 
56  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
57  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
58 
59  friend class Aspose::Tasks::Visualization::ApsDefaultPage;
60  friend class Aspose::Tasks::Visualization::ApsGanttPageLegend;
61  friend class Aspose::Tasks::IO::MSProject::MPPPageHeaderFooterReader;
62  friend class Aspose::Tasks::IO::MSProject::MPPPageHeaderFooterWriter;
63 
64 public:
65 
66  /// <summary>
67  /// Gets the left aligned text to display in the parent element.
68  /// </summary>
69  ASPOSE_TASKS_SHARED_API System::String get_LeftText() const;
70  /// <summary>
71  /// Sets the left aligned text to display in the parent element.
72  /// </summary>
73  ASPOSE_TASKS_SHARED_API void set_LeftText(const System::String& value);
74  /// <summary>
75  /// Gets the centered text to display in the parent element.
76  /// </summary>
77  ASPOSE_TASKS_SHARED_API System::String get_CenteredText() const;
78  /// <summary>
79  /// Sets the centered text to display in the parent element.
80  /// </summary>
81  ASPOSE_TASKS_SHARED_API void set_CenteredText(const System::String& value);
82  /// <summary>
83  /// Gets the right aligned text to display in the parent element.
84  /// </summary>
85  ASPOSE_TASKS_SHARED_API System::String get_RightText() const;
86  /// <summary>
87  /// Sets the right aligned text to display in the parent element.
88  /// </summary>
89  ASPOSE_TASKS_SHARED_API void set_RightText(const System::String& value);
90  /// <summary>
91  /// Gets the left aligned image to be displayed in the parent element.
92  /// </summary>
93  ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Drawing::Image> get_LeftImage() const;
94  /// <summary>
95  /// Sets the left aligned image to be displayed in the parent element.
96  /// </summary>
97  ASPOSE_TASKS_SHARED_API void set_LeftImage(const System::SharedPtr<System::Drawing::Image>& value);
98  /// <summary>
99  /// Gets the centered image to be displayed in the parent element.
100  /// </summary>
101  ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Drawing::Image> get_CenteredImage() const;
102  /// <summary>
103  /// Sets the centered image to be displayed in the parent element.
104  /// </summary>
105  ASPOSE_TASKS_SHARED_API void set_CenteredImage(const System::SharedPtr<System::Drawing::Image>& value);
106  /// <summary>
107  /// Gets the right aligned image to be displayed in the parent element.
108  /// </summary>
109  ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Drawing::Image> get_RightImage() const;
110  /// <summary>
111  /// Sets the right aligned image to be displayed in the parent element.
112  /// </summary>
113  ASPOSE_TASKS_SHARED_API void set_RightImage(const System::SharedPtr<System::Drawing::Image>& value);
114  /// <summary>
115  /// Gets the displayed size of the left image.
116  /// </summary>
117  ASPOSE_TASKS_SHARED_API System::Drawing::Size get_LeftImageSize() const;
118  /// <summary>
119  /// Sets the displayed size of the left image.
120  /// </summary>
121  ASPOSE_TASKS_SHARED_API void set_LeftImageSize(System::Drawing::Size value);
122  /// <summary>
123  /// Gets the displayed size of the center image.
124  /// </summary>
125  ASPOSE_TASKS_SHARED_API System::Drawing::Size get_CenteredImageSize() const;
126  /// <summary>
127  /// Sets the displayed size of the center image.
128  /// </summary>
129  ASPOSE_TASKS_SHARED_API void set_CenteredImageSize(System::Drawing::Size value);
130  /// <summary>
131  /// Gets the displayed size of the right image.
132  /// </summary>
133  ASPOSE_TASKS_SHARED_API System::Drawing::Size get_RightImageSize() const;
134  /// <summary>
135  /// Sets the displayed size of the right image.
136  /// </summary>
137  ASPOSE_TASKS_SHARED_API void set_RightImageSize(System::Drawing::Size value);
138 
139  /// <summary>Initializes a new instance of the <see cref="HeaderFooterInfo"></see> class.</summary>
140  ASPOSE_TASKS_SHARED_API HeaderFooterInfo();
141 
142 protected:
143 
144  ASPOSE_TASKS_SHARED_API System::Drawing::Size get_LeftImageOriginalSize() const;
145  ASPOSE_TASKS_SHARED_API void set_LeftImageOriginalSize(System::Drawing::Size value);
146  ASPOSE_TASKS_SHARED_API System::Drawing::Size get_CenteredImageOriginalSize() const;
147  ASPOSE_TASKS_SHARED_API void set_CenteredImageOriginalSize(System::Drawing::Size value);
148  ASPOSE_TASKS_SHARED_API System::Drawing::Size get_RightImageOriginalSize() const;
149  ASPOSE_TASKS_SHARED_API void set_RightImageOriginalSize(System::Drawing::Size value);
150  ASPOSE_TASKS_SHARED_API System::String get_LeftRtf() const;
151  ASPOSE_TASKS_SHARED_API void set_LeftRtf(const System::String& value);
152  ASPOSE_TASKS_SHARED_API System::String get_CenteredRtf() const;
153  ASPOSE_TASKS_SHARED_API void set_CenteredRtf(const System::String& value);
154  ASPOSE_TASKS_SHARED_API System::String get_RightRtf() const;
155  ASPOSE_TASKS_SHARED_API void set_RightRtf(const System::String& value);
156 
157  ASPOSE_TASKS_SHARED_API System::SharedPtr<HeaderFooterRtfInfo> GetRtfInfo();
158  #ifdef ASPOSE_GET_SHARED_MEMBERS
159  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
160  #endif
161 
162 
163 private:
164 
165  System::String leftText;
166  System::String centeredText;
167  System::String rightText;
168  System::SharedPtr<System::Drawing::Image> leftImage;
169  System::SharedPtr<System::Drawing::Image> centeredImage;
170  System::SharedPtr<System::Drawing::Image> rightImage;
171  System::Drawing::Size leftImageSize;
172  System::Drawing::Size centeredImageSize;
173  System::Drawing::Size rightImageSize;
174  System::String leftRtf;
175  System::String centeredRtf;
176  System::String rightRtf;
177  System::SharedPtr<HeaderFooterRtfInfo> headerFooterRtfInfo;
178 
179  static System::ArrayPtr<char16_t>& NewLineChars();
180 
181  System::Drawing::Size pr_LeftImageOriginalSize;
182  System::Drawing::Size pr_CenteredImageOriginalSize;
183  System::Drawing::Size pr_RightImageOriginalSize;
184 
185  static System::String GetPlainText(const System::String& text);
186  static System::SharedPtr<Aspose::Tasks::IO::MSProject::RtfImageInfo> GetImage(const System::String& text);
187  void RecalculateLeftRtf();
188  void RecalculateCenteredRtf();
189  void RecalculateRightRtf();
190 
191 };
192 
193 } // namespace Visualization
194 } // namespace Tasks
195 } // namespace Aspose
196 
197 
Definition: Asn.h:12