New tests.
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms.VisualStyles / TextMetrics.cs
1 //
2 // TextMetrics.cs
3 //
4 // Permission is hereby granted, free of charge, to any person obtaining
5 // a copy of this software and associated documentation files (the
6 // "Software"), to deal in the Software without restriction, including
7 // without limitation the rights to use, copy, modify, merge, publish,
8 // distribute, sublicense, and/or sell copies of the Software, and to
9 // permit persons to whom the Software is furnished to do so, subject to
10 // the following conditions:
11 // 
12 // The above copyright notice and this permission notice shall be
13 // included in all copies or substantial portions of the Software.
14 // 
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 //
23 // Copyright (c) 2006 Novell, Inc.
24 //
25 // Authors:
26 //      Jonathan Pobst (monkey@jpobst.com)
27 //
28
29 namespace System.Windows.Forms.VisualStyles
30 {
31 #if NET_2_0
32         public
33 #endif
34         struct TextMetrics
35         {
36                 #region Private Variables
37                 private int ascent;
38                 private int average_char_width;
39                 private char break_char;
40                 private TextMetricsCharacterSet char_set;
41                 private char default_char;
42                 private int descent;
43                 private int digitized_aspect_x;
44                 private int digitized_aspect_y;
45                 private int external_leading;
46                 private char first_char;
47                 private int height;
48                 private int internal_leading;
49                 private bool italic;
50                 private char last_char;
51                 private int max_char_width;
52                 private int overhang;
53                 private TextMetricsPitchAndFamilyValues pitch_and_family;
54                 private bool struck_out;
55                 private bool underlined;
56                 private int weight;
57                 #endregion
58
59                 #region Public Properties
60                 public int Ascent {
61                         get { return this.ascent; }
62                         set { this.ascent = value; }
63                 }
64
65                 public int AverageCharWidth {
66                         get { return this.average_char_width; }
67                         set { this.average_char_width = value; }
68                 }
69
70                 public char BreakChar {
71                         get { return this.break_char; }
72                         set { this.break_char = value; }
73                 }
74
75                 public TextMetricsCharacterSet CharSet {
76                         get { return this.char_set; }
77                         set { this.char_set = value; }
78                 }
79
80                 public char DefaultChar {
81                         get { return this.default_char; }
82                         set { this.default_char = value; }
83                 }
84
85                 public int Descent {
86                         get { return this.descent; }
87                         set { this.descent = value; }
88                 }
89
90                 public int DigitizedAspectX {
91                         get { return this.digitized_aspect_x; }
92                         set { this.digitized_aspect_x = value; }
93                 }
94
95                 public int DigitizedAspectY {
96                         get { return this.digitized_aspect_y; }
97                         set { this.digitized_aspect_y = value; }
98                 }
99
100                 public int ExternalLeading {
101                         get { return this.external_leading; }
102                         set { this.external_leading = value; }
103                 }
104
105                 public char FirstChar {
106                         get { return this.first_char; }
107                         set { this.first_char = value; }
108                 }
109
110                 public int Height {
111                         get { return this.height; }
112                         set { this.height = value; }
113                 }
114
115                 public int InternalLeading {
116                         get { return this.internal_leading; }
117                         set { this.internal_leading = value; }
118                 }
119
120                 public bool Italic {
121                         get { return this.italic; }
122                         set { this.italic = value; }
123                 }
124
125                 public char LastChar {
126                         get { return this.last_char; }
127                         set { this.last_char = value; }
128                 }
129
130                 public int MaxCharWidth {
131                         get { return this.max_char_width; }
132                         set { this.max_char_width = value; }
133                 }
134
135                 public int Overhang {
136                         get { return this.overhang; }
137                         set { this.overhang = value; }
138                 }
139
140                 public TextMetricsPitchAndFamilyValues PitchAndFamily {
141                         get { return this.pitch_and_family; }
142                         set { this.pitch_and_family = value; }
143                 }
144
145                 public bool StruckOut {
146                         get { return this.struck_out; }
147                         set { this.struck_out = value; }
148                 }
149
150                 public bool Underlined {
151                         get { return this.underlined; }
152                         set { this.underlined = value; }
153                 }
154
155                 public int Weight {
156                         get { return this.weight; }
157                         set { this.weight = value; }
158                 }
159                 #endregion
160         }
161 }