Aspose.Tasks for C++
HtmlSaveOptions.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="HtmlSaveOptions.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/enum_helpers.h>
10 #include <cstdint>
11 
12 #include "aspose.tasks.cpp/Saving/ICloneableSaveOptions.h"
13 #include "aspose.tasks.cpp/Saving/SaveOptions.h"
14 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
15 
16 namespace Aspose
17 {
18 namespace Builder
19 {
20 namespace HTML
21 {
22 namespace Builders
23 {
24 class HtmlBuilderOptions;
25 } // namespace Builders
26 class Html5BuilderOptions;
27 } // namespace HTML
28 } // namespace Builder
29 namespace Tasks
30 {
31 enum class FontFaceType;
32 class FontSettings;
33 class ICssSavingCallback;
34 class IFontSavingCallback;
35 class IImageSavingCallback;
36 class IWriter;
37 enum class ResourceExportType;
38 namespace Saving
39 {
40 class HtmlWriter;
41 class IPageSavingCallback;
42 class SaveOptions;
43 } // namespace Saving
44 } // namespace Tasks
45 } // namespace Aspose
46 namespace System
47 {
48 namespace Collections
49 {
50 namespace Generic
51 {
52 template <typename> class List;
53 } // namespace Generic
54 } // namespace Collections
55 } // namespace System
56 
57 namespace Aspose {
58 
59 namespace Tasks {
60 
61 namespace Saving {
62 
63 /// <summary>
64 /// Allows to specify additional options when rendering project pages to HTML.
65 /// </summary>
66 class ASPOSE_TASKS_SHARED_CLASS HtmlSaveOptions : public Aspose::Tasks::Saving::SaveOptions, public Aspose::Tasks::Saving::SaveOptions::IReduceBottomGap, public Aspose::Tasks::Saving::SaveOptions::IFontCallbacks, public Aspose::Tasks::Saving::ICloneableSaveOptions
67 {
68  typedef HtmlSaveOptions ThisType;
70  typedef Aspose::Tasks::Saving::SaveOptions::IReduceBottomGap BaseType1;
71  typedef Aspose::Tasks::Saving::SaveOptions::IFontCallbacks BaseType2;
72  typedef Aspose::Tasks::Saving::ICloneableSaveOptions BaseType3;
73 
74  typedef ::System::BaseTypesInfo<BaseType, BaseType1, BaseType2, BaseType3> ThisTypeBaseTypesInfo;
75  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
76 
77  friend class Aspose::Tasks::Saving::HtmlWriter;
78 
79 public:
80 
81  /// <summary>
82  /// Gets CSS style prefix.
83  /// </summary>
84  ASPOSE_TASKS_SHARED_API System::String get_CssStylePrefix() const;
85  /// <summary>
86  /// Sets CSS style prefix.
87  /// </summary>
88  ASPOSE_TASKS_SHARED_API void set_CssStylePrefix(const System::String& value);
89  /// <summary>
90  /// Specifies font settings used when rendering project's view.
91  /// </summary>
92  ASPOSE_TASKS_SHARED_API System::SharedPtr<Aspose::Tasks::FontSettings> get_FontSettings() override;
93  /// <summary>
94  /// Gets a value indicating whether a gap between last task and the footer must be reduced.
95  /// </summary>
96  ASPOSE_TASKS_SHARED_API bool get_ReduceFooterGap() override;
97  /// <summary>
98  /// Sets a value indicating whether a gap between last task and the footer must be reduced.
99  /// </summary>
100  ASPOSE_TASKS_SHARED_API void set_ReduceFooterGap(bool value);
101  /// <summary>
102  /// Gets a value indicating whether to include project name in HTML page header.
103  /// </summary>
104  ASPOSE_TASKS_SHARED_API bool get_IncludeProjectNameInPageHeader() const;
105  /// <summary>
106  /// Sets a value indicating whether to include project name in HTML page header.
107  /// </summary>
108  ASPOSE_TASKS_SHARED_API void set_IncludeProjectNameInPageHeader(bool value);
109  /// <summary>
110  /// Gets a value indicating whether to include project name in HTML title.
111  /// </summary>
112  ASPOSE_TASKS_SHARED_API bool get_IncludeProjectNameInTitle() const;
113  /// <summary>
114  /// Sets a value indicating whether to include project name in HTML title.
115  /// </summary>
116  ASPOSE_TASKS_SHARED_API void set_IncludeProjectNameInTitle(bool value);
117  /// <summary>
118  /// Gets a list of page numbers to save when rendering project layout.
119  /// <remarks>All project pages will be saved if this list is empty.</remarks>
120  /// </summary>
121  ASPOSE_TASKS_SHARED_API System::SharedPtr<System::Collections::Generic::List<int32_t>> get_Pages();
122  /// <summary>
123  /// Sets a list of page numbers to save when rendering project layout.
124  /// <remarks>All project pages will be saved if this list is empty.</remarks>
125  /// </summary>
126  ASPOSE_TASKS_SHARED_API void set_Pages(const System::SharedPtr<System::Collections::Generic::List<int32_t>>& value);
127  /// <summary>
128  /// Gets the way CSS are exported.
129  /// </summary>
130  ASPOSE_TASKS_SHARED_API ResourceExportType get_ExportCss() const;
131  /// <summary>
132  /// Sets the way CSS are exported.
133  /// </summary>
134  ASPOSE_TASKS_SHARED_API void set_ExportCss(ResourceExportType value);
135  /// <summary>
136  /// Gets the way images are exported.
137  /// </summary>
138  ASPOSE_TASKS_SHARED_API ResourceExportType get_ExportImages() const;
139  /// <summary>
140  /// Sets the way images are exported.
141  /// </summary>
142  ASPOSE_TASKS_SHARED_API void set_ExportImages(ResourceExportType value);
143  /// <summary>
144  /// Gets the way fonts are exported.
145  /// </summary>
146  ASPOSE_TASKS_SHARED_API ResourceExportType get_ExportFonts() const;
147  /// <summary>
148  /// Sets the way fonts are exported.
149  /// </summary>
150  ASPOSE_TASKS_SHARED_API void set_ExportFonts(ResourceExportType value);
151  /// <summary>
152  /// Gets the callback that is called to create resource to store CSS.
153  /// </summary>
154  ASPOSE_TASKS_SHARED_API const System::SharedPtr<ICssSavingCallback>& get_CssSavingCallback() const;
155  /// <summary>
156  /// Sets the callback that is called to create resource to store CSS.
157  /// </summary>
158  ASPOSE_TASKS_SHARED_API void set_CssSavingCallback(const System::SharedPtr<ICssSavingCallback>& value);
159  /// <summary>
160  /// Gets the callback that is called to create resource to store font.
161  /// </summary>
162  ASPOSE_TASKS_SHARED_API const System::SharedPtr<IFontSavingCallback>& get_FontSavingCallback() const;
163  /// <summary>
164  /// Sets the callback that is called to create resource to store font.
165  /// </summary>
166  ASPOSE_TASKS_SHARED_API void set_FontSavingCallback(const System::SharedPtr<IFontSavingCallback>& value);
167  /// <summary>
168  /// Gets the callback that is called to create resource to store font.
169  /// </summary>
170  ASPOSE_TASKS_SHARED_API const System::SharedPtr<IImageSavingCallback>& get_ImageSavingCallback() const;
171  /// <summary>
172  /// Sets the callback that is called to create resource to store font.
173  /// </summary>
174  ASPOSE_TASKS_SHARED_API void set_ImageSavingCallback(const System::SharedPtr<IImageSavingCallback>& value);
175  /// <summary>
176  /// Gets the font face types.
177  /// </summary>
178  /// <value>
179  /// The font face types.
180  /// </value>
181  ASPOSE_TASKS_SHARED_API FontFaceType get_FontFaceTypes() const;
182  /// <summary>
183  /// Sets the font face types.
184  /// </summary>
185  /// <value>
186  /// The font face types.
187  /// </value>
188  ASPOSE_TASKS_SHARED_API void set_FontFaceTypes(FontFaceType value);
189  /// <summary>
190  /// Gets a value indicating whether to use gradient brush when rendering project layout.
191  /// <remarks>Currently using of gradient brush is not supported when rendering to HTML.</remarks>
192  /// </summary>
193  ASPOSE_TASKS_SHARED_API bool get_UseGradientBrush() override;
194  /// <summary>
195  /// Sets a value indicating whether to use gradient brush when rendering project layout.
196  /// <remarks>Currently using of gradient brush is not supported when rendering to HTML.</remarks>
197  /// </summary>
198  ASPOSE_TASKS_SHARED_API void set_UseGradientBrush(bool value) override;
199  /// <summary>
200  /// Gets a user-defined callback which is used to get an output stream for each rendered page.
201  /// </summary>
202  ASPOSE_TASKS_SHARED_API const System::SharedPtr<IPageSavingCallback>& get_PageSavingCallback() const;
203  /// <summary>
204  /// Sets a user-defined callback which is used to get an output stream for each rendered page.
205  /// </summary>
206  ASPOSE_TASKS_SHARED_API void set_PageSavingCallback(const System::SharedPtr<IPageSavingCallback>& value);
207 
208  /// <summary>
209  /// Initializes a new instance of the <see cref="HtmlSaveOptions"></see> class.
210  /// </summary>
211  ASPOSE_TASKS_SHARED_API HtmlSaveOptions();
212 
213 protected:
214 
215  ASPOSE_TASKS_SHARED_API System::SharedPtr<IWriter> GetWriter() override;
216  ASPOSE_TASKS_SHARED_API System::SharedPtr<Builder::HTML::Html5BuilderOptions> GetHtmlConverterOptions();
217 
218  virtual ASPOSE_TASKS_SHARED_API ~HtmlSaveOptions();
219 
220  #ifdef ASPOSE_GET_SHARED_MEMBERS
221  ASPOSE_TASKS_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
222  #endif
223 
224 
225 private:
226 
227  System::SharedPtr<System::Collections::Generic::List<int32_t>> pages;
228  System::String pr_CssStylePrefix;
229  System::SharedPtr<Aspose::Tasks::FontSettings> pr_FontSettings;
230 
231  /// <summary>
232  /// Specifies font settings used when rendering project's view.
233  /// </summary>
234  ASPOSE_TASKS_SHARED_API void set_FontSettings(const System::SharedPtr<Aspose::Tasks::FontSettings>& value);
235 
236  bool pr_ReduceFooterGap;
237  bool pr_IncludeProjectNameInPageHeader;
238  bool pr_IncludeProjectNameInTitle;
239  ResourceExportType pr_ExportCss;
240  ResourceExportType pr_ExportImages;
241  ResourceExportType pr_ExportFonts;
242  System::SharedPtr<ICssSavingCallback> pr_CssSavingCallback;
243  System::SharedPtr<IFontSavingCallback> pr_FontSavingCallback;
244  System::SharedPtr<IImageSavingCallback> pr_ImageSavingCallback;
245  FontFaceType pr_FontFaceTypes;
246  System::SharedPtr<IPageSavingCallback> pr_PageSavingCallback;
247 
248  HtmlSaveOptions(const System::SharedPtr<HtmlSaveOptions>& options);
249 
250  MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(HtmlSaveOptions, CODEPORTING_ARGS(const System::SharedPtr<HtmlSaveOptions>& options));
251  System::SharedPtr<SaveOptions> Clone() override;
252  void CopyOutputPropertiesFrom(System::SharedPtr<SaveOptions> source) override;
253  void SetCallbacks(const System::SharedPtr<Builder::HTML::Builders::HtmlBuilderOptions>& converterOptions);
254 
255 };
256 
257 } // namespace Saving
258 } // namespace Tasks
259 } // namespace Aspose
260 
261 
Allows to specify additional options when rendering project pages to HTML.
Definition: HtmlSaveOptions.h:67
System::String get_CssStylePrefix() const
Gets CSS style prefix.
void set_ImageSavingCallback(const System::SharedPtr< IImageSavingCallback > &value)
Sets the callback that is called to create resource to store font.
void set_ExportCss(ResourceExportType value)
Sets the way CSS are exported.
void set_CssSavingCallback(const System::SharedPtr< ICssSavingCallback > &value)
Sets the callback that is called to create resource to store CSS.
HtmlSaveOptions()
Initializes a new instance of the HtmlSaveOptions class.
const System::SharedPtr< IImageSavingCallback > & get_ImageSavingCallback() const
Gets the callback that is called to create resource to store font.
FontFaceType get_FontFaceTypes() const
Gets the font face types.
void set_Pages(const System::SharedPtr< System::Collections::Generic::List< int32_t >> &value)
Sets a list of page numbers to save when rendering project layout.
ResourceExportType get_ExportFonts() const
Gets the way fonts are exported.
void set_CssStylePrefix(const System::String &value)
Sets CSS style prefix.
void set_FontSavingCallback(const System::SharedPtr< IFontSavingCallback > &value)
Sets the callback that is called to create resource to store font.
void set_PageSavingCallback(const System::SharedPtr< IPageSavingCallback > &value)
Sets a user-defined callback which is used to get an output stream for each rendered page.
const System::SharedPtr< ICssSavingCallback > & get_CssSavingCallback() const
Gets the callback that is called to create resource to store CSS.
bool get_UseGradientBrush() override
Gets a value indicating whether to use gradient brush when rendering project layout.
ResourceExportType get_ExportCss() const
Gets the way CSS are exported.
void set_ExportFonts(ResourceExportType value)
Sets the way fonts are exported.
void set_IncludeProjectNameInPageHeader(bool value)
Sets a value indicating whether to include project name in HTML page header.
System::SharedPtr< Aspose::Tasks::FontSettings > get_FontSettings() override
Specifies font settings used when rendering project's view.
bool get_IncludeProjectNameInPageHeader() const
Gets a value indicating whether to include project name in HTML page header.
void set_FontFaceTypes(FontFaceType value)
Sets the font face types.
bool get_ReduceFooterGap() override
Gets a value indicating whether a gap between last task and the footer must be reduced.
System::SharedPtr< System::Collections::Generic::List< int32_t > > get_Pages()
Gets a list of page numbers to save when rendering project layout.
const System::SharedPtr< IPageSavingCallback > & get_PageSavingCallback() const
Gets a user-defined callback which is used to get an output stream for each rendered page.
ResourceExportType get_ExportImages() const
Gets the way images are exported.
bool get_IncludeProjectNameInTitle() const
Gets a value indicating whether to include project name in HTML title.
const System::SharedPtr< IFontSavingCallback > & get_FontSavingCallback() const
Gets the callback that is called to create resource to store font.
void set_ExportImages(ResourceExportType value)
Sets the way images are exported.
void set_UseGradientBrush(bool value) override
Sets a value indicating whether to use gradient brush when rendering project layout.
void set_IncludeProjectNameInTitle(bool value)
Sets a value indicating whether to include project name in HTML title.
void set_ReduceFooterGap(bool value)
Sets a value indicating whether a gap between last task and the footer must be reduced.
This is an abstract base class for classes that allow the user to specify additional options when sav...
Definition: SaveOptions.h:95
Definition: Asn.h:13