Aspose.Tasks for C++
ResourceViewColumn.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="ResourceViewColumn.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 Resource;
22 namespace Visualization
23 {
24 using ResourceToColumnTextConverter = System::MulticastDelegate<System::String(System::SharedPtr<Aspose::Tasks::Resource>)>;
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 used in ResourceUsage view and ResourceSheet view.
37 /// </summary>
38 class ASPOSE_TASKS_SHARED_CLASS ResourceViewColumn final : public Aspose::Tasks::Visualization::ViewColumn
39 {
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 <see cref="ResourceViewColumn"></see> 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">Resource data to column text converter.</param>
65  /// <param name="field">Column field.</param>
66  ASPOSE_TASKS_SHARED_API ResourceViewColumn(const System::String& name, int32_t width, ResourceToColumnTextConverter converter, Aspose::Tasks::Field field);
67  /// <summary>
68  /// Initializes a new instance of the <see cref="ResourceViewColumn"></see> 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">Resource data to column text converter.</param>
73  ASPOSE_TASKS_SHARED_API ResourceViewColumn(const System::String& name, int32_t width, ResourceToColumnTextConverter converter);
74  /// <summary>
75  /// Initializes a new instance of the <see cref="ResourceViewColumn"></see> class.
76  /// </summary>
77  /// <param name="width">Column width in pixels.</param>
78  /// <param name="field">Column field.</param>
79  ASPOSE_TASKS_SHARED_API ResourceViewColumn(int32_t width, Aspose::Tasks::Field field);
80 
81  /// <summary>
82  /// Converts current resource to the column text.
83  /// </summary>
84  /// <param name="resource">Current resource.</param>
85  /// <returns>The column text.</returns>
86  ASPOSE_TASKS_SHARED_API System::String GetColumnText(const System::SharedPtr<Resource>& resource);
87 
88 protected:
89 
90  ASPOSE_TASKS_SHARED_API System::String GetText(System::SharedPtr<System::Object> o) override;
91  #ifdef ASPOSE_GET_SHARED_MEMBERS
92  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
93  #endif
94 
95 
96 private:
97 
98  Aspose::Tasks::Field field;
99 
100  System::String get_DebuggerDisplay();
101 
102  System::Event<System::String(System::SharedPtr<Resource>)> Converter;
103 
104 };
105 
106 } // namespace Visualization
107 } // namespace Tasks
108 } // namespace Aspose
109 
110 
Project's view class used in ResourceUsage view and ResourceSheet view.
Definition: ResourceViewColumn.h:38
Represents a column in a project view.
Definition: ViewColumn.h:64