]>
Commit | Line | Data |
---|---|---|
8cf73271 SC |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: cursor.h | |
3 | // Purpose: wxCursor class | |
4 | // Author: Stefan Csomor | |
5 | // Modified by: | |
6 | // Created: 1998-01-01 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Stefan Csomor | |
65571936 | 9 | // Licence: wxWindows licence |
8cf73271 SC |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_CURSOR_H_ | |
13 | #define _WX_CURSOR_H_ | |
14 | ||
8cf73271 SC |
15 | #include "wx/bitmap.h" |
16 | ||
8cf73271 SC |
17 | // Cursor |
18 | class WXDLLEXPORT wxCursor: public wxBitmap | |
19 | { | |
20 | DECLARE_DYNAMIC_CLASS(wxCursor) | |
21 | ||
22 | public: | |
23 | wxCursor(); | |
24 | ||
25 | // Copy constructors | |
26 | wxCursor(const wxCursor& cursor) | |
27 | : wxBitmap() | |
28 | { Ref(cursor); } | |
29 | ||
30 | wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1, | |
31 | const char maskBits[] = NULL); | |
32 | ||
33 | wxCursor(const wxImage & image) ; | |
34 | wxCursor(const char **bits) ; | |
35 | wxCursor(char **bits) ; | |
36 | wxCursor(const wxString& name, long flags = wxBITMAP_TYPE_MACCURSOR_RESOURCE, | |
37 | int hotSpotX = 0, int hotSpotY = 0); | |
38 | ||
39 | wxCursor(int cursor_type); | |
40 | ~wxCursor(); | |
41 | ||
42 | bool CreateFromXpm(const char **bits) ; | |
20b69855 | 43 | virtual bool Ok() const ; |
8cf73271 SC |
44 | |
45 | inline wxCursor& operator = (const wxCursor& cursor) { if (*this == cursor) return (*this); Ref(cursor); return *this; } | |
64631e82 SC |
46 | inline bool operator == (const wxCursor& cursor) const { return m_refData == cursor.m_refData; } |
47 | inline bool operator != (const wxCursor& cursor) const { return m_refData != cursor.m_refData; } | |
8cf73271 SC |
48 | |
49 | void MacInstall() const ; | |
50 | ||
51 | void SetHCURSOR(WXHCURSOR cursor); | |
20b69855 | 52 | inline WXHCURSOR GetHCURSOR() const ; |
8cf73271 SC |
53 | private : |
54 | void CreateFromImage(const wxImage & image) ; | |
55 | }; | |
56 | ||
57 | extern WXDLLEXPORT void wxSetCursor(const wxCursor& cursor); | |
58 | ||
59 | #endif | |
60 | // _WX_CURSOR_H_ |