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