]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/cursor.h
disable use of #pragma interface under Mac OS X
[wxWidgets.git] / include / wx / motif / cursor.h
CommitLineData
9b6dbb09
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: cursor.h
3// Purpose: wxCursor class
4// Author: Julian Smart
5// Modified by:
6// Created: 17/09/98
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
3399051e 15#if defined(__GNUG__) && !defined(__APPLE__)
9b6dbb09
JS
16#pragma interface "cursor.h"
17#endif
18
93e73c74
MB
19#include "wx/object.h"
20#include "wx/gdicmn.h"
9b6dbb09 21
93e73c74 22class WXDLLEXPORT wxImage;
9b6dbb09
JS
23
24// Cursor
93e73c74 25class WXDLLEXPORT wxCursor: public wxObject
9b6dbb09 26{
83df96d6
JS
27 DECLARE_DYNAMIC_CLASS(wxCursor)
28
9b6dbb09 29public:
83df96d6
JS
30 wxCursor();
31
32 // Copy constructors
33 wxCursor(const wxCursor& cursor) { Ref(cursor); }
34
35 wxCursor(const char bits[], int width, int height, int hotSpotX = -1, int hotSpotY = -1,
36 const char maskBits[] = NULL);
37
38 wxCursor(const wxString& name, long flags = wxBITMAP_TYPE_XBM,
39 int hotSpotX = 0, int hotSpotY = 0);
4daa4d66
CE
40
41#if wxUSE_IMAGE
42 wxCursor(const wxImage& image);
43#endif
44
83df96d6
JS
45 wxCursor(wxStockCursor id);
46 ~wxCursor();
47
93e73c74 48 virtual bool Ok() const;
83df96d6 49
93e73c74
MB
50 wxCursor& operator = (const wxCursor& cursor)
51 { if (*this == cursor) return (*this); Ref(cursor); return *this; }
52 bool operator == (const wxCursor& cursor) const
53 { return m_refData == cursor.m_refData; }
54 bool operator != (const wxCursor& cursor) const
55 { return m_refData != cursor.m_refData; }
56
83df96d6
JS
57 // Motif-specific.
58 // Create/get a cursor for the current display
59 WXCursor GetXCursor(WXDisplay* display) ;
93e73c74 60private:
83df96d6
JS
61 // Make a cursor from standard id
62 WXCursor MakeCursor(WXDisplay* display, wxStockCursor id);
9b6dbb09
JS
63};
64
65extern WXDLLEXPORT void wxSetCursor(const wxCursor& cursor);
66
67#endif
83df96d6 68// _WX_CURSOR_H_