Aspose.Tasks for C++
ViewColumn.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="ViewColumn.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 <cstdint>
10 
11 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
12 
13 namespace Aspose
14 {
15 namespace Tasks
16 {
17 enum class Field;
18 namespace RiskAnalysis
19 {
20 namespace Reporting
21 {
22 template <typename, typename> class KeyValueViewColumn;
23 class PercentileViewColumn;
24 } // namespace Reporting
25 } // namespace RiskAnalysis
26 namespace Saving
27 {
28 class CsvWriter;
29 namespace Excel
30 {
31 namespace OpenXML
32 {
33 class XlsxWriter;
34 } // namespace OpenXML
35 } // namespace Excel
36 class SSWriter;
37 } // namespace Saving
38 namespace Visualization
39 {
40 class ApsResourceUsageBuilder;
41 class ApsTableBuilder;
42 class ApsTaskUsageBuilder;
43 class ApsUsageBuilderRowLayoutCalculator;
44 class AssignmentViewColumn;
45 class GanttChartColumn;
46 enum class HorizontalStringAlignment;
47 class ITextStyleModificationCallback;
48 class ResourceViewColumn;
49 class RowLayoutCalculator;
50 class UsageViewDetailsColumn;
51 } // namespace Visualization
52 } // namespace Tasks
53 } // namespace Aspose
54 
55 namespace Aspose {
56 
57 namespace Tasks {
58 
59 namespace Visualization {
60 
61 /// <summary>
62 /// Represents a column in a project view.
63 /// </summary>
64 class ASPOSE_TASKS_SHARED_CLASS ViewColumn : public System::Object
65 {
66  typedef ViewColumn ThisType;
67  typedef System::Object BaseType;
68 
69  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
70  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
71 
72  template<typename FT0, typename FT1> friend class Aspose::Tasks::RiskAnalysis::Reporting::KeyValueViewColumn;
73  friend class Aspose::Tasks::RiskAnalysis::Reporting::PercentileViewColumn;
74  friend class Aspose::Tasks::Saving::CsvWriter;
75  friend class Aspose::Tasks::Saving::Excel::OpenXML::XlsxWriter;
76  friend class Aspose::Tasks::Saving::SSWriter;
77  friend class Aspose::Tasks::Visualization::RowLayoutCalculator;
78  friend class Aspose::Tasks::Visualization::ApsResourceUsageBuilder;
79  friend class Aspose::Tasks::Visualization::ApsTableBuilder;
80  friend class Aspose::Tasks::Visualization::ApsTaskUsageBuilder;
81  friend class Aspose::Tasks::Visualization::ApsUsageBuilderRowLayoutCalculator;
84  friend class Aspose::Tasks::Visualization::UsageViewDetailsColumn;
86 
87 public:
88 
89  /// <summary>
90  /// Gets column field.
91  /// <see cref="Field"></see>.
92  /// </summary>
93  virtual ASPOSE_TASKS_SHARED_API Aspose::Tasks::Field get_Field() = 0;
94  /// <summary>
95  /// Sets column field.
96  /// <see cref="Field"></see>.
97  /// </summary>
98  virtual ASPOSE_TASKS_SHARED_API void set_Field(Aspose::Tasks::Field value) = 0;
99  /// <summary>
100  /// Gets the column name.
101  /// </summary>
102  ASPOSE_TASKS_SHARED_API System::String get_Name() const;
103  /// <summary>
104  /// Gets alignment of the text (can be one of the values of the <see cref="HorizontalStringAlignment"></see> enumeration).
105  /// </summary>
106  ASPOSE_TASKS_SHARED_API HorizontalStringAlignment get_StringAlignment() const;
107  /// <summary>
108  /// Sets alignment of the text (can be one of the values of the <see cref="HorizontalStringAlignment"></see> enumeration).
109  /// </summary>
110  ASPOSE_TASKS_SHARED_API void set_StringAlignment(HorizontalStringAlignment value);
111  /// <summary>
112  /// Gets the column width.
113  /// </summary>
114  ASPOSE_TASKS_SHARED_API int32_t get_Width() const;
115  /// <summary>
116  /// Gets the callback which can be used to customize the appearance of the column's cells.
117  /// </summary>
118  ASPOSE_TASKS_SHARED_API const System::SharedPtr<ITextStyleModificationCallback>& get_TextStyleModificationCallback() const;
119  /// <summary>
120  /// Sets the callback which can be used to customize the appearance of the column's cells.
121  /// </summary>
122  ASPOSE_TASKS_SHARED_API void set_TextStyleModificationCallback(const System::SharedPtr<ITextStyleModificationCallback>& value);
123 
124 protected:
125 
126  /// <summary>
127  /// Gets a value indicating whether determines whether a column is a usage view column.
128  /// </summary>
129  ASPOSE_TASKS_SHARED_API bool get_IsUsageDetail() const;
130  /// <summary>
131  /// Sets a value indicating whether determines whether a column is a usage view column.
132  /// </summary>
133  ASPOSE_TASKS_SHARED_API void set_IsUsageDetail(bool value);
134 
135  /// <summary>
136  /// Initializes a new instance of the <see cref="ViewColumn"></see> class.
137  /// </summary>
138  /// <param name="name">the specified column name.</param>
139  /// <param name="width">the specified column width.</param>
140  ASPOSE_TASKS_SHARED_API ViewColumn(const System::String& name, int32_t width);
141 
142  /// <summary>
143  /// Returns a text for the specified object.
144  /// </summary>
145  /// <param name="o">the specified object to get a text for.</param>
146  /// <returns>Returns a text for the object.</returns>
147  virtual ASPOSE_TASKS_SHARED_API System::String GetText(System::SharedPtr<System::Object> o) = 0;
148  #ifdef ASPOSE_GET_SHARED_MEMBERS
149  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
150  #endif
151 
152 
153 private:
154 
155  int32_t width;
156  System::String name;
157  HorizontalStringAlignment pr_StringAlignment;
158  System::SharedPtr<ITextStyleModificationCallback> pr_TextStyleModificationCallback;
159  bool pr_IsUsageDetail;
160 
161  System::String get_DebuggerDisplay();
162 
163 };
164 
165 } // namespace Visualization
166 } // namespace Tasks
167 } // namespace Aspose
168 
169 
Project's view class.
Definition: AssignmentViewColumn.h:40
Project's view class
Definition: GanttChartColumn.h:39
Project's view class used in ResourceUsage view and ResourceSheet view.
Definition: ResourceViewColumn.h:39
Represents a column in a project view.
Definition: ViewColumn.h:65
int32_t get_Width() const
Gets the column width.
const System::SharedPtr< ITextStyleModificationCallback > & get_TextStyleModificationCallback() const
Gets the callback which can be used to customize the appearance of the column's cells.
void set_StringAlignment(HorizontalStringAlignment value)
Sets alignment of the text (can be one of the values of the HorizontalStringAlignment enumeration).
void set_TextStyleModificationCallback(const System::SharedPtr< ITextStyleModificationCallback > &value)
Sets the callback which can be used to customize the appearance of the column's cells.
virtual Aspose::Tasks::Field get_Field()=0
Gets column field. Field.
HorizontalStringAlignment get_StringAlignment() const
Gets alignment of the text (can be one of the values of the HorizontalStringAlignment enumeration).
virtual void set_Field(Aspose::Tasks::Field value)=0
Sets column field. Field.
System::String get_Name() const
Gets the column name.
Definition: Asn.h:13