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