]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/msw/cursor.h
Compilation fix for OS/2.
[wxWidgets.git] / include / wx / msw / cursor.h
... / ...
CommitLineData
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#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "cursor.h"
17#endif
18
19#include "wx/msw/gdiimage.h"
20
21class WXDLLEXPORT wxImage;
22
23// Cursor
24class WXDLLEXPORT wxCursor : public wxGDIImage
25{
26public:
27 // constructors
28 wxCursor();
29 wxCursor(const wxCursor& cursor) : wxGDIImage(cursor) { Ref(cursor); }
30 wxCursor(const wxImage& image);
31 wxCursor(const char bits[], int width, int height,
32 int hotSpotX = -1, int hotSpotY = -1,
33 const char maskBits[] = NULL);
34 wxCursor(const wxString& name,
35 long flags = wxBITMAP_TYPE_CUR_RESOURCE,
36 int hotSpotX = 0, int hotSpotY = 0);
37 wxCursor(int idCursor);
38 virtual ~wxCursor();
39
40 wxCursor& operator=(const wxCursor& cursor)
41 { if (*this == cursor) return (*this); Ref(cursor); return *this; }
42
43 bool operator==(const wxCursor& cursor) const;
44 bool operator!=(const wxCursor& cursor) const
45 { return !(*this == cursor); }
46
47 // implementation only
48 void SetHCURSOR(WXHCURSOR cursor) { SetHandle((WXHANDLE)cursor); }
49 WXHCURSOR GetHCURSOR() const { return (WXHCURSOR)GetHandle(); }
50
51protected:
52 virtual wxGDIImageRefData *CreateData() const;
53
54private:
55 DECLARE_DYNAMIC_CLASS(wxCursor)
56};
57
58#endif
59 // _WX_CURSOR_H_