]>
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".
54 Bits for a mask bitmap.
69 Icon type to load. Under Motif, type defaults to wxBITMAP_TYPE_XBM. Under
71 it defaults to wxBITMAP_TYPE_CUR_RESOURCE. Under MacOS, it defaults to
72 wxBITMAP_TYPE_MACCURSOR_RESOURCE.
74 Under X, the permitted cursor types are:
80 Load an X bitmap file.
82 Under Windows, the permitted types are:
88 Load a cursor from a .cur cursor file (only if USE_RESOURCE_LOADING_IN_MSW
89 is enabled in setup.h).
91 wxBITMAP_TYPE_CUR_RESOURCE
94 Load a Windows resource (as specified in the .rc file).
99 Load a cursor from a .ico icon file (only if USE_RESOURCE_LOADING_IN_MSW
100 is enabled in setup.h). Specify hotSpotX and hotSpotY.
103 A stock cursor identifier. May be one of:
109 A standard arrow cursor.
114 A standard arrow cursor
115 pointing to the right.
130 Rectangular character cursor.
145 An I-beam cursor (vertical line).
150 Represents a mouse with the left button depressed.
157 wxCURSOR_MIDDLE_BUTTON
160 Represents a mouse with the middle button depressed.
165 A no-entry sign cursor.
180 A cursor that points left.
185 A cursor that points right.
187 wxCURSOR_QUESTION_ARROW
190 An arrow and question mark.
192 wxCURSOR_RIGHT_BUTTON
195 Represents a mouse with the right button depressed.
200 A sizing cursor pointing NE-SW.
205 A sizing cursor pointing N-S.
210 A sizing cursor pointing NW-SE.
215 A sizing cursor pointing W-E.
220 A general sizing cursor.
240 A cursor with both an arrow and
241 an hourglass, (windows.)
243 Note that not all cursors are available on all platforms.
246 Pointer or reference to a cursor to copy.
249 wxCursor(const char bits
[], int width
, int height
,
250 int hotSpotX
=-1, int hotSpotY
=-1,
251 const char maskBits
[]=@NULL
,
254 wxCursor(const wxString
& cursorName
, long type
,
255 int hotSpotX
=0, int hotSpotY
=0);
256 wxCursor(int cursorId
);
257 wxCursor(const wxImage
& image
);
258 wxCursor(const wxCursor
& cursor
);
263 See @ref overview_refcountdestruct "reference-counted object destruction" for
266 A cursor can be reused for more
267 than one window, and does not get destroyed when the window is
268 destroyed. wxWidgets destroys all cursors on application exit, although
269 it is best to clean them up explicitly.
274 Returns @true if cursor data is present.
276 #define bool IsOk() /* implementation is private */
279 Assignment operator, using @ref overview_trefcount "reference counting".
281 wxCursor
operator =(const wxCursor
& cursor
);