]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/cursor.h
don't define HAVE_FSYNC if it's already defined (as it can happen when using Cygwin...
[wxWidgets.git] / include / wx / os2 / cursor.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: cursor.h
3 // Purpose: wxCursor class
4 // Author: David Webster
5 // Modified by:
6 // Created: 10/13/99
7 // RCS-ID: $Id$
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_CURSOR_H_
13 #define _WX_CURSOR_H_
14
15 #include "wx/bitmap.h"
16
17 class WXDLLEXPORT wxCursorRefData: public wxGDIImageRefData
18 {
19 public:
20 wxCursorRefData();
21 virtual ~wxCursorRefData() { Free(); }
22 virtual void Free(void);
23 bool m_bDestroyCursor;
24 }; // end of CLASS wxCursorRefData
25
26 #define M_CURSORDATA ((wxCursorRefData *)m_refData)
27 #define M_CURSORHANDLERDATA ((wxCursorRefData *)bitmap->m_refData)
28
29 // Cursor
30 class WXDLLEXPORT wxCursor: public wxBitmap
31 {
32 public:
33 wxCursor();
34
35 wxCursor(const wxImage& rImage);
36
37 wxCursor( const char acBits[]
38 ,int nWidth
39 ,int nHeight
40 ,int nHotSpotX = -1
41 ,int nHotSpotY = -1
42 ,const char zMaskBits[] = NULL
43 );
44 wxCursor( const wxString& rsName
45 ,long lFlags = wxBITMAP_TYPE_CUR_RESOURCE
46 ,int nHotSpotX = 0
47 ,int nHotSpotY = 0
48 );
49 wxCursor(int nCursorType);
50 inline ~wxCursor() { }
51
52 inline WXHCURSOR GetHCURSOR(void) const { return (M_CURSORDATA ? M_CURSORDATA->m_hCursor : 0); }
53 inline void SetHCURSOR(WXHCURSOR hCursor) { SetHandle((WXHANDLE)hCursor); }
54
55 protected:
56 inline virtual wxGDIImageRefData* CreateData(void) const { return (new wxCursorRefData); }
57
58 private:
59 DECLARE_DYNAMIC_CLASS(wxCursor)
60 }; // end of CLASS wxCursor
61
62 #endif
63 // _WX_CURSOR_H_