(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / class / System.Windows.Forms / Gtk / FontDialog.cs
blob149033d0ef9563b3c5c1f63ef1a6e715e2dc24a5
1 //
2 // System.Windows.Forms.FontDialog.cs
3 //
4 // Author:
5 // stubbed out by Daniel Carrera (dcarrera@math.toronto.edu)
6 // Dennis Hayes (dennish@raytek.com)
7 // Implemented by Jordi Mas i Hernàndez (jmas@softcatala.org)
8 //
9 // (C) 2002-2003 Ximian, Inc
11 using System.Drawing;
12 using System.Runtime.InteropServices;
13 namespace System.Windows.Forms
15 public class FontDialog : CommonDialog{
16 private bool bAllowScriptChange;
17 private bool bAllowSimulations;
18 private bool bAllowVectorFonts;
19 private bool bAllowVerticalFonts;
20 private Color color = Color.Black;
21 private bool bFixedPitchOnly;
22 private Font font;
23 private bool bFontMustExist;
24 private int nMaxSize;
25 private int nMinSize;
26 private bool bScriptsOnly;
27 private bool bShowApply;
28 private bool bShowColor;
29 private bool bShowEffects;
30 private bool bShowHelp;
32 protected static readonly object EventApply;
35 // --- Constructor
36 //
37 public FontDialog() {
38 defaultValues();
41 internal void defaultValues(){
42 font = new Font("Microsoft Sans Serif", 8);
43 bAllowScriptChange = true;
44 bAllowSimulations = true;
45 bAllowVectorFonts = true;
46 bAllowVerticalFonts = true;
47 color = Color.Black;
48 bFixedPitchOnly = false;
49 bFontMustExist = false;
50 nMaxSize = 0 ;
51 nMinSize = 0;
52 bScriptsOnly = false;
53 bShowApply = true;
54 bShowColor = false;
55 bShowEffects = true;
56 bShowHelp = false;
60 // --- Public Properties
61 //
62 public bool AllowScriptChange {
63 get { return bAllowScriptChange; }
64 set { bAllowScriptChange = value; }
67 public bool AllowSimulations {
68 get { return bAllowSimulations; }
69 set { bAllowSimulations = value; }
72 public bool AllowVectorFonts {
73 get { return bAllowVectorFonts; }
74 set { bAllowVectorFonts = value; }
77 public bool AllowVerticalFonts{
78 get { return bAllowVerticalFonts; }
79 set { bAllowVerticalFonts = value; }
82 public Color Color {
83 get { return color; }
84 set { color = value; }
87 public bool FixedPitchOnly {
88 get { return bFixedPitchOnly; }
89 set { bFixedPitchOnly = value; }
92 public Font Font {
93 get { return font; }
94 set { font = value; }
97 public bool FontMustExist {
98 get { return bFontMustExist; }
99 set { bFontMustExist = value; }
102 public int MaxSize{
103 get { return nMaxSize; }
104 set { nMaxSize = value; }
107 public int MinSize {
108 get { return nMinSize; }
109 set { nMinSize = value; }
112 public bool ScriptsOnly {
113 get { return bScriptsOnly; }
114 set { bScriptsOnly = value; }
117 public bool ShowApply {
118 get { return bShowApply; }
119 set { bShowApply = value; }
122 public bool ShowColor {
123 get { return bShowColor; }
124 set { bShowColor = value; }
127 public bool ShowEffects{
128 get { return bShowEffects; }
129 set { bShowEffects = value; }
132 public bool ShowHelp {
133 get { return bShowHelp; }
134 set { bShowHelp = value; }
138 // --- Public Methods
139 public override void Reset(){
140 defaultValues();
143 public override string ToString(){
144 return base.ToString();
147 protected virtual void OnApply(EventArgs e){
148 if (Apply != null)
149 Apply (this, e);
152 // --- Public Events
154 [MonoTODO]
155 public event EventHandler Apply;
158 [MonoTODO]
159 protected override bool RunDialog(IntPtr hWndOwner){
160 Dialog.Run();
161 return false;
163 [MonoTODO]
164 internal override Gtk.Dialog CreateDialog(){
165 return new Gtk.FontSelectionDialog("");