]>
Commit | Line | Data |
---|---|---|
2bda0e17 | 1 | ///////////////////////////////////////////////////////////////////////////// |
6d167489 | 2 | // Name: wx/msw/cursor.h |
2bda0e17 KB |
3 | // Purpose: wxCursor class |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
bbcdf8bc | 8 | // Copyright: (c) Julian Smart |
65571936 | 9 | // Licence: wxWindows licence |
2bda0e17 KB |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
bbcdf8bc JS |
12 | #ifndef _WX_CURSOR_H_ |
13 | #define _WX_CURSOR_H_ | |
2bda0e17 | 14 | |
c781807d | 15 | #include "wx/msw/gdiimage.h" |
6d167489 | 16 | |
4a38127b VZ |
17 | class WXDLLEXPORT wxImage; |
18 | ||
2bda0e17 | 19 | // Cursor |
c781807d | 20 | class WXDLLEXPORT wxCursor : public wxGDIImage |
2bda0e17 | 21 | { |
2bda0e17 | 22 | public: |
eff4ffbf | 23 | // constructors |
6d167489 | 24 | wxCursor(); |
4dddb8a2 | 25 | wxCursor(const wxCursor& cursor) : wxGDIImage(cursor) { Ref(cursor); } |
c781807d | 26 | wxCursor(const wxImage& image); |
6d167489 VZ |
27 | wxCursor(const char bits[], int width, int height, |
28 | int hotSpotX = -1, int hotSpotY = -1, | |
29 | const char maskBits[] = NULL); | |
30 | wxCursor(const wxString& name, | |
31 | long flags = wxBITMAP_TYPE_CUR_RESOURCE, | |
32 | int hotSpotX = 0, int hotSpotY = 0); | |
eff4ffbf | 33 | wxCursor(int idCursor); |
6d167489 | 34 | virtual ~wxCursor(); |
2bda0e17 | 35 | |
eff4ffbf VZ |
36 | wxCursor& operator=(const wxCursor& cursor) |
37 | { if (*this == cursor) return (*this); Ref(cursor); return *this; } | |
38 | ||
39 | bool operator==(const wxCursor& cursor) const; | |
40 | bool operator!=(const wxCursor& cursor) const | |
41 | { return !(*this == cursor); } | |
2bda0e17 | 42 | |
eff4ffbf | 43 | // implementation only |
6d167489 VZ |
44 | void SetHCURSOR(WXHCURSOR cursor) { SetHandle((WXHANDLE)cursor); } |
45 | WXHCURSOR GetHCURSOR() const { return (WXHCURSOR)GetHandle(); } | |
2bda0e17 | 46 | |
6d167489 | 47 | protected: |
eff4ffbf | 48 | virtual wxGDIImageRefData *CreateData() const; |
2bda0e17 | 49 | |
6d167489 VZ |
50 | private: |
51 | DECLARE_DYNAMIC_CLASS(wxCursor) | |
2bda0e17 KB |
52 | }; |
53 | ||
54 | #endif | |
bbcdf8bc | 55 | // _WX_CURSOR_H_ |