HorizontalRuleFormat.h
1 //////////////////////////////////////////////////////////////////////////
2 // Copyright 2001-2020 Aspose Pty Ltd. All Rights Reserved.
3 //
4 // This file is part of Aspose.Words. The source code in this file
5 // is only intended as a supplement to the documentation, and is provided
6 // "as is", without warranty of any kind, either expressed or implied.
7 //////////////////////////////////////////////////////////////////////////
8 #pragma once
9 
10 
11 #include <system/shared_ptr.h>
12 #include <system/object.h>
13 #include <drawing/color.h>
14 
15 #include "Aspose.Words.Cpp/Model/Drawing/HorizontalRuleAlignment.h"
16 #include "Aspose.Words.Cpp/aspose_words_api_defs.h"
17 
18 namespace Aspose { namespace Words { namespace Drawing { class Shape; } } }
19 
20 namespace Aspose {
21 
22 namespace Words {
23 
24 namespace Drawing {
25 
26 
27 /// <summary>
28 /// Represents horizontal rule formatting.
29 /// </summary>
30 ///
31 class HorizontalRuleFormat : public System::Object
32 {
33  typedef HorizontalRuleFormat ThisType;
34  typedef System::Object BaseType;
35 
36  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
37  ASPOSE_WORDS_SHARED_RTTI_INFO_DECL();
38 
40  friend class Aspose::Words::Drawing::Shape;
41 
42 public:
43 
44  /// <summary>
45  /// Gets or sets the length of the specified horizontal rule expressed as a percentage of the window width.
46  /// </summary>
47  /// <remarks>
48  /// <p>Valid values ??range from 1 to 100 inclusive.</p>
49  /// <p>The default value is 100.</p>
50  /// </remarks>
51  /// <exception cref="T:System.ArgumentOutOfRangeException">
52  /// Throws when argument was out of the range of valid values.
53  /// </exception>
54  ASPOSE_WORDS_SHARED_API double get_WidthPercent();
55  /// Setter for Aspose::Words::Drawing::HorizontalRuleFormat::get_WidthPercent
56  ASPOSE_WORDS_SHARED_API void set_WidthPercent(double value);
57  /// <summary>
58  /// Gets or sets the height of the horizontal rule.
59  /// </summary>
60  /// <remarks>
61  /// <p>This is a shortcut to the <see cref="Aspose::Words::Drawing::ShapeBase::get_Height" /> property.</p>
62  /// <p>Valid values ??range from 0 to 1584 inclusive.</p>
63  /// <p>The default value is 1.5.</p>
64  /// </remarks>
65  /// <exception cref="T:System.ArgumentOutOfRangeException">
66  /// Throws when argument was out of the range of valid values.
67  /// </exception>
68  ASPOSE_WORDS_SHARED_API double get_Height();
69  /// Setter for Aspose::Words::Drawing::HorizontalRuleFormat::get_Height
70  ASPOSE_WORDS_SHARED_API void set_Height(double value);
71  /// <summary>
72  /// Indicates the presence of 3D shading for the horizontal rule.
73  /// If true, then the horizontal rule is without 3D shading and solid color is used.
74  /// </summary>
75  /// <remarks>
76  /// <p>The default value is false.</p>
77  /// </remarks>
78  ASPOSE_WORDS_SHARED_API bool get_NoShade();
79  /// Setter for Aspose::Words::Drawing::HorizontalRuleFormat::get_NoShade
80  ASPOSE_WORDS_SHARED_API void set_NoShade(bool value);
81  /// <summary>
82  /// Gets or sets the brush color that fills the horizontal rule.
83  /// </summary>
84  /// <remarks>
85  /// <p>This is a shortcut to the <see cref="Aspose::Words::Drawing::Fill::get_Color" /> property.</p>
86  /// <p>The default value is
87  /// <see cref="System::Drawing::Color::get_Gray" />.
88  ///
89  /// </p>
90  /// </remarks>
91  ASPOSE_WORDS_SHARED_API System::Drawing::Color get_Color();
92  /// Setter for Aspose::Words::Drawing::HorizontalRuleFormat::get_Color
93  ASPOSE_WORDS_SHARED_API void set_Color(System::Drawing::Color value);
94  /// <summary>
95  /// Gets or sets the alignment of the horizontal rule.
96  /// </summary>
97  /// <remarks>
98  /// <p>The default value is <see cref="Aspose::Words::Drawing::HorizontalRuleAlignment::Left" />.</p>
99  /// </remarks>
100  ASPOSE_WORDS_SHARED_API Aspose::Words::Drawing::HorizontalRuleAlignment get_Alignment();
101  /// Setter for Aspose::Words::Drawing::HorizontalRuleFormat::get_Alignment
102  ASPOSE_WORDS_SHARED_API void set_Alignment(Aspose::Words::Drawing::HorizontalRuleAlignment value);
103 
104 protected:
105 
106  HorizontalRuleFormat(System::SharedPtr<Aspose::Words::Drawing::Shape> shape);
107 
108  ASPOSE_WORDS_SHARED_API System::Object::shared_members_type GetSharedMembers() override;
109 
110 private:
111 
112  System::SharedPtr<Aspose::Words::Drawing::Shape> mShape;
113 
114  void SetWidthPercentInternal(double value);
115  void SetHeightInternal(double value);
116 
117 };
118 
119 }
120 }
121 }
Definition: IFontData.h:20
@ InsertLineBreaks
Insert line breaks after every 76th character.
Definition: Border.h:65
#define FRIEND_FUNCTION_System_MakeObject
Macro to befriend MakeObject function.
Definition: smart_ptr.h:1366