Aspose.Tasks for C++
GanttChartColumn.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="GanttChartColumn.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 <system/multicast_delegate.h>
10 #include <system/event.h>
11 #include <cstdint>
12 
13 #include "aspose.tasks.cpp/Visualization/View/ViewColumn.h"
14 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
15 
16 namespace Aspose
17 {
18 namespace Tasks
19 {
20 enum class Field;
21 class Task;
22 namespace Visualization
23 {
24 using TaskToColumnTextConverter = System::MulticastDelegate<System::String(System::SharedPtr<Aspose::Tasks::Task>)>;
25 } // namespace Visualization
26 } // namespace Tasks
27 } // namespace Aspose
28 
29 namespace Aspose {
30 
31 namespace Tasks {
32 
33 namespace Visualization {
34 
35 /// <summary>
36 /// Project's view class
37 /// </summary>
38 class ASPOSE_TASKS_SHARED_CLASS GanttChartColumn final : public Aspose::Tasks::Visualization::ViewColumn
39 {
40  typedef GanttChartColumn ThisType;
42 
43  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
44  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
45 
46 public:
47 
48  /// <summary>
49  /// Column field.
50  /// <see cref="Field"></see>.
51  /// </summary>
52  ASPOSE_TASKS_SHARED_API Aspose::Tasks::Field get_Field() override;
53  /// <summary>
54  /// Column field.
55  /// <see cref="Field"></see>.
56  /// </summary>
57  ASPOSE_TASKS_SHARED_API void set_Field(Aspose::Tasks::Field value) override;
58 
59  /// <summary>
60  /// Initializes a new instance of the GanttChartColumn class.
61  /// </summary>
62  /// <param name="name">Column's name.</param>
63  /// <param name="width">Column's width in pixels.</param>
64  /// <param name="converter">Task data to column text converter.</param>
65  /// <param name="field">Column field.</param>
66  ASPOSE_TASKS_SHARED_API GanttChartColumn(const System::String& name, int32_t width, TaskToColumnTextConverter converter, Aspose::Tasks::Field field);
67  /// <summary>
68  /// Initializes a new instance of the GanttChartColumn class.
69  /// </summary>
70  /// <param name="name">Column's name.</param>
71  /// <param name="width">Column's width in pixels.</param>
72  /// <param name="converter">Task data to column text converter.</param>
73  ASPOSE_TASKS_SHARED_API GanttChartColumn(const System::String& name, int32_t width, TaskToColumnTextConverter converter);
74  /// <summary>
75  /// Initializes a new instance of the GanttChartColumn class.
76  /// </summary>
77  /// <param name="width">Column width in pixels.</param>
78  /// <param name="field">Column field.</param>
79  ASPOSE_TASKS_SHARED_API GanttChartColumn(int32_t width, Aspose::Tasks::Field field);
80  /// <summary>
81  /// Initializes a new instance of the GanttChartColumn class.
82  /// </summary>
83  /// <param name="name">Column name.</param>
84  /// <param name="width">Column width in pixels.</param>
85  /// <param name="field">Column field.</param>
86  ASPOSE_TASKS_SHARED_API GanttChartColumn(const System::String& name, int32_t width, Aspose::Tasks::Field field);
87 
88  /// <summary>
89  /// Converts current task to the column text.
90  /// </summary>
91  /// <param name="task">Current task.</param>
92  /// <returns>The column text.</returns>
93  ASPOSE_TASKS_SHARED_API System::String GetColumnText(const System::SharedPtr<Task>& task);
94 
95 protected:
96 
97  ASPOSE_TASKS_SHARED_API System::String GetText(System::SharedPtr<System::Object> o) override;
98  #ifdef ASPOSE_GET_SHARED_MEMBERS
99  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
100  #endif
101 
102 
103 private:
104 
105  Aspose::Tasks::Field field;
106 
107  System::String get_DebuggerDisplay();
108 
109  System::Event<System::String(System::SharedPtr<Task>)> Converter;
110 
111 };
112 
113 } // namespace Visualization
114 } // namespace Tasks
115 } // namespace Aspose
116 
117 
Project's view class
Definition: GanttChartColumn.h:39
GanttChartColumn(const System::String &name, int32_t width, Aspose::Tasks::Field field)
Initializes a new instance of the GanttChartColumn class.
void set_Field(Aspose::Tasks::Field value) override
Column field. Field.
GanttChartColumn(const System::String &name, int32_t width, TaskToColumnTextConverter converter)
Initializes a new instance of the GanttChartColumn class.
Aspose::Tasks::Field get_Field() override
Column field. Field.
GanttChartColumn(const System::String &name, int32_t width, TaskToColumnTextConverter converter, Aspose::Tasks::Field field)
Initializes a new instance of the GanttChartColumn class.
GanttChartColumn(int32_t width, Aspose::Tasks::Field field)
Initializes a new instance of the GanttChartColumn class.
System::String GetColumnText(const System::SharedPtr< Task > &task)
Converts current task to the column text.
Represents a column in a project view.
Definition: ViewColumn.h:65
Definition: Asn.h:13