more implementation added
[mono.git] / mcs / class / System.Windows.Forms / System.Windows.Forms / CommonDialog.cs
1 //
2 // System.Windows.Forms.CommonDialog.cs
3 //
4 // Author:
5 //   stubbed out by Jaak Simm (jaaksimm@firm.ee)
6 //   Dennis Hayes (dennish@Raytek.com)
7 //
8 // (C) Ximian, Inc., 2002
9 //
10
11 using System.ComponentModel;
12
13 namespace System.Windows.Forms {
14
15         /// <summary>
16         /// Specifies the base class used for displaying dialog boxes on the screen.
17         /// </summary>
18
19         [MonoTODO]
20         public abstract class CommonDialog : Component {
21
22                 // private fields
23                 
24                 /// --- constructor ---
25                 [MonoTODO]
26                 public CommonDialog() : base () 
27                 {
28                 }
29                 
30                 /// --- Methods ---
31                 [MonoTODO]
32                 protected virtual IntPtr HookProc(IntPtr hWnd,int msg,IntPtr wparam,IntPtr lparam) 
33                 {
34                         // FIXME: center window in response to WM_INITDIALOG message
35                         return IntPtr.Zero;
36                 }
37                 
38                 // event methods
39                 [MonoTODO]
40                 protected virtual void OnHelpRequest(EventArgs e) 
41                 {
42                         //FIXME:
43                 }
44                 // end of event methods
45                 
46                 [MonoTODO]
47                 protected virtual IntPtr OwnerWndProc(IntPtr hWnd,int msg,IntPtr wparam,IntPtr lparam) 
48                 {
49                         throw new NotImplementedException ();
50                 }
51                 
52                 public abstract void Reset();
53                 
54                 protected abstract bool RunDialog(IntPtr hwndOwner);
55                 
56                 [MonoTODO]
57                 public DialogResult ShowDialog() 
58                 {
59                         bool res = RunDialog ( Control.getOwnerWindow ( null ).Handle );
60                         return res ? DialogResult.OK : DialogResult.Cancel;
61                 }
62                 
63                 [MonoTODO]
64                 public DialogResult ShowDialog(IWin32Window owner) 
65                 {
66                         bool res = RunDialog ( owner.Handle );
67                         return res ? DialogResult.OK : DialogResult.Cancel;
68                 }
69                 
70                 /// events
71                 [MonoTODO]
72                 public event EventHandler HelpRequest;
73         }
74 }