merged Sys.Web.Services 2.0 support in my branch:
[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 #if NET_2_0
30 namespace System.Windows.Forms.VisualStyles
31 {
32         public struct TextMetrics
33         {
34                 #region Private Variables
35                 private int ascent;
36                 private int average_char_width;
37                 private char break_char;
38                 private TextMetricsCharacterSet char_set;
39                 private char default_char;
40                 private int descent;
41                 private int digitized_aspect_x;
42                 private int digitized_aspect_y;
43                 private int external_leading;
44                 private char first_char;
45                 private int height;
46                 private int internal_leading;
47                 private bool italic;
48                 private char last_char;
49                 private int max_char_width;
50                 private int overhang;
51                 private TextMetricsPitchAndFamilyValues pitch_and_family;
52                 private bool struck_out;
53                 private bool underlined;
54                 private int weight;
55                 #endregion
56
57                 #region Public Properties
58                 public int Ascent {
59                         get { return this.ascent; }
60                         set { this.ascent = value; }
61                 }
62
63                 public int AverageCharWidth {
64                         get { return this.average_char_width; }
65                         set { this.average_char_width = value; }
66                 }
67
68                 public char BreakChar {
69                         get { return this.break_char; }
70                         set { this.break_char = value; }
71                 }
72
73                 public TextMetricsCharacterSet CharSet {
74                         get { return this.char_set; }
75                         set { this.char_set = value; }
76                 }
77
78                 public char DefaultChar {
79                         get { return this.default_char; }
80                         set { this.default_char = value; }
81                 }
82
83                 public int Descent {
84                         get { return this.descent; }
85                         set { this.descent = value; }
86                 }
87
88                 public int DigitizedAspectX {
89                         get { return this.digitized_aspect_x; }
90                         set { this.digitized_aspect_x = value; }
91                 }
92
93                 public int DigitizedAspectY {
94                         get { return this.digitized_aspect_y; }
95                         set { this.digitized_aspect_y = value; }
96                 }
97
98                 public int ExternalLeading {
99                         get { return this.external_leading; }
100                         set { this.external_leading = value; }
101                 }
102
103                 public char FirstChar {
104                         get { return this.first_char; }
105                         set { this.first_char = value; }
106                 }
107
108                 public int Height {
109                         get { return this.height; }
110                         set { this.height = value; }
111                 }
112
113                 public int InternalLeading {
114                         get { return this.internal_leading; }
115                         set { this.internal_leading = value; }
116                 }
117
118                 public bool Italic {
119                         get { return this.italic; }
120                         set { this.italic = value; }
121                 }
122
123                 public char LastChar {
124                         get { return this.last_char; }
125                         set { this.last_char = value; }
126                 }
127
128                 public int MaxCharWidth {
129                         get { return this.max_char_width; }
130                         set { this.max_char_width = value; }
131                 }
132
133                 public int Overhang {
134                         get { return this.overhang; }
135                         set { this.overhang = value; }
136                 }
137
138                 public TextMetricsPitchAndFamilyValues PitchAndFamily {
139                         get { return this.pitch_and_family; }
140                         set { this.pitch_and_family = value; }
141                 }
142
143                 public bool StruckOut {
144                         get { return this.struck_out; }
145                         set { this.struck_out = value; }
146                 }
147
148                 public bool Underlined {
149                         get { return this.underlined; }
150                         set { this.underlined = value; }
151                 }
152
153                 public int Weight {
154                         get { return this.weight; }
155                         set { this.weight = value; }
156                 }
157                 #endregion
158         }
159 }
160 #endif