DrawString implementation
[mono.git] / mcs / class / System.Drawing / System.Drawing.Design / UITypeEditor.cs
1 //
2 // System.Drawing.Design.UITypeEditor.cs
3 // 
4 // Authors:
5 //  Alan Tam Siu Lung <Tam@SiuLung.com>
6 //  Andreas Nahr (ClassDevelopment@A-SoftTech.com)
7 // 
8 // (C) 2003 Alan Tam Siu Lung <Tam@SiuLung.com>
9 // (C) 2003 Andreas Nahr
10 // 
11 using System;
12 using System.ComponentModel;
13 namespace System.Drawing.Design
14 {
15         public class UITypeEditor
16         {
17
18                 public UITypeEditor()
19                 {
20                 }
21
22                 public virtual object EditValue (ITypeDescriptorContext context,
23                         IServiceProvider provider, object value)
24                 {
25                         // We already stated that we can't edit ;)
26                         return value;
27                 }
28                 public object EditValue(IServiceProvider provider, object value)
29                 {
30                         return EditValue (null, provider, value);
31                 }
32                 public virtual UITypeEditorEditStyle GetEditStyle (ITypeDescriptorContext context)
33                 {
34                         return UITypeEditorEditStyle.None;
35                 }
36                 public UITypeEditorEditStyle GetEditStyle ()
37                 {
38                         return GetEditStyle (null);
39                 }
40                 public bool GetPaintValueSupported ()
41                 {
42                         return GetPaintValueSupported (null);
43                 }
44                 public virtual bool GetPaintValueSupported (ITypeDescriptorContext context)
45                 {
46                         return false;
47                 }
48                 public void PaintValue (object value, Graphics canvas, Rectangle rectangle)
49                 {
50                         PaintValue (new PaintValueEventArgs (null, value, canvas, rectangle));
51                 }
52                 public virtual void PaintValue (PaintValueEventArgs e)
53                 {
54                         // LAMESPEC: Did not find info in the docs if this should do something here.
55                         // Usually you would expect, that this class gets inherited and this overridden, 
56                         // but on the other hand the class is not abstract. Could never observe it did paint anything
57                         return;
58                 }
59         }
60 }