svn path=/branches/mono-1-1-9/mcs/; revision=50439
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / Cursors.cs
1 // Permission is hereby granted, free of charge, to any person obtaining
2 // a copy of this software and associated documentation files (the
3 // "Software"), to deal in the Software without restriction, including
4 // without limitation the rights to use, copy, modify, merge, publish,
5 // distribute, sublicense, and/or sell copies of the Software, and to
6 // permit persons to whom the Software is furnished to do so, subject to
7 // the following conditions:
8 // 
9 // The above copyright notice and this permission notice shall be
10 // included in all copies or substantial portions of the Software.
11 // 
12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
13 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
16 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
17 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
18 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19 //
20 // Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
21 //
22 // Authors:
23 //      Peter Bartok    pbartok@novell.com
24 //
25 //
26
27 // COMPLETE
28
29 namespace System.Windows.Forms {
30         public sealed class Cursors {
31                 #region Local Variables
32                 internal static Cursor  app_starting;
33                 internal static Cursor  arrow;
34                 internal static Cursor  cross;
35                 internal static Cursor  def;
36                 internal static Cursor  hand;
37                 internal static Cursor  help;
38                 internal static Cursor  hsplit;
39                 internal static Cursor  ibeam;
40                 internal static Cursor  no;
41                 internal static Cursor  no_move_2d;
42                 internal static Cursor  no_move_horiz;
43                 internal static Cursor  no_move_vert;
44                 internal static Cursor  pan_east;
45                 internal static Cursor  pan_ne;
46                 internal static Cursor  pan_north;
47                 internal static Cursor  pan_nw;
48                 internal static Cursor  pan_se;
49                 internal static Cursor  pan_south;
50                 internal static Cursor  pan_sw;
51                 internal static Cursor  pan_west;
52                 internal static Cursor  size_all;
53                 internal static Cursor  size_nesw;
54                 internal static Cursor  size_ns;
55                 internal static Cursor  size_nwse;
56                 internal static Cursor  size_we;
57                 internal static Cursor  up_arrow;
58                 internal static Cursor  vsplit;
59                 internal static Cursor  wait_cursor;
60                 #endregion      // Local Variables
61
62                 #region Constructors
63                 private Cursors() {
64                 }
65                 #endregion      // Constructors
66
67                 #region Public Static Properties
68                 public static Cursor AppStarting {
69                         get {
70                                 if (app_starting == null) {
71                                         app_starting = new Cursor(XplatUI.DefineStdCursor(StdCursor.AppStarting));
72                                         app_starting.name = "AppStarting";
73                                 }
74                                 return app_starting;
75                         }
76                 }
77
78                 public static Cursor Arrow {
79                         get {
80                                 if (arrow == null) {
81                                         arrow = new Cursor(XplatUI.DefineStdCursor(StdCursor.Arrow));
82                                         arrow.name = "Arrow";
83                                 }
84                                 return arrow;
85                         }
86                 }
87
88                 public static Cursor Cross {
89                         get {
90                                 if (cross == null) {
91                                         cross = new Cursor(XplatUI.DefineStdCursor(StdCursor.Cross));
92                                         cross.name = "Cross";
93                                 }
94                                 return cross;
95                         }
96                 }
97
98                 public static Cursor Default {
99                         get {
100                                 if (def == null) {
101                                         def = new Cursor(XplatUI.DefineStdCursor(StdCursor.Default));
102                                         def.name = "Default";
103                                 }
104                                 return def;
105                         }
106                 }
107
108                 public static Cursor Hand {
109                         get {
110                                 if (hand == null) {
111                                         hand = new Cursor(XplatUI.DefineStdCursor(StdCursor.Hand));
112                                         hand.name = "Hand";
113                                 }
114                                 return hand;
115                         }
116                 }
117
118                 public static Cursor Help {
119                         get {
120                                 if (help == null) {
121                                         help = new Cursor(XplatUI.DefineStdCursor(StdCursor.Help));
122                                         help.name = "Help";
123                                 }
124                                 return help;
125                         }
126                 }
127
128                 public static Cursor HSplit {
129                         get {
130                                 if (hsplit == null) {
131                                         hsplit = new Cursor(XplatUI.DefineStdCursor(StdCursor.HSplit));
132                                         hsplit.name = "HSplit";
133                                 }
134                                 return hsplit;
135                         }
136                 }
137
138                 public static Cursor IBeam {
139                         get {
140                                 if (ibeam == null) {
141                                         ibeam = new Cursor(XplatUI.DefineStdCursor(StdCursor.IBeam));
142                                         ibeam.name = "IBeam";
143                                 }
144                                 return ibeam;
145                         }
146                 }
147
148                 public static Cursor No {
149                         get {
150                                 if (no == null) {
151                                         no = new Cursor(XplatUI.DefineStdCursor(StdCursor.No));
152                                         no.name = "No";
153                                 }
154                                 return no;
155                         }
156                 }
157
158                 public static Cursor NoMove2D {
159                         get {
160                                 if (no_move_2d == null) {
161                                         no_move_2d = new Cursor(XplatUI.DefineStdCursor(StdCursor.NoMove2D));
162                                         no_move_2d.name = "NoMove2D";
163                                 }
164                                 return no_move_2d;
165                         }
166                 }
167
168                 public static Cursor NoMoveHoriz {
169                         get {
170                                 if (no_move_horiz == null) {
171                                         no_move_horiz = new Cursor(XplatUI.DefineStdCursor(StdCursor.NoMoveHoriz));
172                                         no_move_horiz.name = "NoMoveHoriz";
173                                 }
174                                 return no_move_horiz;
175                         }
176                 }
177
178                 public static Cursor NoMoveVert {
179                         get {
180                                 if (no_move_vert == null) {
181                                         no_move_vert = new Cursor(XplatUI.DefineStdCursor(StdCursor.NoMoveVert));
182                                         no_move_vert.name = "NoMoveVert";
183                                 }
184                                 return no_move_vert;
185                         }
186                 }
187
188                 public static Cursor PanEast {
189                         get {
190                                 if (pan_east == null) {
191                                         pan_east = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanEast));
192                                         pan_east.name = "PanEast";
193                                 }
194                                 return pan_east;
195                         }
196                 }
197
198
199
200
201                 public static Cursor PanNE {
202                         get {
203                                 if (pan_ne == null) {
204                                         pan_ne = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanNE));
205                                         pan_ne.name = "PanNE";
206                                 }
207                                 return pan_ne;
208                         }
209                 }
210
211
212                 public static Cursor PanNorth {
213                         get {
214                                 if (pan_north == null) {
215                                         pan_north = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanNorth));
216                                         pan_north.name = "PanNorth";
217                                 }
218                                 return pan_north;
219                         }
220                 }
221
222                 public static Cursor PanNW {
223                         get {
224                                 if (pan_nw == null) {
225                                         pan_nw = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanNW));
226                                         pan_nw.name = "PanNW";
227                                 }
228                                 return pan_nw;
229                         }
230                 }
231
232                 public static Cursor PanSE {
233                         get {
234                                 if (pan_se == null) {
235                                         pan_se = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanSE));
236                                         pan_se.name = "PanSE";
237                                 }
238                                 return pan_se;
239                         }
240                 }
241
242                 public static Cursor PanSouth {
243                         get {
244                                 if (pan_south == null) {
245                                         pan_south = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanSouth));
246                                         pan_south.name = "PanSouth";
247                                 }
248                                 return pan_south;
249                         }
250                 }
251
252                 public static Cursor PanSW {
253                         get {
254                                 if (pan_sw == null) {
255                                         pan_sw = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanSW));
256                                         pan_sw.name = "PanSW";
257                                 }
258                                 return pan_sw;
259                         }
260                 }
261
262                 public static Cursor PanWest {
263                         get {
264                                 if (pan_west == null) {
265                                         pan_west = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanWest));
266                                         pan_west.name = "PanWest";
267                                 }
268                                 return pan_west;
269                         }
270                 }
271
272                 public static Cursor SizeAll {
273                         get {
274                                 if (size_all == null) {
275                                         size_all = new Cursor(XplatUI.DefineStdCursor(StdCursor.SizeAll));
276                                         size_all.name = "SizeAll";
277                                 }
278                                 return size_all;
279                         }
280                 }
281
282                 public static Cursor SizeNESW {
283                         get {
284                                 if (size_nesw == null) {
285                                         size_nesw = new Cursor(XplatUI.DefineStdCursor(StdCursor.SizeNESW));
286                                         size_nesw.name = "SizeNESW";
287                                 }
288                                 return size_nesw;
289                         }
290                 }
291
292                 public static Cursor SizeNS {
293                         get {
294                                 if (size_ns == null) {
295                                         size_ns = new Cursor(XplatUI.DefineStdCursor(StdCursor.SizeNS));
296                                         size_ns.name = "SizeNS";
297                                 }
298                                 return size_ns;
299                         }
300                 }
301
302                 public static Cursor SizeNWSE {
303                         get {
304                                 if (size_nwse == null) {
305                                         size_nwse = new Cursor(XplatUI.DefineStdCursor(StdCursor.SizeNWSE));
306                                         size_nwse.name = "SizeNWSE";
307                                 }
308                                 return size_nwse;
309                         }
310                 }
311
312                 public static Cursor SizeWE {
313                         get {
314                                 if (size_we == null) {
315                                         size_we = new Cursor(XplatUI.DefineStdCursor(StdCursor.SizeWE));
316                                         size_we.name = "SizeWE";
317                                 }
318                                 return size_we;
319                         }
320                 }
321
322                 public static Cursor UpArrow {
323                         get {
324                                 if (up_arrow == null) {
325                                         up_arrow = new Cursor(XplatUI.DefineStdCursor(StdCursor.UpArrow));
326                                         up_arrow.name = "UpArrow";
327                                 }
328                                 return up_arrow;
329                         }
330                 }
331
332                 public static Cursor VSplit {
333                         get {
334                                 if (vsplit == null) {
335                                         vsplit = new Cursor(XplatUI.DefineStdCursor(StdCursor.VSplit));
336                                         vsplit.name = "VSplit";
337                                 }
338                                 return vsplit;
339                         }
340                 }
341
342                 public static Cursor WaitCursor {
343                         get {
344                                 if (wait_cursor == null) {
345                                         wait_cursor = new Cursor(XplatUI.DefineStdCursor(StdCursor.WaitCursor));
346                                         wait_cursor.name = "WaitCursor";
347                                 }
348                                 return wait_cursor;
349                         }
350                 }
351                 #endregion      // Public Static Properties
352         }
353 }