]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/cursor.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxCursor class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "cursor.h"
19 #include "wx/object.h"
20 #include "wx/gdicmn.h"
22 class WXDLLEXPORT wxImage
;
25 class WXDLLEXPORT wxCursor
: public wxObject
27 DECLARE_DYNAMIC_CLASS(wxCursor
)
33 wxCursor(const wxCursor
& cursor
) { Ref(cursor
); }
35 wxCursor(const char bits
[], int width
, int height
, int hotSpotX
= -1, int hotSpotY
= -1,
36 const char maskBits
[] = NULL
);
38 wxCursor(const wxString
& name
, long flags
= wxBITMAP_TYPE_XBM
,
39 int hotSpotX
= 0, int hotSpotY
= 0);
42 wxCursor(const wxImage
& image
);
45 wxCursor(wxStockCursor id
);
48 virtual bool Ok() const;
50 wxCursor
& operator = (const wxCursor
& cursor
)
51 { if (*this == cursor
) return (*this); Ref(cursor
); return *this; }
52 bool operator == (const wxCursor
& cursor
) const
53 { return m_refData
== cursor
.m_refData
; }
54 bool operator != (const wxCursor
& cursor
) const
55 { return m_refData
!= cursor
.m_refData
; }
58 // Create/get a cursor for the current display
59 WXCursor
GetXCursor(WXDisplay
* display
) ;
61 // Make a cursor from standard id
62 WXCursor
MakeCursor(WXDisplay
* display
, wxStockCursor id
);
65 extern WXDLLEXPORT
void wxSetCursor(const wxCursor
& cursor
);