]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/cursor.h
no real changes, just some cleanup
[wxWidgets.git] / include / wx / os2 / cursor.h
CommitLineData
0e320a79
DW
1/////////////////////////////////////////////////////////////////////////////
2// Name: cursor.h
3// Purpose: wxCursor class
37f214d5 4// Author: David Webster
0e320a79 5// Modified by:
37f214d5 6// Created: 10/13/99
0e320a79 7// RCS-ID: $Id$
37f214d5 8// Copyright: (c) David Webster
65571936 9// Licence: wxWindows licence
0e320a79
DW
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_CURSOR_H_
13#define _WX_CURSOR_H_
14
0e320a79
DW
15#include "wx/bitmap.h"
16
760a4fb9 17class WXDLLEXPORT wxCursorRefData: public wxGDIImageRefData
0e320a79 18{
0e320a79
DW
19public:
20 wxCursorRefData();
d3c7fc99 21 virtual ~wxCursorRefData() { Free(); }
760a4fb9
DW
22 virtual void Free(void);
23 bool m_bDestroyCursor;
24}; // end of CLASS wxCursorRefData
0e320a79
DW
25
26#define M_CURSORDATA ((wxCursorRefData *)m_refData)
27#define M_CURSORHANDLERDATA ((wxCursorRefData *)bitmap->m_refData)
28
29// Cursor
30class WXDLLEXPORT wxCursor: public wxBitmap
31{
0e320a79 32public:
760a4fb9 33 wxCursor();
0e320a79 34
760a4fb9 35 wxCursor(const wxImage& rImage);
0e320a79 36
760a4fb9
DW
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() { }
0e320a79 51
760a4fb9
DW
52 inline WXHCURSOR GetHCURSOR(void) const { return (M_CURSORDATA ? M_CURSORDATA->m_hCursor : 0); }
53 inline void SetHCURSOR(WXHCURSOR hCursor) { SetHandle((WXHANDLE)hCursor); }
0e320a79 54
760a4fb9
DW
55protected:
56 inline virtual wxGDIImageRefData* CreateData(void) const { return (new wxCursorRefData); }
0e320a79 57
760a4fb9
DW
58private:
59 DECLARE_DYNAMIC_CLASS(wxCursor)
60}; // end of CLASS wxCursor
0e320a79
DW
61
62#endif
63 // _WX_CURSOR_H_