Aspose.Tasks for C++
TimescaleTier.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="TimescaleTier.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2025 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/string.h>
9 #include <system/date_time.h>
10 #include <cstdint>
11 
12 #include "aspose.tasks.cpp/Visualization/Thickness.h"
13 #include "aspose.tasks.cpp/Visualization/View/DateTimeConverter.h"
14 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
15 
16 namespace Aspose
17 {
18 namespace Tasks
19 {
20 namespace Visualization
21 {
22 class ApsTimescaleTierBuilder;
23 class ApsTimescaleTiersCommonSettings;
24 class ApsUsagePage;
25 enum class DateLabel;
26 enum class HorizontalStringAlignment;
27 enum class TimescaleUnit;
28 } // namespace Visualization
29 } // namespace Tasks
30 } // namespace Aspose
31 
32 namespace Aspose {
33 
34 namespace Tasks {
35 
36 namespace Visualization {
37 
38 /// <summary>
39 /// Represents a single tier of the timescale on a Gantt Chart.
40 /// </summary>
41 class ASPOSE_TASKS_SHARED_CLASS TimescaleTier final : public System::Object
42 {
43  typedef TimescaleTier ThisType;
44  typedef System::Object BaseType;
45 
46  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
47  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
48 
49  friend class Aspose::Tasks::Visualization::ApsUsagePage;
50  friend class Aspose::Tasks::Visualization::ApsTimescaleTierBuilder;
51  friend class Aspose::Tasks::Visualization::ApsTimescaleTiersCommonSettings;
52 
53 public:
54 
55  /// <summary>
56  /// Gets a callback function for handling rendering date tick in this tier.
57  /// </summary>
58  ASPOSE_TASKS_SHARED_API Aspose::Tasks::Visualization::DateTimeConverter get_DateTimeConverter() const;
59  /// <summary>
60  /// Sets a callback function for handling rendering date tick in this tier.
61  /// </summary>
62  ASPOSE_TASKS_SHARED_API void set_DateTimeConverter(Aspose::Tasks::Visualization::DateTimeConverter value);
63  /// <summary>
64  /// Gets the time unit interval in which to show labels for the tier.
65  /// The default value is 1.
66  /// </summary>
67  ASPOSE_TASKS_SHARED_API int32_t get_Count() const;
68  /// <summary>
69  /// Sets the time unit interval in which to show labels for the tier.
70  /// The default value is 1.
71  /// </summary>
72  ASPOSE_TASKS_SHARED_API void set_Count(int32_t value);
73  /// <summary>
74  /// Gets date label <see cref="DateLabel"></see> for the timescale tier.
75  /// </summary>
76  ASPOSE_TASKS_SHARED_API DateLabel get_Label() const;
77  /// <summary>
78  /// Sets date label <see cref="DateLabel"></see> for the timescale tier.
79  /// </summary>
80  ASPOSE_TASKS_SHARED_API void set_Label(DateLabel value);
81  /// <summary>
82  /// Gets how to align labels within each time period of the tier (<see cref="HorizontalStringAlignment"></see>).
83  /// </summary>
84  ASPOSE_TASKS_SHARED_API HorizontalStringAlignment get_Alignment() const;
85  /// <summary>
86  /// Sets how to align labels within each time period of the tier (<see cref="HorizontalStringAlignment"></see>).
87  /// </summary>
88  ASPOSE_TASKS_SHARED_API void set_Alignment(HorizontalStringAlignment value);
89  /// <summary>
90  /// Gets a value indicating whether to base the tier labels on the fiscal year.
91  /// </summary>
92  ASPOSE_TASKS_SHARED_API bool get_UsesFiscalYear() const;
93  /// <summary>
94  /// Sets a value indicating whether to base the tier labels on the fiscal year.
95  /// </summary>
96  ASPOSE_TASKS_SHARED_API void set_UsesFiscalYear(bool value);
97  /// <summary>
98  /// Gets a value indicating whether whether to show tick marks that separate time periods in the tier.
99  /// </summary>
100  ASPOSE_TASKS_SHARED_API bool get_ShowTicks() const;
101  /// <summary>
102  /// Sets a value indicating whether whether to show tick marks that separate time periods in the tier.
103  /// </summary>
104  ASPOSE_TASKS_SHARED_API void set_ShowTicks(bool value);
105  /// <summary>
106  /// Gets timescale unit <see cref="TimescaleUnit"></see> for the timescale tier.
107  /// The default value is <see cref="TimescaleUnit">Days</see>.
108  /// </summary>
109  ASPOSE_TASKS_SHARED_API TimescaleUnit get_Unit() const;
110  /// <summary>
111  /// Sets timescale unit <see cref="TimescaleUnit"></see> for the timescale tier.
112  /// The default value is <see cref="TimescaleUnit">Days</see>.
113  /// </summary>
114  ASPOSE_TASKS_SHARED_API void set_Unit(TimescaleUnit value);
115  /// <summary>
116  /// Gets flag that defines whether date labels should be rendered on each page when a time period spans over several pages.
117  /// If value is 'true', when time period spans over several pages, date labels for the period are rendered on each page.
118  /// If values is 'false', date label is rendered only once according to a value of <see cref="Alignment"></see> property.
119  /// </summary>
120  /// <remarks>Doesn't have the equivalent in MS Project.</remarks>
121  ASPOSE_TASKS_SHARED_API bool get_RenderLabelOnEachPage() const;
122  /// <summary>
123  /// Sets flag that defines whether date labels should be rendered on each page when a time period spans over several pages.
124  /// If value is 'true', when time period spans over several pages, date labels for the period are rendered on each page.
125  /// If values is 'false', date label is rendered only once according to a value of <see cref="Alignment"></see> property.
126  /// </summary>
127  /// <remarks>Doesn't have the equivalent in MS Project.</remarks>
128  ASPOSE_TASKS_SHARED_API void set_RenderLabelOnEachPage(bool value);
129 
130  /// <summary>
131  /// Initializes a new instance of the <see cref="TimescaleTier"></see> class.
132  /// </summary>
133  ASPOSE_TASKS_SHARED_API TimescaleTier();
134  /// <summary>
135  /// Initializes a new instance of the <see cref="TimescaleTier"></see> class.
136  /// </summary>
137  /// <param name="unit">
138  /// The timescale unit <see cref="TimescaleUnit"></see>.
139  /// </param>
140  /// <param name="count">
141  /// The count of <see cref="TimescaleUnit"></see> units.
142  /// </param>
143  ASPOSE_TASKS_SHARED_API TimescaleTier(TimescaleUnit unit, int32_t count);
144 
145 protected:
146 
147  ASPOSE_TASKS_SHARED_API Thickness get_LabelMargin() const;
148  /// <summary>
149  /// Gets days count in one tick
150  /// </summary>
151  ASPOSE_TASKS_SHARED_API float get_TotalDaysInTick();
152  /// <summary>
153  /// Gets days count in timescale unit
154  /// </summary>
155  ASPOSE_TASKS_SHARED_API float get_DaysInUnit();
156 
157  #ifdef ASPOSE_GET_SHARED_MEMBERS
158  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
159  #endif
160 
161 
162 private:
163 
164  int32_t count;
165  Aspose::Tasks::Visualization::DateTimeConverter pr_DateTimeConverter;
166  DateLabel pr_Label;
167  HorizontalStringAlignment pr_Alignment;
168  bool pr_UsesFiscalYear;
169  bool pr_ShowTicks;
170  TimescaleUnit pr_Unit;
171  bool pr_RenderLabelOnEachPage;
172  Thickness pr_LabelMargin;
173 
174  ASPOSE_TASKS_SHARED_API void set_LabelMargin(Thickness value);
175 
176  /// <summary>
177  /// Initializes a new instance of the <see cref="TimescaleTier"></see> class.
178  /// </summary>
179  /// <param name="unit">
180  /// The timescale unit <see cref="TimescaleUnit"></see>.
181  /// </param>
182  TimescaleTier(TimescaleUnit unit);
183 
184  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(TimescaleTier, CODEPORTING_ARGS(TimescaleUnit unit));
185 
186 };
187 
188 } // namespace Visualization
189 } // namespace Tasks
190 } // namespace Aspose
191 
192 
Definition: Asn.h:12
Represents margins of visual object.
Definition: Thickness.h:21
Represents a single tier of the timescale on a Gantt Chart.
Definition: TimescaleTier.h:41