]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/carbon/cursor.h
forwarding position changed events to peer
[wxWidgets.git] / include / wx / mac / carbon / cursor.h
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
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/bitmap.h"
20
21 // Cursor
22 class WXDLLEXPORT wxCursor: public wxBitmap
23 {
24 DECLARE_DYNAMIC_CLASS(wxCursor)
25
26 public:
27 wxCursor();
28
29 // Copy constructors
30 wxCursor(const wxCursor& cursor)
31 : wxBitmap()
32 { Ref(cursor); }
33
34 wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1,
35 const char maskBits[] = NULL);
36
37 wxCursor(const wxImage & image) ;
38 wxCursor(const char **bits) ;
39 wxCursor(char **bits) ;
40 wxCursor(const wxString& name, long flags = wxBITMAP_TYPE_MACCURSOR_RESOURCE,
41 int hotSpotX = 0, int hotSpotY = 0);
42
43 wxCursor(int cursor_type);
44 ~wxCursor();
45
46 bool CreateFromXpm(const char **bits) ;
47 virtual bool Ok() const ;
48
49 inline wxCursor& operator = (const wxCursor& cursor) { if (*this == cursor) return (*this); Ref(cursor); return *this; }
50 inline bool operator == (const wxCursor& cursor) const { return m_refData == cursor.m_refData; }
51 inline bool operator != (const wxCursor& cursor) const { return m_refData != cursor.m_refData; }
52
53 void MacInstall() const ;
54
55 void SetHCURSOR(WXHCURSOR cursor);
56 inline WXHCURSOR GetHCURSOR() const ;
57 private :
58 void CreateFromImage(const wxImage & image) ;
59 };
60
61 extern WXDLLEXPORT void wxSetCursor(const wxCursor& cursor);
62
63 #endif
64 // _WX_CURSOR_H_