]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/cursor.h
tentative fix for BestSize problems (non-native toolbar)
[wxWidgets.git] / include / wx / mac / carbon / cursor.h
CommitLineData
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
15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16#pragma interface "cursor.h"
17#endif
18
19#include "wx/bitmap.h"
20
8cf73271
SC
21// Cursor
22class WXDLLEXPORT wxCursor: public wxBitmap
23{
24 DECLARE_DYNAMIC_CLASS(wxCursor)
25
26public:
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) ;
20b69855 47 virtual bool Ok() const ;
8cf73271
SC
48
49 inline wxCursor& operator = (const wxCursor& cursor) { if (*this == cursor) return (*this); Ref(cursor); return *this; }
64631e82
SC
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; }
8cf73271
SC
52
53 void MacInstall() const ;
54
55 void SetHCURSOR(WXHCURSOR cursor);
20b69855 56 inline WXHCURSOR GetHCURSOR() const ;
8cf73271
SC
57private :
58 void CreateFromImage(const wxImage & image) ;
59};
60
61extern WXDLLEXPORT void wxSetCursor(const wxCursor& cursor);
62
63#endif
64 // _WX_CURSOR_H_