]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/cursor.h
Don't create multiple parent-less top level frames in layout sample.
[wxWidgets.git] / include / wx / msw / cursor.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/cursor.h
3 // Purpose: wxCursor class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_CURSOR_H_
13 #define _WX_CURSOR_H_
14
15 #include "wx/msw/gdiimage.h"
16
17 class WXDLLIMPEXP_FWD_CORE wxImage;
18
19 // Cursor
20 class WXDLLIMPEXP_CORE wxCursor : public wxGDIImage
21 {
22 public:
23 // constructors
24 wxCursor();
25 wxCursor(const wxImage& image);
26 wxCursor(const wxString& name,
27 wxBitmapType type = wxCURSOR_DEFAULT_TYPE,
28 int hotSpotX = 0, int hotSpotY = 0);
29 wxCursor(wxStockCursor id) { InitFromStock(id); }
30 #if WXWIN_COMPATIBILITY_2_8
31 wxCursor(int id) { InitFromStock((wxStockCursor)id); }
32 #endif
33 virtual ~wxCursor();
34
35 // implementation only
36 void SetHCURSOR(WXHCURSOR cursor) { SetHandle((WXHANDLE)cursor); }
37 WXHCURSOR GetHCURSOR() const { return (WXHCURSOR)GetHandle(); }
38
39 protected:
40 void InitFromStock(wxStockCursor);
41
42 virtual wxGDIImageRefData *CreateData() const;
43
44 private:
45 DECLARE_DYNAMIC_CLASS(wxCursor)
46 };
47
48 #endif
49 // _WX_CURSOR_H_