Aspose.Tasks for C++
GanttChartView.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="GanttChartView.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/shared_ptr.h>
9 #include <drawing/color.h>
10 #include <cstdint>
11 
12 #include "aspose.tasks.cpp/Visualization/View/ITimescaledView.h"
13 #include "aspose.tasks.cpp/View.h"
14 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
15 
16 namespace Aspose
17 {
18 namespace Tasks
19 {
20 class FilterCollection;
21 enum class GanttBarSize;
22 namespace IO
23 {
24 namespace MSProject
25 {
26 class MPP14GanttChartReader;
27 class MPP14GanttChartWriter;
28 class MPP9GanttChartReader;
29 class MPP9GanttChartWriter;
30 class MPPGanttBarStyleWriter;
31 class MPPGanttChartWriter;
32 class MPPViewReader;
33 } // namespace MSProject
34 } // namespace IO
35 class View;
36 namespace Visualization
37 {
38 class GanttBarStyle;
39 class GanttChartBarStylesManager;
40 class Gridlines;
41 enum class GridlineType;
42 class ProgressLines;
43 class TableTextStyle;
44 enum class TextItemType;
45 class TextStyle;
46 class TimescaleTier;
47 } // namespace Visualization
48 } // namespace Tasks
49 } // namespace Aspose
50 namespace System
51 {
52 namespace Collections
53 {
54 namespace Generic
55 {
56 template <typename> class List;
57 } // namespace Generic
58 } // namespace Collections
59 } // namespace System
60 
61 namespace Aspose {
62 
63 namespace Tasks {
64 
65 /// <summary>
66 /// Represents a GanttChart view.
67 /// </summary>
68 class ASPOSE_TASKS_SHARED_CLASS GanttChartView : public Aspose::Tasks::View, public Aspose::Tasks::Visualization::ITimescaledView
69 {
70  typedef GanttChartView ThisType;
72  typedef Aspose::Tasks::Visualization::ITimescaledView BaseType1;
73 
74  typedef ::System::BaseTypesInfo<BaseType, BaseType1> ThisTypeBaseTypesInfo;
75  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
76 
77  friend class Aspose::Tasks::IO::MSProject::MPP9GanttChartReader;
78  friend class Aspose::Tasks::IO::MSProject::MPPViewReader;
79  friend class Aspose::Tasks::IO::MSProject::MPP14GanttChartReader;
80  friend class Aspose::Tasks::IO::MSProject::MPP9GanttChartWriter;
81  friend class Aspose::Tasks::IO::MSProject::MPPGanttBarStyleWriter;
82  friend class Aspose::Tasks::IO::MSProject::MPP14GanttChartWriter;
83  friend class Aspose::Tasks::IO::MSProject::MPPGanttChartWriter;
84  friend class Aspose::Tasks::Visualization::GanttChartBarStylesManager;
85 
86 public:
87 
88  /// <summary>
89  /// Gets the height, in points, of the Gantt bars in the Gantt Chart.
90  /// </summary>
91  ASPOSE_TASKS_SHARED_API GanttBarSize get_BarSize() const;
92  /// <summary>
93  /// Sets the height, in points, of the Gantt bars in the Gantt Chart.
94  /// </summary>
95  ASPOSE_TASKS_SHARED_API void set_BarSize(GanttBarSize value);
96  /// <summary>
97  /// Gets a list of <see cref="Gridlines"></see> of the Gantt Chart view.
98  /// </summary>
99  ASPOSE_TASKS_SHARED_API const System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Aspose::Tasks::Visualization::Gridlines>>>& get_Gridlines() const;
100  /// <summary>
101  /// Sets a list of <see cref="Gridlines"></see> of the Gantt Chart view.
102  /// </summary>
103  ASPOSE_TASKS_SHARED_API void set_Gridlines(const System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Aspose::Tasks::Visualization::Gridlines>>>& value);
104  /// <summary>
105  /// Gets a list of <see cref="TextStyle"></see> of the Gantt Chart view.
106  /// </summary>
107  ASPOSE_TASKS_SHARED_API const System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Visualization::TextStyle>>>& get_TextStyles() const;
108  /// <summary>
109  /// Sets a list of <see cref="TextStyle"></see> of the Gantt Chart view.
110  /// </summary>
111  ASPOSE_TASKS_SHARED_API void set_TextStyles(const System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Visualization::TextStyle>>>& value);
112  /// <summary>
113  /// Gets a value indicating whether drawings on the Gantt Chart must be shown.
114  /// </summary>
115  ASPOSE_TASKS_SHARED_API bool get_ShowDrawings() const;
116  /// <summary>
117  /// Sets a value indicating whether drawings on the Gantt Chart must be shown.
118  /// </summary>
119  ASPOSE_TASKS_SHARED_API void set_ShowDrawings(bool value);
120  /// <summary>
121  /// Gets a value indicating whether task splits on the Gantt Chart must be shown.
122  /// </summary>
123  ASPOSE_TASKS_SHARED_API bool get_ShowBarSplits() const;
124  /// <summary>
125  /// Sets a value indicating whether task splits on the Gantt Chart must be shown.
126  /// </summary>
127  ASPOSE_TASKS_SHARED_API void set_ShowBarSplits(bool value);
128  /// <summary>
129  /// Gets a value indicating whether bars on the Gantt Chart must be rolled up.
130  /// </summary>
131  ASPOSE_TASKS_SHARED_API bool get_RollUpGanttBars() const;
132  /// <summary>
133  /// Sets a value indicating whether bars on the Gantt Chart must be rolled up.
134  /// </summary>
135  ASPOSE_TASKS_SHARED_API void set_RollUpGanttBars(bool value);
136  /// <summary>
137  /// Gets a value indicating whether the bars round to the nearest day.
138  /// The default value is True.
139  /// </summary>
140  ASPOSE_TASKS_SHARED_API bool get_BarRounding() const;
141  /// <summary>
142  /// Sets a value indicating whether the bars round to the nearest day.
143  /// The default value is True.
144  /// </summary>
145  ASPOSE_TASKS_SHARED_API void set_BarRounding(bool value);
146  /// <summary>
147  /// Gets settings of view's bottom timescale tier.
148  /// <see cref="TimescaleTier"></see>
149  /// </summary>
150  ASPOSE_TASKS_SHARED_API System::SharedPtr<Visualization::TimescaleTier> get_BottomTimescaleTier() override;
151  /// <summary>
152  /// Sets settings of view's bottom timescale tier.
153  /// <see cref="TimescaleTier"></see>
154  /// </summary>
155  ASPOSE_TASKS_SHARED_API void set_BottomTimescaleTier(System::SharedPtr<Visualization::TimescaleTier> value) override;
156  /// <summary>
157  /// Gets settings of view's middle timescale tier.
158  /// <see cref="TimescaleTier"></see>.
159  /// </summary>
160  ASPOSE_TASKS_SHARED_API System::SharedPtr<Visualization::TimescaleTier> get_MiddleTimescaleTier() override;
161  /// <summary>
162  /// Sets settings of view's middle timescale tier.
163  /// <see cref="TimescaleTier"></see>.
164  /// </summary>
165  ASPOSE_TASKS_SHARED_API void set_MiddleTimescaleTier(System::SharedPtr<Visualization::TimescaleTier> value) override;
166  /// <summary>
167  /// Gets settings of view's top timescale tier.
168  /// <see cref="TimescaleTier"></see>.
169  /// </summary>
170  ASPOSE_TASKS_SHARED_API System::SharedPtr<Visualization::TimescaleTier> get_TopTimescaleTier() override;
171  /// <summary>
172  /// Sets settings of view's top timescale tier.
173  /// <see cref="TimescaleTier"></see>.
174  /// </summary>
175  ASPOSE_TASKS_SHARED_API void set_TopTimescaleTier(System::SharedPtr<Visualization::TimescaleTier> value) override;
176  /// <inheritdoc/>
177  ASPOSE_TASKS_SHARED_API uint16_t get_TimescaleSizePercentage() override;
178  /// <inheritdoc/>
179  ASPOSE_TASKS_SHARED_API void set_TimescaleSizePercentage(uint16_t value) override;
180  /// <summary>
181  /// Gets a value indicating whether rollup bars will be hidden when expanding summary task.
182  /// </summary>
183  ASPOSE_TASKS_SHARED_API bool get_HideRollupBarsWhenSummaryExpanded() const;
184  /// <summary>
185  /// Sets a value indicating whether rollup bars will be hidden when expanding summary task.
186  /// </summary>
187  ASPOSE_TASKS_SHARED_API void set_HideRollupBarsWhenSummaryExpanded(bool value);
188  /// <summary>
189  /// Gets progress lines for the Gantt Chart view.
190  /// <see cref="ProgressLines"></see>.
191  /// </summary>
192  ASPOSE_TASKS_SHARED_API const System::SharedPtr<Aspose::Tasks::Visualization::ProgressLines>& get_ProgressLines() const;
193  /// <summary>
194  /// Sets progress lines for the Gantt Chart view.
195  /// <see cref="ProgressLines"></see>.
196  /// </summary>
197  ASPOSE_TASKS_SHARED_API void set_ProgressLines(const System::SharedPtr<Aspose::Tasks::Visualization::ProgressLines>& value);
198  /// <summary>
199  /// Gets a list of auto filters of a Gantt Chart view.
200  /// </summary>
201  ASPOSE_TASKS_SHARED_API System::SharedPtr<FilterCollection> get_AutoFilters();
202  /// <summary>
203  /// Gets a list of table text styles of the Gantt Chart view.
204  /// <see cref="TableTextStyle"></see>.
205  /// </summary>
206  ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Visualization::TableTextStyle>>> get_TableTextStyles();
207  /// <summary>
208  /// Gets a list of parent (common) bar styles of the Gantt Chart view.
209  /// <see cref="GanttBarStyle"></see>.
210  /// </summary>
211  ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Visualization::GanttBarStyle>>> get_BarStyles();
212  /// <summary>
213  /// Gets a list of custom task-specific bar styles of the Gantt Chart view.
214  /// <see cref="GanttBarStyle"></see>.
215  /// </summary>
216  ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Visualization::GanttBarStyle>>> get_CustomBarStyles();
217  /// <summary>
218  /// Gets non-working time color.
219  /// </summary>
220  ASPOSE_TASKS_SHARED_API System::Drawing::Color get_NonWorkingTimeColor() const;
221  /// <summary>
222  /// Sets non-working time color.
223  /// </summary>
224  ASPOSE_TASKS_SHARED_API void set_NonWorkingTimeColor(System::Drawing::Color value);
225 
226  /// <summary>
227  /// Initializes a new instance of the <see cref="GanttChartView"></see> class.
228  /// </summary>
229  ASPOSE_TASKS_SHARED_API GanttChartView();
230 
231 protected:
232 
233  /// <summary>
234  /// Gets a list of parent (common) bar styles of the Gantt Chart view.
235  /// <see cref="GanttBarStyle"></see>.
236  /// </summary>
237  ASPOSE_TASKS_SHARED_API void set_BarStyles(const System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Visualization::GanttBarStyle>>>& value);
238  /// <summary>
239  /// Gets a list of custom task-specific bar styles of the Gantt Chart view.
240  /// <see cref="GanttBarStyle"></see>.
241  /// </summary>
242  ASPOSE_TASKS_SHARED_API void set_CustomBarStyles(const System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Visualization::GanttBarStyle>>>& value);
243 
244  ASPOSE_TASKS_SHARED_API GanttChartView(int32_t uid);
245 
246  ASPOSE_TASKS_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(GanttChartView, CODEPORTING_ARGS(int32_t uid));
247  ASPOSE_TASKS_SHARED_API System::SharedPtr<Aspose::Tasks::Visualization::Gridlines> GetGridlines(Visualization::GridlineType gridlineType);
248  ASPOSE_TASKS_SHARED_API System::SharedPtr<Visualization::TextStyle> GetTextSType(Visualization::TextItemType textItemType);
249  #ifdef ASPOSE_GET_SHARED_MEMBERS
250  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
251  #endif
252 
253 
254 private:
255 
256  System::SharedPtr<FilterCollection> autoFilters;
257  System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Visualization::TableTextStyle>>> tableTextStyles;
258  System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Visualization::GanttBarStyle>>> barStyles;
259  System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Visualization::GanttBarStyle>>> customBarStyles;
260  GanttBarSize pr_BarSize;
261  System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Aspose::Tasks::Visualization::Gridlines>>> pr_Gridlines;
262  System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<Visualization::TextStyle>>> pr_TextStyles;
263  bool pr_ShowDrawings;
264  bool pr_ShowBarSplits;
265  bool pr_RollUpGanttBars;
266  bool pr_BarRounding;
267  System::SharedPtr<Visualization::TimescaleTier> pr_BottomTimescaleTier;
268  System::SharedPtr<Visualization::TimescaleTier> pr_MiddleTimescaleTier;
269  System::SharedPtr<Visualization::TimescaleTier> pr_TopTimescaleTier;
270  uint16_t pr_TimescaleSizePercentage;
271  bool pr_HideRollupBarsWhenSummaryExpanded;
272  System::SharedPtr<Aspose::Tasks::Visualization::ProgressLines> pr_ProgressLines;
273  System::Drawing::Color pr_NonWorkingTimeColor;
274 
275  void Init();
276 
277 };
278 
279 } // namespace Tasks
280 } // namespace Aspose
281 
282 
Represents a GanttChart view.
Definition: GanttChartView.h:69
const System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Visualization::TextStyle > > > & get_TextStyles() const
Gets a list of TextStyle of the Gantt Chart view.
void set_BarRounding(bool value)
Sets a value indicating whether the bars round to the nearest day. The default value is True.
void set_BottomTimescaleTier(System::SharedPtr< Visualization::TimescaleTier > value) override
Sets settings of view's bottom timescale tier. TimescaleTier
System::SharedPtr< Visualization::TimescaleTier > get_BottomTimescaleTier() override
Gets settings of view's bottom timescale tier. TimescaleTier
void set_ShowDrawings(bool value)
Sets a value indicating whether drawings on the Gantt Chart must be shown.
void set_Gridlines(const System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Aspose::Tasks::Visualization::Gridlines >>> &value)
Sets a list of Gridlines of the Gantt Chart view.
System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Visualization::GanttBarStyle > > > get_BarStyles()
Gets a list of parent (common) bar styles of the Gantt Chart view. GanttBarStyle.
const System::SharedPtr< Aspose::Tasks::Visualization::ProgressLines > & get_ProgressLines() const
Gets progress lines for the Gantt Chart view. ProgressLines.
bool get_ShowBarSplits() const
Gets a value indicating whether task splits on the Gantt Chart must be shown.
System::SharedPtr< Visualization::TimescaleTier > get_MiddleTimescaleTier() override
Gets settings of view's middle timescale tier. TimescaleTier.
System::Drawing::Color get_NonWorkingTimeColor() const
Gets non-working time color.
bool get_ShowDrawings() const
Gets a value indicating whether drawings on the Gantt Chart must be shown.
System::SharedPtr< FilterCollection > get_AutoFilters()
Gets a list of auto filters of a Gantt Chart view.
void set_ProgressLines(const System::SharedPtr< Aspose::Tasks::Visualization::ProgressLines > &value)
Sets progress lines for the Gantt Chart view. ProgressLines.
void set_RollUpGanttBars(bool value)
Sets a value indicating whether bars on the Gantt Chart must be rolled up.
System::SharedPtr< Visualization::TimescaleTier > get_TopTimescaleTier() override
Gets settings of view's top timescale tier. TimescaleTier.
void set_ShowBarSplits(bool value)
Sets a value indicating whether task splits on the Gantt Chart must be shown.
void set_MiddleTimescaleTier(System::SharedPtr< Visualization::TimescaleTier > value) override
Sets settings of view's middle timescale tier. TimescaleTier.
void set_HideRollupBarsWhenSummaryExpanded(bool value)
Sets a value indicating whether rollup bars will be hidden when expanding summary task.
void set_NonWorkingTimeColor(System::Drawing::Color value)
Sets non-working time color.
void set_TopTimescaleTier(System::SharedPtr< Visualization::TimescaleTier > value) override
Sets settings of view's top timescale tier. TimescaleTier.
uint16_t get_TimescaleSizePercentage() override
bool get_RollUpGanttBars() const
Gets a value indicating whether bars on the Gantt Chart must be rolled up.
void set_BarSize(GanttBarSize value)
Sets the height, in points, of the Gantt bars in the Gantt Chart.
const System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Aspose::Tasks::Visualization::Gridlines > > > & get_Gridlines() const
Gets a list of Gridlines of the Gantt Chart view.
System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Visualization::TableTextStyle > > > get_TableTextStyles()
Gets a list of table text styles of the Gantt Chart view. TableTextStyle.
void set_TimescaleSizePercentage(uint16_t value) override
void set_TextStyles(const System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Visualization::TextStyle >>> &value)
Sets a list of TextStyle of the Gantt Chart view.
bool get_HideRollupBarsWhenSummaryExpanded() const
Gets a value indicating whether rollup bars will be hidden when expanding summary task.
System::SharedPtr< System::Collections::Generic::List< System::SharedPtr< Visualization::GanttBarStyle > > > get_CustomBarStyles()
Gets a list of custom task-specific bar styles of the Gantt Chart view. GanttBarStyle.
bool get_BarRounding() const
Gets a value indicating whether the bars round to the nearest day. The default value is True.
GanttChartView()
Initializes a new instance of the GanttChartView class.
GanttBarSize get_BarSize() const
Gets the height, in points, of the Gantt bars in the Gantt Chart.
Represents a view in Project.
Definition: View.h:100
Definition: Asn.h:13