]>
Commit | Line | Data |
---|---|---|
9b6dbb09 | 1 | ///////////////////////////////////////////////////////////////////////////// |
925f7740 | 2 | // Name: wx/motif/cursor.h |
9b6dbb09 JS |
3 | // Purpose: wxCursor class |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 17/09/98 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart | |
925f7740 | 9 | // Licence: wxWindows licence |
9b6dbb09 JS |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_CURSOR_H_ | |
13 | #define _WX_CURSOR_H_ | |
14 | ||
93e73c74 MB |
15 | #include "wx/object.h" |
16 | #include "wx/gdicmn.h" | |
9b6dbb09 | 17 | |
b5dbe15d | 18 | class WXDLLIMPEXP_FWD_CORE wxImage; |
9b6dbb09 JS |
19 | |
20 | // Cursor | |
93e73c74 | 21 | class WXDLLEXPORT wxCursor: public wxObject |
9b6dbb09 | 22 | { |
83df96d6 | 23 | DECLARE_DYNAMIC_CLASS(wxCursor) |
925f7740 | 24 | |
9b6dbb09 | 25 | public: |
83df96d6 | 26 | wxCursor(); |
f8855e47 | 27 | |
ffa3d6b8 MB |
28 | wxCursor(const char bits[], int width, int height, |
29 | int hotSpotX = -1, int hotSpotY = -1, | |
30 | const char maskBits[] = NULL); | |
925f7740 | 31 | |
83df96d6 JS |
32 | wxCursor(const wxString& name, long flags = wxBITMAP_TYPE_XBM, |
33 | int hotSpotX = 0, int hotSpotY = 0); | |
4daa4d66 | 34 | |
925f7740 | 35 | #if wxUSE_IMAGE |
4daa4d66 CE |
36 | wxCursor(const wxImage& image); |
37 | #endif | |
925f7740 | 38 | |
83df96d6 | 39 | wxCursor(wxStockCursor id); |
d3c7fc99 | 40 | virtual ~wxCursor(); |
925f7740 | 41 | |
b7cacb43 VZ |
42 | virtual bool Ok() const { return IsOk(); } |
43 | virtual bool IsOk() const; | |
925f7740 | 44 | |
83df96d6 JS |
45 | // Motif-specific. |
46 | // Create/get a cursor for the current display | |
bc6e28d5 | 47 | WXCursor GetXCursor(WXDisplay* display) const; |
93e73c74 | 48 | private: |
ffa3d6b8 MB |
49 | void Create(const char bits[], int width, int height, |
50 | int hotSpotX = -1, int hotSpotY = -1, | |
51 | const char maskBits[] = NULL); | |
52 | void Create(WXPixmap cursor, WXPixmap mask, int hotSpotX, int hotSpotY); | |
53 | ||
83df96d6 | 54 | // Make a cursor from standard id |
bc6e28d5 | 55 | WXCursor MakeCursor(WXDisplay* display, wxStockCursor id) const; |
9b6dbb09 JS |
56 | }; |
57 | ||
58 | extern WXDLLEXPORT void wxSetCursor(const wxCursor& cursor); | |
59 | ||
60 | #endif | |
83df96d6 | 61 | // _WX_CURSOR_H_ |