]>
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 /////////////////////////////////////////////////////////////////////////////
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
)
29 wxCursor(const wxCursor
& cursor
) { Ref(cursor
); }
31 wxCursor(const char bits
[], int width
, int height
,
32 int hotSpotX
= -1, int hotSpotY
= -1,
33 const char maskBits
[] = NULL
);
35 wxCursor(const wxString
& name
, long flags
= wxBITMAP_TYPE_XBM
,
36 int hotSpotX
= 0, int hotSpotY
= 0);
39 wxCursor(const wxImage
& image
);
42 wxCursor(wxStockCursor id
);
45 virtual bool Ok() const;
47 wxCursor
& operator = (const wxCursor
& cursor
)
48 { if (*this == cursor
) return (*this); Ref(cursor
); return *this; }
49 bool operator == (const wxCursor
& cursor
) const
50 { return m_refData
== cursor
.m_refData
; }
51 bool operator != (const wxCursor
& cursor
) const
52 { return m_refData
!= cursor
.m_refData
; }
55 // Create/get a cursor for the current display
56 WXCursor
GetXCursor(WXDisplay
* display
) const;
58 void Create(const char bits
[], int width
, int height
,
59 int hotSpotX
= -1, int hotSpotY
= -1,
60 const char maskBits
[] = NULL
);
61 void Create(WXPixmap cursor
, WXPixmap mask
, int hotSpotX
, int hotSpotY
);
63 // Make a cursor from standard id
64 WXCursor
MakeCursor(WXDisplay
* display
, wxStockCursor id
) const;
67 extern WXDLLEXPORT
void wxSetCursor(const wxCursor
& cursor
);