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:
9 // The above copyright notice and this permission notice shall be
10 // included in all copies or substantial portions of the Software.
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.
20 // Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
23 // Peter Bartok pbartok@novell.com
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
65 #endregion // Constructors
67 #region Public Static Properties
68 public static Cursor AppStarting {
70 if (app_starting == null) {
71 app_starting = new Cursor(XplatUI.DefineStdCursor(StdCursor.AppStarting));
77 public static Cursor Arrow {
80 arrow = new Cursor(XplatUI.DefineStdCursor(StdCursor.Arrow));
86 public static Cursor Cross {
89 cross = new Cursor(XplatUI.DefineStdCursor(StdCursor.Cross));
95 public static Cursor Default {
98 def = new Cursor(XplatUI.DefineStdCursor(StdCursor.Default));
104 public static Cursor Hand {
107 hand = new Cursor(XplatUI.DefineStdCursor(StdCursor.Hand));
113 public static Cursor Help {
116 help = new Cursor(XplatUI.DefineStdCursor(StdCursor.Help));
122 public static Cursor HSplit {
124 if (hsplit == null) {
125 hsplit = new Cursor(XplatUI.DefineStdCursor(StdCursor.HSplit));
131 public static Cursor IBeam {
134 ibeam = new Cursor(XplatUI.DefineStdCursor(StdCursor.IBeam));
140 public static Cursor No {
143 no = new Cursor(XplatUI.DefineStdCursor(StdCursor.No));
149 public static Cursor NoMove2D {
151 if (no_move_2d == null) {
152 no_move_2d = new Cursor(XplatUI.DefineStdCursor(StdCursor.NoMove2D));
158 public static Cursor NoMoveHoriz {
160 if (no_move_horiz == null) {
161 no_move_horiz = new Cursor(XplatUI.DefineStdCursor(StdCursor.NoMoveHoriz));
163 return no_move_horiz;
167 public static Cursor NoMoveVert {
169 if (no_move_vert == null) {
170 no_move_vert = new Cursor(XplatUI.DefineStdCursor(StdCursor.NoMoveVert));
176 public static Cursor PanEast {
178 if (pan_east == null) {
179 pan_east = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanEast));
188 public static Cursor PanNE {
190 if (pan_ne == null) {
191 pan_ne = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanNE));
198 public static Cursor PanNorth {
200 if (pan_north == null) {
201 pan_north = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanNorth));
207 public static Cursor PanNW {
209 if (pan_nw == null) {
210 pan_nw = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanNW));
216 public static Cursor PanSE {
218 if (pan_se == null) {
219 pan_se = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanSE));
225 public static Cursor PanSouth {
227 if (pan_south == null) {
228 pan_south = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanSouth));
234 public static Cursor PanSW {
236 if (pan_sw == null) {
237 pan_sw = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanSW));
243 public static Cursor PanWest {
245 if (pan_west == null) {
246 pan_west = new Cursor(XplatUI.DefineStdCursor(StdCursor.PanWest));
252 public static Cursor SizeAll {
254 if (size_all == null) {
255 size_all = new Cursor(XplatUI.DefineStdCursor(StdCursor.SizeAll));
261 public static Cursor SizeNESW {
263 if (size_nesw == null) {
264 size_nesw = new Cursor(XplatUI.DefineStdCursor(StdCursor.SizeNESW));
270 public static Cursor SizeNS {
272 if (size_ns == null) {
273 size_ns = new Cursor(XplatUI.DefineStdCursor(StdCursor.SizeNS));
279 public static Cursor SizeNWSE {
281 if (size_nwse == null) {
282 size_nwse = new Cursor(XplatUI.DefineStdCursor(StdCursor.SizeNWSE));
288 public static Cursor SizeWE {
290 if (size_we == null) {
291 size_we = new Cursor(XplatUI.DefineStdCursor(StdCursor.SizeWE));
297 public static Cursor UpArrow {
299 if (up_arrow == null) {
300 up_arrow = new Cursor(XplatUI.DefineStdCursor(StdCursor.UpArrow));
306 public static Cursor VSplit {
308 if (vsplit == null) {
309 vsplit = new Cursor(XplatUI.DefineStdCursor(StdCursor.VSplit));
315 public static Cursor WaitCursor {
317 if (wait_cursor == null) {
318 wait_cursor = new Cursor(XplatUI.DefineStdCursor(StdCursor.WaitCursor));
323 #endregion // Public Static Properties