]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/cursor.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/cursor.h
3 // Purpose: wxCursor class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/object.h"
16 #include "wx/gdicmn.h"
18 class WXDLLEXPORT wxImage
;
21 class WXDLLEXPORT wxCursor
: public wxObject
23 DECLARE_DYNAMIC_CLASS(wxCursor
)
28 wxCursor(const char bits
[], int width
, int height
,
29 int hotSpotX
= -1, int hotSpotY
= -1,
30 const char maskBits
[] = NULL
);
32 wxCursor(const wxString
& name
, long flags
= wxBITMAP_TYPE_XBM
,
33 int hotSpotX
= 0, int hotSpotY
= 0);
36 wxCursor(const wxImage
& image
);
39 wxCursor(wxStockCursor id
);
42 virtual bool Ok() const;
44 bool operator == (const wxCursor
& cursor
) const
45 { return m_refData
== cursor
.m_refData
; }
46 bool operator != (const wxCursor
& cursor
) const
47 { return m_refData
!= cursor
.m_refData
; }
50 // Create/get a cursor for the current display
51 WXCursor
GetXCursor(WXDisplay
* display
) const;
53 void Create(const char bits
[], int width
, int height
,
54 int hotSpotX
= -1, int hotSpotY
= -1,
55 const char maskBits
[] = NULL
);
56 void Create(WXPixmap cursor
, WXPixmap mask
, int hotSpotX
, int hotSpotY
);
58 // Make a cursor from standard id
59 WXCursor
MakeCursor(WXDisplay
* display
, wxStockCursor id
) const;
62 extern WXDLLEXPORT
void wxSetCursor(const wxCursor
& cursor
);