2005-01-31 Zoltan Varga <vargaz@freemail.hu>
[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                                 }
73                                 return app_starting;
74                         }
75                 }
76
77                 public static Cursor Arrow {
78                         get {
79                                 if (arrow == null) {
80                                         arrow = new Cursor(XplatUI.DefineStdCursor(StdCursor.Arrow));
81                                 }
82                                 return arrow;
83                         }
84                 }
85
86                 public static Cursor Cross {
87                         get {
88                                 if (cross == null) {
89                                         cross = new Cursor(XplatUI.DefineStdCursor(StdCursor.Cross));
90                                 }
91                                 return cross;
92                         }
93                 }
94
95                 public static Cursor Default {
96                         get {
97                                 if (def == null) {
98                                         def = new Cursor(XplatUI.DefineStdCursor(StdCursor.Default));
99                                 }
100                                 return def;
101                         }
102                 }
103
104                 public static Cursor Hand {
105                         get {
106                                 if (hand == null) {
107                                         hand = new Cursor(XplatUI.DefineStdCursor(StdCursor.Hand));
108                                 }
109                                 return hand;
110                         }
111                 }
112
113                 public static Cursor Help {
114                         get {
115                                 if (help == null) {
116                                         help = new Cursor(XplatUI.DefineStdCursor(StdCursor.Help));
117                                 }
118                                 return help;
119                         }
120                 }
121
122                 public static Cursor HSplit {
123                         get {
124                                 if (hsplit == null) {
125                                         hsplit = new Cursor(XplatUI.DefineStdCursor(StdCursor.HSplit));
126                                 }
127                                 return hsplit;
128                         }
129                 }
130
131                 public static Cursor IBeam {
132                         get {
133                                 if (ibeam == null) {
134                                         ibeam = new Cursor(XplatUI.DefineStdCursor(StdCursor.IBeam));
135                                 }
136                                 return ibeam;
137                         }
138                 }
139
140                 public static Cursor No {
141                         get {
142                                 if (no == null) {
143                                         no = new Cursor(XplatUI.DefineStdCursor(StdCursor.No));
144                                 }
145                                 return no;
146                         }
147                 }
148
149                 public static Cursor NoMove2D {
150                         get {
151                                 if (no_move_2d == null) {
152                                         no_move_2d = new Cursor(XplatUI.DefineStdCursor(StdCursor.NoMove2D));
153                                 }
154                                 return no_move_2d;
155                         }
156                 }
157
158                 public static Cursor NoMoveHoriz {
159                         get {
160                                 if (no_move_horiz == null) {
161                                         no_move_horiz = new Cursor(XplatUI.DefineStdCursor(StdCursor.NoMoveHoriz));
162                                 }
163                                 return no_move_horiz;
164                         }
165                 }
166
167                 public static Cursor NoMoveVert {
168                         get {
169                                 if (no_move_vert == null) {
170                                         no_move_vert = new Cursor(XplatUI.DefineStdCursor(StdCursor.NoMoveVert));
171                                 }
172                                 return no_move_vert;
173                         }
174                 }
175
176                 public static Cursor PanEast {
177                         get {
178                                 if (pan_east == null) {
179                                         pan_east = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanEast));
180                                 }
181                                 return pan_east;
182                         }
183                 }
184
185
186
187
188                 public static Cursor PanNE {
189                         get {
190                                 if (pan_ne == null) {
191                                         pan_ne = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanNE));
192                                 }
193                                 return pan_ne;
194                         }
195                 }
196
197
198                 public static Cursor PanNorth {
199                         get {
200                                 if (pan_north == null) {
201                                         pan_north = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanNorth));
202                                 }
203                                 return pan_north;
204                         }
205                 }
206
207                 public static Cursor PanNW {
208                         get {
209                                 if (pan_nw == null) {
210                                         pan_nw = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanNW));
211                                 }
212                                 return pan_nw;
213                         }
214                 }
215
216                 public static Cursor PanSE {
217                         get {
218                                 if (pan_se == null) {
219                                         pan_se = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanSE));
220                                 }
221                                 return pan_se;
222                         }
223                 }
224
225                 public static Cursor PanSouth {
226                         get {
227                                 if (pan_south == null) {
228                                         pan_south = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanSouth));
229                                 }
230                                 return pan_south;
231                         }
232                 }
233
234                 public static Cursor PanSW {
235                         get {
236                                 if (pan_sw == null) {
237                                         pan_sw = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanSW));
238                                 }
239                                 return pan_sw;
240                         }
241                 }
242
243                 public static Cursor PanWest {
244                         get {
245                                 if (pan_west == null) {
246                                         pan_west = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanWest));
247                                 }
248                                 return pan_west;
249                         }
250                 }
251
252                 public static Cursor SizeAll {
253                         get {
254                                 if (size_all == null) {
255                                         size_all = new Cursor(XplatUI.DefineStdCursor(StdCursor.SizeAll));
256                                 }
257                                 return size_all;
258                         }
259                 }
260
261                 public static Cursor SizeNESW {
262                         get {
263                                 if (size_nesw == null) {
264                                         size_nesw = new Cursor(XplatUI.DefineStdCursor(StdCursor.SizeNESW));
265                                 }
266                                 return size_nesw;
267                         }
268                 }
269
270                 public static Cursor SizeNS {
271                         get {
272                                 if (size_ns == null) {
273                                         size_ns = new Cursor(XplatUI.DefineStdCursor(StdCursor.SizeNS));
274                                 }
275                                 return size_ns;
276                         }
277                 }
278
279                 public static Cursor SizeNWSE {
280                         get {
281                                 if (size_nwse == null) {
282                                         size_nwse = new Cursor(XplatUI.DefineStdCursor(StdCursor.SizeNWSE));
283                                 }
284                                 return size_nwse;
285                         }
286                 }
287
288                 public static Cursor SizeWE {
289                         get {
290                                 if (size_we == null) {
291                                         size_we = new Cursor(XplatUI.DefineStdCursor(StdCursor.SizeWE));
292                                 }
293                                 return size_we;
294                         }
295                 }
296
297                 public static Cursor UpArrow {
298                         get {
299                                 if (up_arrow == null) {
300                                         up_arrow = new Cursor(XplatUI.DefineStdCursor(StdCursor.UpArrow));
301                                 }
302                                 return up_arrow;
303                         }
304                 }
305
306                 public static Cursor VSplit {
307                         get {
308                                 if (vsplit == null) {
309                                         vsplit = new Cursor(XplatUI.DefineStdCursor(StdCursor.VSplit));
310                                 }
311                                 return vsplit;
312                         }
313                 }
314
315                 public static Cursor WaitCursor {
316                         get {
317                                 if (wait_cursor == null) {
318                                         wait_cursor = new Cursor(XplatUI.DefineStdCursor(StdCursor.WaitCursor));
319                                 }
320                                 return wait_cursor;
321                         }
322                 }
323                 #endregion      // Public Static Properties
324         }
325 }