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
12 // The above copyright notice and this permission notice shall be
\r
13 // included in all copies or substantial portions of the Software.
\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
23 // Copyright (c) 2006 Novell, Inc.
\r
26 // Jonathan Pobst (monkey@jpobst.com)
\r
30 namespace System.Windows.Forms.VisualStyles
\r
32 public struct TextMetrics
\r
34 #region Private Variables
\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
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
57 #region Public Properties
\r
59 get { return this.ascent; }
\r
60 set { this.ascent = value; }
\r
63 public int AverageCharWidth {
\r
64 get { return this.average_char_width; }
\r
65 set { this.average_char_width = value; }
\r
68 public char BreakChar {
\r
69 get { return this.break_char; }
\r
70 set { this.break_char = value; }
\r
73 public TextMetricsCharacterSet CharSet {
\r
74 get { return this.char_set; }
\r
75 set { this.char_set = value; }
\r
78 public char DefaultChar {
\r
79 get { return this.default_char; }
\r
80 set { this.default_char = value; }
\r
83 public int Descent {
\r
84 get { return this.descent; }
\r
85 set { this.descent = value; }
\r
88 public int DigitizedAspectX {
\r
89 get { return this.digitized_aspect_x; }
\r
90 set { this.digitized_aspect_x = value; }
\r
93 public int DigitizedAspectY {
\r
94 get { return this.digitized_aspect_y; }
\r
95 set { this.digitized_aspect_y = value; }
\r
98 public int ExternalLeading {
\r
99 get { return this.external_leading; }
\r
100 set { this.external_leading = value; }
\r
103 public char FirstChar {
\r
104 get { return this.first_char; }
\r
105 set { this.first_char = value; }
\r
108 public int Height {
\r
109 get { return this.height; }
\r
110 set { this.height = value; }
\r
113 public int InternalLeading {
\r
114 get { return this.internal_leading; }
\r
115 set { this.internal_leading = value; }
\r
118 public bool Italic {
\r
119 get { return this.italic; }
\r
120 set { this.italic = value; }
\r
123 public char LastChar {
\r
124 get { return this.last_char; }
\r
125 set { this.last_char = value; }
\r
128 public int MaxCharWidth {
\r
129 get { return this.max_char_width; }
\r
130 set { this.max_char_width = value; }
\r
133 public int Overhang {
\r
134 get { return this.overhang; }
\r
135 set { this.overhang = value; }
\r
138 public TextMetricsPitchAndFamilyValues PitchAndFamily {
\r
139 get { return this.pitch_and_family; }
\r
140 set { this.pitch_and_family = value; }
\r
143 public bool StruckOut {
\r
144 get { return this.struck_out; }
\r
145 set { this.struck_out = value; }
\r
148 public bool Underlined {
\r
149 get { return this.underlined; }
\r
150 set { this.underlined = value; }
\r
153 public int Weight {
\r
154 get { return this.weight; }
\r
155 set { this.weight = value; }
\r