]>
git.saurik.com Git - wxWidgets.git/blob - interface/cursor.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: documentation for wxCursor class
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
13 A cursor is a small bitmap usually used for denoting where the mouse
14 pointer is, with a picture that might indicate the interpretation of a
15 mouse click. As with icons, cursors in X and MS Windows are created
16 in a different manner. Therefore, separate cursors will be created for the
17 different environments. Platform-specific methods for creating a @b wxCursor
18 object are catered for, and this is an occasion where
19 conditional compilation will probably be required (see wxIcon for
22 A single cursor object may be used in many windows (any subwindow type).
23 The wxWidgets convention is to set the cursor for a window, as in X,
24 rather than to set it globally as in MS Windows, although a
25 global ::wxSetCursor is also available for MS Windows use.
41 wxBitmap, wxIcon, wxWindow::SetCursor, ::wxSetCursor
43 class wxCursor
: public wxBitmap
48 Copy constructor, uses @ref overview_trefcount "reference counting".
53 Bits for a mask bitmap.
63 Icon type to load. Under Motif, type defaults to wxBITMAP_TYPE_XBM. Under
65 it defaults to wxBITMAP_TYPE_CUR_RESOURCE. Under MacOS, it defaults to
66 wxBITMAP_TYPE_MACCURSOR_RESOURCE.
67 Under X, the permitted cursor types are:
80 Load an X bitmap file.
86 Under Windows, the permitted types are:
99 Load a cursor from a .cur cursor file (only if USE_RESOURCE_LOADING_IN_MSW
100 is enabled in setup.h).
106 wxBITMAP_TYPE_CUR_RESOURCE
111 Load a Windows resource (as specified in the .rc file).
122 Load a cursor from a .ico icon file (only if USE_RESOURCE_LOADING_IN_MSW
123 is enabled in setup.h). Specify hotSpotX and hotSpotY.
125 A stock cursor identifier. May be one of:
138 A standard arrow cursor.
149 A standard arrow cursor
150 pointing to the right.
183 Rectangular character cursor.
216 An I-beam cursor (vertical line).
227 Represents a mouse with the left button depressed.
244 wxCURSOR_MIDDLE_BUTTON
249 Represents a mouse with the middle button depressed.
260 A no-entry sign cursor.
293 A cursor that points left.
304 A cursor that points right.
310 wxCURSOR_QUESTION_ARROW
315 An arrow and question mark.
321 wxCURSOR_RIGHT_BUTTON
326 Represents a mouse with the right button depressed.
337 A sizing cursor pointing NE-SW.
348 A sizing cursor pointing N-S.
359 A sizing cursor pointing NW-SE.
370 A sizing cursor pointing W-E.
381 A general sizing cursor.
425 A cursor with both an arrow and
426 an hourglass, (windows.)
432 Note that not all cursors are available on all platforms.
434 Pointer or reference to a cursor to copy.
437 wxCursor(const char bits
[], int width
, int height
,
438 int hotSpotX
= -1, int hotSpotY
= -1,
439 const char maskBits
[] = NULL
,
441 wxColour
* bg
= NULL
);
442 wxCursor(const wxString
& cursorName
, long type
,
443 int hotSpotX
= 0, int hotSpotY
= 0);
444 wxCursor(int cursorId
);
445 wxCursor(const wxImage
& image
);
446 wxCursor(const wxCursor
& cursor
);
451 See @ref overview_refcountdestruct "reference-counted object destruction" for
453 A cursor can be reused for more
454 than one window, and does not get destroyed when the window is
455 destroyed. wxWidgets destroys all cursors on application exit, although
456 it is best to clean them up explicitly.
461 Returns @true if cursor data is present.
466 Assignment operator, using @ref overview_trefcount "reference counting".
468 wxCursor
operator =(const wxCursor
& cursor
);