Aspose.Tasks for C++
TableTextStyle.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="TableTextStyle.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2024 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/enum_helpers.h>
9 #include <cstdint>
10 
11 #include "aspose.tasks.cpp/Visualization/View/Styles/TextStyle.h"
12 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
13 
14 namespace Aspose
15 {
16 namespace Tasks
17 {
18 enum class Field;
19 namespace IO
20 {
21 namespace MSProject
22 {
23 class MPP12GanttChartWriter;
24 class MPP14GanttChartWriter;
25 class MPPGanttChartWriter;
26 } // namespace MSProject
27 } // namespace IO
28 namespace Visualization
29 {
30 class ApsTextStyleManager;
31 class FontDescriptor;
32 enum class FontStyles;
33 enum class TextItemType;
34 } // namespace Visualization
35 } // namespace Tasks
36 } // namespace Aspose
37 
38 namespace Aspose {
39 
40 namespace Tasks {
41 
42 namespace Visualization {
43 
44 /// <summary>
45 /// Represents a text style in a view table.
46 /// </summary>
47 class ASPOSE_TASKS_SHARED_CLASS TableTextStyle : public Aspose::Tasks::Visualization::TextStyle
48 {
49  typedef TableTextStyle ThisType;
51 
52  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
53  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
54 
55  friend class Aspose::Tasks::IO::MSProject::MPP12GanttChartWriter;
56  friend class Aspose::Tasks::IO::MSProject::MPP14GanttChartWriter;
57  friend class Aspose::Tasks::IO::MSProject::MPPGanttChartWriter;
58  friend class Aspose::Tasks::Visualization::ApsTextStyleManager;
59 
60 public:
61 
62  /// <summary>
63  /// Gets a row unique id.
64  /// <remarks>Return -1 if the style is to be applied to all rows of a view.</remarks>
65  /// </summary>
66  ASPOSE_TASKS_SHARED_API int32_t get_RowUid() const;
67  /// <summary>
68  /// Gets a field the style is to be applied to.
69  /// <see cref="Field"></see>.
70  /// </summary>
71  ASPOSE_TASKS_SHARED_API Aspose::Tasks::Field get_Field() const;
72  /// <summary>
73  /// Sets a field the style is to be applied to.
74  /// <see cref="Field"></see>.
75  /// </summary>
76  ASPOSE_TASKS_SHARED_API void set_Field(Aspose::Tasks::Field value);
77  /// <inheritdoc ></inheritdoc>
78  /// <summary>
79  /// Returns a value of the <see cref="Aspose::Tasks::Visualization::TextItemType"></see> enum.
80  /// </summary>
81  ASPOSE_TASKS_SHARED_API TextItemType get_ItemType() override;
82 
83  /// <summary>
84  /// Initializes a new instance of the <see cref="TableTextStyle"></see> class.
85  /// </summary>
86  /// <param name="rowUid">A specified row unique id.</param>
87  ASPOSE_TASKS_SHARED_API TableTextStyle(int32_t rowUid);
88  /// <summary>
89  /// Initializes a new instance of the <see cref="TableTextStyle"></see> class with the specified font.
90  /// </summary>
91  /// <param name="rowUid">A specified row unique id.</param>
92  /// <param name="font">A font on which a text style is based on.</param>
93  ASPOSE_TASKS_SHARED_API TableTextStyle(int32_t rowUid, const System::SharedPtr<FontDescriptor>& font);
94  /// <summary>
95  /// Initializes a new instance of the <see cref="TableTextStyle"></see> class with the specified font size and font style.
96  /// </summary>
97  /// <param name="rowUid">A specified row unique id.</param>
98  /// <param name="fontSize">Size of a font on which a text style is based on.</param>
99  /// /// <param name="fontStyle">Style of a font on which a text style is based on.</param>
100  ASPOSE_TASKS_SHARED_API TableTextStyle(int32_t rowUid, float fontSize, FontStyles fontStyle);
101  /// <summary>
102  /// Initializes a new instance of the <see cref="TableTextStyle"></see> class with the default font settings and the specified font style.
103  /// </summary>
104  /// <param name="rowUid">A specified row unique id.</param>
105  /// /// <param name="fontStyle">Style of a font on which a text style is based on.</param>
106  ASPOSE_TASKS_SHARED_API TableTextStyle(int32_t rowUid, FontStyles fontStyle);
107 
108 protected:
109 
110  /// <summary>
111  /// Gets a row unique id.
112  /// <remarks>Return -1 if the style is to be applied to all rows of a view.</remarks>
113  /// </summary>
114  ASPOSE_TASKS_SHARED_API void set_RowUid(int32_t value);
115 
116  ASPOSE_TASKS_SHARED_API System::SharedPtr<TableTextStyle> Clone(const System::SharedPtr<FontDescriptor>& fontDescriptor);
117  #ifdef ASPOSE_GET_SHARED_MEMBERS
118  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
119  #endif
120 
121 
122 private:
123 
124  int32_t pr_RowUid;
125  Aspose::Tasks::Field pr_Field;
126 
127 };
128 
129 } // namespace Visualization
130 } // namespace Tasks
131 } // namespace Aspose
132 
133 
Represents a text style in a view table.
Definition: TableTextStyle.h:47
Change the visual style of the text for an item in the project view.
Definition: TextStyle.h:86