Aspose.Tasks for C++
BarStyle.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="BarStyle.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/string.h>
9 #include <drawing/color.h>
10 
11 #include "aspose.tasks.cpp/Visualization/View/Styles/TaskBarTextConverter.h"
12 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
13 
14 namespace Aspose
15 {
16 namespace Foundation
17 {
18 namespace Drawing
19 {
20 class DrColor;
21 } // namespace Drawing
22 } // namespace Foundation
23 namespace Tasks
24 {
25 enum class Field;
26 class Task;
27 namespace Visualization
28 {
29 class ApsLink;
30 class ApsTask;
31 enum class BarItemType;
32 enum class BarShape;
33 namespace Charting
34 {
35 class BarSeries;
36 class ColumnSeries;
37 } // namespace Charting
38 enum class GanttBarType;
39 class GanttChartBarStylesManager;
40 enum class Shape;
41 class TextStyle;
42 } // namespace Visualization
43 } // namespace Tasks
44 } // namespace Aspose
45 namespace System
46 {
47 namespace Collections
48 {
49 namespace Generic
50 {
51 template <typename> class List;
52 } // namespace Generic
53 } // namespace Collections
54 } // namespace System
55 
56 namespace Aspose {
57 
58 namespace Tasks {
59 
60 namespace Visualization {
61 
62 /// <summary>
63 /// Change the visual style of the bar for the item in the project view.
64 /// </summary>
65 class ASPOSE_TASKS_SHARED_CLASS BarStyle : public System::Object
66 {
67  typedef BarStyle ThisType;
68  typedef System::Object BaseType;
69 
70  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
71  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
72 
73  friend class Aspose::Tasks::Visualization::ApsLink;
74  friend class Aspose::Tasks::Visualization::ApsTask;
75  friend class Aspose::Tasks::Visualization::Charting::BarSeries;
76  friend class Aspose::Tasks::Visualization::Charting::ColumnSeries;
77  friend class Aspose::Tasks::Visualization::GanttChartBarStylesManager;
78 
79 public:
80 
81  /// <summary>
82  /// Gets <see cref="Color"></see> of the bar style.
83  /// </summary>
84  ASPOSE_TASKS_SHARED_API System::Drawing::Color get_BarColor() const;
85  /// <summary>
86  /// Sets <see cref="Color"></see> of the bar style.
87  /// </summary>
88  ASPOSE_TASKS_SHARED_API void set_BarColor(System::Drawing::Color value);
89  /// <summary>
90  /// Gets <see cref="Color"></see> of the shape at the beginning of the bar.
91  /// </summary>
92  ASPOSE_TASKS_SHARED_API System::Drawing::Color get_StartShapeColor() const;
93  /// <summary>
94  /// Sets <see cref="Color"></see> of the shape at the beginning of the bar.
95  /// </summary>
96  ASPOSE_TASKS_SHARED_API void set_StartShapeColor(System::Drawing::Color value);
97  /// <summary>
98  /// Gets a type of the start shape.
99  /// </summary>
100  ASPOSE_TASKS_SHARED_API GanttBarType get_StartShapeType() const;
101  /// <summary>
102  /// Sets a type of the start shape.
103  /// </summary>
104  ASPOSE_TASKS_SHARED_API void set_StartShapeType(GanttBarType value);
105  /// <summary>
106  /// Gets <see cref="Color"></see> of the shape at the end of the bar.
107  /// </summary>
108  ASPOSE_TASKS_SHARED_API System::Drawing::Color get_EndShapeColor() const;
109  /// <summary>
110  /// Sets <see cref="Color"></see> of the shape at the end of the bar.
111  /// </summary>
112  ASPOSE_TASKS_SHARED_API void set_EndShapeColor(System::Drawing::Color value);
113  /// <summary>
114  /// Gets a type of the end shape.
115  /// <see cref="GanttBarType"></see>.
116  /// </summary>
117  ASPOSE_TASKS_SHARED_API GanttBarType get_EndShapeType() const;
118  /// <summary>
119  /// Sets a type of the end shape.
120  /// <see cref="GanttBarType"></see>.
121  /// </summary>
122  ASPOSE_TASKS_SHARED_API void set_EndShapeType(GanttBarType value);
123  /// <summary>
124  /// Gets <see cref="BarItemType"></see> of the bar style.
125  /// </summary>
126  ASPOSE_TASKS_SHARED_API BarItemType get_ItemType() const;
127  /// <summary>
128  /// Sets <see cref="BarItemType"></see> of the bar style.
129  /// </summary>
130  ASPOSE_TASKS_SHARED_API void set_ItemType(BarItemType value);
131  /// <summary>
132  /// Gets <see cref="BarShape"></see> of the bar style.
133  /// </summary>
134  ASPOSE_TASKS_SHARED_API Aspose::Tasks::Visualization::BarShape get_BarShape() const;
135  /// <summary>
136  /// Sets <see cref="BarShape"></see> of the bar style.
137  /// </summary>
138  ASPOSE_TASKS_SHARED_API void set_BarShape(Aspose::Tasks::Visualization::BarShape value);
139  /// <summary>
140  /// Gets <see cref="Shape"></see> at the beginning of the bar.
141  /// </summary>
142  ASPOSE_TASKS_SHARED_API Shape get_StartShape() const;
143  /// <summary>
144  /// Sets <see cref="Shape"></see> at the beginning of the bar.
145  /// </summary>
146  ASPOSE_TASKS_SHARED_API void set_StartShape(Shape value);
147  /// <summary>
148  /// Gets <see cref="Shape"></see> at the end of the bar.
149  /// </summary>
150  ASPOSE_TASKS_SHARED_API Shape get_EndShape() const;
151  /// <summary>
152  /// Sets <see cref="Shape"></see> at the end of the bar.
153  /// </summary>
154  ASPOSE_TASKS_SHARED_API void set_EndShape(Shape value);
155  /// <summary>
156  /// Gets style of the bar's text.
157  /// </summary>
158  ASPOSE_TASKS_SHARED_API const System::SharedPtr<Aspose::Tasks::Visualization::TextStyle>& get_TextStyle() const;
159  /// <summary>
160  /// Sets style of the bar's text.
161  /// </summary>
162  ASPOSE_TASKS_SHARED_API void set_TextStyle(const System::SharedPtr<Aspose::Tasks::Visualization::TextStyle>& value);
163  /// <summary>
164  /// Gets user-defined converter to get text to render on the left of the task's bar. Overrides the value of <see cref="LeftField"></see> property.
165  /// </summary>
166  ASPOSE_TASKS_SHARED_API TaskBarTextConverter get_LeftBarTextConverter() const;
167  /// <summary>
168  /// Sets user-defined converter to get text to render on the left of the task's bar. Overrides the value of <see cref="LeftField"></see> property.
169  /// </summary>
170  ASPOSE_TASKS_SHARED_API void set_LeftBarTextConverter(TaskBarTextConverter value);
171  /// <summary>
172  /// Gets user-defined converter to get text to render on the top of the task's bar. Overrides the value of <see cref="TopField"></see> property.
173  /// </summary>
174  ASPOSE_TASKS_SHARED_API TaskBarTextConverter get_TopBarTextConverter() const;
175  /// <summary>
176  /// Sets user-defined converter to get text to render on the top of the task's bar. Overrides the value of <see cref="TopField"></see> property.
177  /// </summary>
178  ASPOSE_TASKS_SHARED_API void set_TopBarTextConverter(TaskBarTextConverter value);
179  /// <summary>
180  /// Gets user-defined converter to get text to render on the right of the task's bar. Overrides the value of <see cref="RightField"></see> property.
181  /// </summary>
182  ASPOSE_TASKS_SHARED_API TaskBarTextConverter get_RightBarTextConverter() const;
183  /// <summary>
184  /// Sets user-defined converter to get text to render on the right of the task's bar. Overrides the value of <see cref="RightField"></see> property.
185  /// </summary>
186  ASPOSE_TASKS_SHARED_API void set_RightBarTextConverter(TaskBarTextConverter value);
187  /// <summary>
188  /// Gets user-defined converter to get text to render on the bottom of the task's bar. Overrides the value of <see cref="BottomField"></see> property.
189  /// </summary>
190  ASPOSE_TASKS_SHARED_API TaskBarTextConverter get_BottomBarTextConverter() const;
191  /// <summary>
192  /// Sets user-defined converter to get text to render on the bottom of the task's bar. Overrides the value of <see cref="BottomField"></see> property.
193  /// </summary>
194  ASPOSE_TASKS_SHARED_API void set_BottomBarTextConverter(TaskBarTextConverter value);
195  /// <summary>
196  /// Gets user-defined converter to get text to render inside of the task's bar. Overrides the value of <see cref="InsideField"></see> property.
197  /// </summary>
198  ASPOSE_TASKS_SHARED_API TaskBarTextConverter get_InsideBarTextConverter() const;
199  /// <summary>
200  /// Sets user-defined converter to get text to render inside of the task's bar. Overrides the value of <see cref="InsideField"></see> property.
201  /// </summary>
202  ASPOSE_TASKS_SHARED_API void set_InsideBarTextConverter(TaskBarTextConverter value);
203  /// <summary>
204  /// Gets a field to be displayed on the left of the bar.
205  /// </summary>
206  ASPOSE_TASKS_SHARED_API Field get_LeftField() const;
207  /// <summary>
208  /// Sets a field to be displayed on the left of the bar.
209  /// </summary>
210  ASPOSE_TASKS_SHARED_API void set_LeftField(Field value);
211  /// <summary>
212  /// Gets a field to be displayed on the top of the bar.
213  /// </summary>
214  ASPOSE_TASKS_SHARED_API Field get_TopField() const;
215  /// <summary>
216  /// Sets a field to be displayed on the top of the bar.
217  /// </summary>
218  ASPOSE_TASKS_SHARED_API void set_TopField(Field value);
219  /// <summary>
220  /// Gets a field to be displayed on the right of the bar.
221  /// </summary>
222  ASPOSE_TASKS_SHARED_API Field get_RightField() const;
223  /// <summary>
224  /// Sets a field to be displayed on the right of the bar.
225  /// </summary>
226  ASPOSE_TASKS_SHARED_API void set_RightField(Field value);
227  /// <summary>
228  /// Gets a field to be displayed on the bottom of the bar.
229  /// </summary>
230  ASPOSE_TASKS_SHARED_API Field get_BottomField() const;
231  /// <summary>
232  /// Sets a field to be displayed on the bottom of the bar.
233  /// </summary>
234  ASPOSE_TASKS_SHARED_API void set_BottomField(Field value);
235  /// <summary>
236  /// Gets a field to be displayed inside of the bar.
237  /// </summary>
238  ASPOSE_TASKS_SHARED_API Field get_InsideField() const;
239  /// <summary>
240  /// Sets a field to be displayed inside of the bar.
241  /// </summary>
242  ASPOSE_TASKS_SHARED_API void set_InsideField(Field value);
243  /// <summary>
244  /// Gets a start point position of the gantt bar.
245  /// <see cref="Field"></see>.
246  /// </summary>
247  ASPOSE_TASKS_SHARED_API Field get_From() const;
248  /// <summary>
249  /// Sets a start point position of the gantt bar.
250  /// <see cref="Field"></see>.
251  /// </summary>
252  ASPOSE_TASKS_SHARED_API void set_From(Field value);
253  /// <summary>
254  /// Gets a finish point position of the gantt bar.
255  /// </summary>
256  ASPOSE_TASKS_SHARED_API Field get_To() const;
257  /// <summary>
258  /// Sets a finish point position of the gantt bar.
259  /// </summary>
260  ASPOSE_TASKS_SHARED_API void set_To(Field value);
261 
262  /// <summary>
263  /// Initializes a new instance of the <see cref="BarStyle"></see> class.
264  /// </summary>
265  ASPOSE_TASKS_SHARED_API BarStyle();
266 
267 protected:
268 
269  ASPOSE_TASKS_SHARED_API System::SharedPtr<Aspose::Foundation::Drawing::DrColor> get_DrColor();
270 
271  static ASPOSE_TASKS_SHARED_API System::SharedPtr<BarStyle> GetBarStyle(const System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<BarStyle>>>& barStyles, BarItemType item);
272  #ifdef ASPOSE_GET_SHARED_MEMBERS
273  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
274  #endif
275 
276 
277 private:
278 
279  System::Drawing::Color pr_BarColor;
280  System::Drawing::Color pr_StartShapeColor;
281  GanttBarType pr_StartShapeType;
282  System::Drawing::Color pr_EndShapeColor;
283  GanttBarType pr_EndShapeType;
284  BarItemType pr_ItemType;
285  Aspose::Tasks::Visualization::BarShape pr_BarShape;
286  Shape pr_StartShape;
287  Shape pr_EndShape;
288  System::SharedPtr<Aspose::Tasks::Visualization::TextStyle> pr_TextStyle;
289  TaskBarTextConverter pr_LeftBarTextConverter;
290  TaskBarTextConverter pr_TopBarTextConverter;
291  TaskBarTextConverter pr_RightBarTextConverter;
292  TaskBarTextConverter pr_BottomBarTextConverter;
293  TaskBarTextConverter pr_InsideBarTextConverter;
294  Field pr_LeftField;
295  Field pr_TopField;
296  Field pr_RightField;
297  Field pr_BottomField;
298  Field pr_InsideField;
299  Field pr_From;
300  Field pr_To;
301 
302 };
303 
304 } // namespace Visualization
305 } // namespace Tasks
306 } // namespace Aspose
307 
308 
Change the visual style of the bar for the item in the project view.
Definition: BarStyle.h:66
TaskBarTextConverter get_RightBarTextConverter() const
Gets user-defined converter to get text to render on the right of the task's bar. Overrides the value...
const System::SharedPtr< Aspose::Tasks::Visualization::TextStyle > & get_TextStyle() const
Gets style of the bar's text.
void set_InsideField(Field value)
Sets a field to be displayed inside of the bar.
Field get_To() const
Gets a finish point position of the gantt bar.
Field get_InsideField() const
Gets a field to be displayed inside of the bar.
Field get_From() const
Gets a start point position of the gantt bar. Field.
void set_StartShapeColor(System::Drawing::Color value)
Sets Color of the shape at the beginning of the bar.
void set_From(Field value)
Sets a start point position of the gantt bar. Field.
System::Drawing::Color get_BarColor() const
Gets Color of the bar style.
void set_BottomBarTextConverter(TaskBarTextConverter value)
Sets user-defined converter to get text to render on the bottom of the task's bar....
Shape get_StartShape() const
Gets Shape at the beginning of the bar.
void set_BarColor(System::Drawing::Color value)
Sets Color of the bar style.
void set_EndShapeColor(System::Drawing::Color value)
Sets Color of the shape at the end of the bar.
void set_To(Field value)
Sets a finish point position of the gantt bar.
TaskBarTextConverter get_TopBarTextConverter() const
Gets user-defined converter to get text to render on the top of the task's bar. Overrides the value o...
BarItemType get_ItemType() const
Gets BarItemType of the bar style.
void set_ItemType(BarItemType value)
Sets BarItemType of the bar style.
GanttBarType get_StartShapeType() const
Gets a type of the start shape.
void set_BarShape(Aspose::Tasks::Visualization::BarShape value)
Sets BarShape of the bar style.
BarStyle()
Initializes a new instance of the BarStyle class.
Field get_LeftField() const
Gets a field to be displayed on the left of the bar.
void set_LeftField(Field value)
Sets a field to be displayed on the left of the bar.
void set_EndShape(Shape value)
Sets Shape at the end of the bar.
GanttBarType get_EndShapeType() const
Gets a type of the end shape. GanttBarType.
Aspose::Tasks::Visualization::BarShape get_BarShape() const
Gets BarShape of the bar style.
void set_StartShapeType(GanttBarType value)
Sets a type of the start shape.
void set_TextStyle(const System::SharedPtr< Aspose::Tasks::Visualization::TextStyle > &value)
Sets style of the bar's text.
Field get_RightField() const
Gets a field to be displayed on the right of the bar.
void set_RightField(Field value)
Sets a field to be displayed on the right of the bar.
void set_InsideBarTextConverter(TaskBarTextConverter value)
Sets user-defined converter to get text to render inside of the task's bar. Overrides the value of In...
void set_EndShapeType(GanttBarType value)
Sets a type of the end shape. GanttBarType.
TaskBarTextConverter get_LeftBarTextConverter() const
Gets user-defined converter to get text to render on the left of the task's bar. Overrides the value ...
void set_StartShape(Shape value)
Sets Shape at the beginning of the bar.
Field get_TopField() const
Gets a field to be displayed on the top of the bar.
void set_LeftBarTextConverter(TaskBarTextConverter value)
Sets user-defined converter to get text to render on the left of the task's bar. Overrides the value ...
void set_TopField(Field value)
Sets a field to be displayed on the top of the bar.
TaskBarTextConverter get_InsideBarTextConverter() const
Gets user-defined converter to get text to render inside of the task's bar. Overrides the value of In...
void set_TopBarTextConverter(TaskBarTextConverter value)
Sets user-defined converter to get text to render on the top of the task's bar. Overrides the value o...
Field get_BottomField() const
Gets a field to be displayed on the bottom of the bar.
TaskBarTextConverter get_BottomBarTextConverter() const
Gets user-defined converter to get text to render on the bottom of the task's bar....
System::Drawing::Color get_EndShapeColor() const
Gets Color of the shape at the end of the bar.
System::Drawing::Color get_StartShapeColor() const
Gets Color of the shape at the beginning of the bar.
void set_RightBarTextConverter(TaskBarTextConverter value)
Sets user-defined converter to get text to render on the right of the task's bar. Overrides the value...
void set_BottomField(Field value)
Sets a field to be displayed on the bottom of the bar.
Shape get_EndShape() const
Gets Shape at the end of the bar.
Definition: Asn.h:13