New test.
[mono.git] / mcs / class / System.Drawing / System.Drawing.Design / IToolboxService.cs
1 //
2 // System.Drawing.Design.IToolboxService.cs
3 //
4 // Authors:
5 //      Alejandro Sánchez Acosta  <raciel@es.gnu.org>
6 //  Andreas Nahr (ClassDevelopment@A-SoftTech.com)
7 //
8 // (C) Alejandro Sánchez Acosta
9 // (C) 2003 Andreas Nahr
10 // Copyright (C) 2004, 2006 Novell, Inc (http://www.novell.com)
11 //
12 // Permission is hereby granted, free of charge, to any person obtaining
13 // a copy of this software and associated documentation files (the
14 // "Software"), to deal in the Software without restriction, including
15 // without limitation the rights to use, copy, modify, merge, publish,
16 // distribute, sublicense, and/or sell copies of the Software, and to
17 // permit persons to whom the Software is furnished to do so, subject to
18 // the following conditions:
19 // 
20 // The above copyright notice and this permission notice shall be
21 // included in all copies or substantial portions of the Software.
22 // 
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 //
31
32 using System.Collections;
33 using System.ComponentModel.Design;
34 using System.Runtime.InteropServices;
35
36 namespace System.Drawing.Design {
37
38 #if NET_2_0
39         [ComImport]
40 #endif
41         [Guid("4BACD258-DE64-4048-BC4E-FEDBEF9ACB76"),
42         InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
43         public interface IToolboxService
44         {
45                 CategoryNameCollection CategoryNames {get;}
46
47                 string SelectedCategory {get; set;}
48
49                 void AddCreator (ToolboxItemCreatorCallback creator, string format);
50
51                 void AddCreator (ToolboxItemCreatorCallback creator, string format, IDesignerHost host);
52
53                 void AddLinkedToolboxItem (ToolboxItem toolboxItem, IDesignerHost host);
54
55                 void AddLinkedToolboxItem (ToolboxItem toolboxItem, string category, IDesignerHost host);
56
57                 void AddToolboxItem (ToolboxItem toolboxItem, String category);
58
59                 void AddToolboxItem (ToolboxItem toolboxItem);
60
61                 ToolboxItem DeserializeToolboxItem (object serializedObject);
62
63                 ToolboxItem DeserializeToolboxItem (object serializedObject, IDesignerHost host);
64
65                 ToolboxItem GetSelectedToolboxItem ();
66
67                 ToolboxItem GetSelectedToolboxItem (IDesignerHost host);
68
69                 ToolboxItemCollection GetToolboxItems ();
70
71                 ToolboxItemCollection GetToolboxItems (IDesignerHost host);
72
73                 ToolboxItemCollection GetToolboxItems (String category);
74
75                 ToolboxItemCollection GetToolboxItems (String category, IDesignerHost host);
76
77                 bool IsSupported (object serializedObject, ICollection filterAttributes);
78
79                 bool IsSupported (object serializedObject, IDesignerHost host);
80
81                 bool IsToolboxItem (object serializedObject);
82
83                 bool IsToolboxItem (object serializedObject, IDesignerHost host);
84
85                 void Refresh();
86
87                 void RemoveCreator (string format);
88
89                 void RemoveCreator (string format, IDesignerHost host);
90
91                 void RemoveToolboxItem (ToolboxItem toolboxItem);
92
93                 void RemoveToolboxItem (ToolboxItem toolboxItem, string category);
94
95                 void SelectedToolboxItemUsed ();
96
97                 object SerializeToolboxItem (ToolboxItem toolboxItem);
98
99                 bool SetCursor ();
100
101                 void SetSelectedToolboxItem (ToolboxItem toolboxItem);
102         }
103 }