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