]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/cursor.h
not needed
[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
12028905 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
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
ffa3d6b8
MB
35 wxCursor(const char bits[], int width, int height,
36 int hotSpotX = -1, int hotSpotY = -1,
37 const char maskBits[] = NULL);
83df96d6
JS
38
39 wxCursor(const wxString& name, long flags = wxBITMAP_TYPE_XBM,
40 int hotSpotX = 0, int hotSpotY = 0);
4daa4d66
CE
41
42#if wxUSE_IMAGE
43 wxCursor(const wxImage& image);
44#endif
45
83df96d6
JS
46 wxCursor(wxStockCursor id);
47 ~wxCursor();
48
93e73c74 49 virtual bool Ok() const;
83df96d6 50
93e73c74
MB
51 wxCursor& operator = (const wxCursor& cursor)
52 { if (*this == cursor) return (*this); Ref(cursor); return *this; }
53 bool operator == (const wxCursor& cursor) const
54 { return m_refData == cursor.m_refData; }
55 bool operator != (const wxCursor& cursor) const
56 { return m_refData != cursor.m_refData; }
57
83df96d6
JS
58 // Motif-specific.
59 // Create/get a cursor for the current display
60 WXCursor GetXCursor(WXDisplay* display) ;
93e73c74 61private:
ffa3d6b8
MB
62 void Create(const char bits[], int width, int height,
63 int hotSpotX = -1, int hotSpotY = -1,
64 const char maskBits[] = NULL);
65 void Create(WXPixmap cursor, WXPixmap mask, int hotSpotX, int hotSpotY);
66
83df96d6
JS
67 // Make a cursor from standard id
68 WXCursor MakeCursor(WXDisplay* display, wxStockCursor id);
9b6dbb09
JS
69};
70
71extern WXDLLEXPORT void wxSetCursor(const wxCursor& cursor);
72
73#endif
83df96d6 74// _WX_CURSOR_H_