]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/cursor.h
define wxHAS_CONFIG_TEMPLATE_RW if template wxConfig::Read/Write() are available...
[wxWidgets.git] / include / wx / motif / cursor.h
CommitLineData
9b6dbb09 1/////////////////////////////////////////////////////////////////////////////
925f7740 2// Name: wx/motif/cursor.h
9b6dbb09
JS
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
925f7740 9// Licence: wxWindows licence
9b6dbb09
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_CURSOR_H_
13#define _WX_CURSOR_H_
14
8f884a0d 15#include "wx/gdiobj.h"
93e73c74 16#include "wx/gdicmn.h"
9b6dbb09 17
b5dbe15d 18class WXDLLIMPEXP_FWD_CORE wxImage;
9b6dbb09
JS
19
20// Cursor
53a2db12 21class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject
9b6dbb09 22{
9b6dbb09 23public:
83df96d6 24 wxCursor();
f8855e47 25
ffa3d6b8
MB
26 wxCursor(const char bits[], int width, int height,
27 int hotSpotX = -1, int hotSpotY = -1,
0ef5b1da
FM
28 const char maskBits[] = NULL,
29 const wxColour* fg = NULL, const wxColour* bg = NULL);
925f7740 30
0ef5b1da
FM
31 wxCursor(const wxString& name,
32 wxBitmapType type = wxCURSOR_DEFAULT_TYPE,
33 int hotSpotX = 0, int hotSpotY = 0);
4daa4d66 34
925f7740 35#if wxUSE_IMAGE
4daa4d66
CE
36 wxCursor(const wxImage& image);
37#endif
925f7740 38
0ef5b1da
FM
39 wxCursor(wxStockCursor id) { InitFromStock(id); }
40#if WXWIN_COMPATIBILITY_2_8
41 wxCursor(int id) { InitFromStock((wxStockCursor)id); }
42#endif
43
d3c7fc99 44 virtual ~wxCursor();
925f7740 45
83df96d6
JS
46 // Motif-specific.
47 // Create/get a cursor for the current display
bc6e28d5 48 WXCursor GetXCursor(WXDisplay* display) const;
8f884a0d
VZ
49
50protected:
51 virtual wxGDIRefData *CreateGDIRefData() const;
52 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
53
93e73c74 54private:
0ef5b1da
FM
55 void InitFromStock(wxStockCursor);
56
ffa3d6b8
MB
57 void Create(const char bits[], int width, int height,
58 int hotSpotX = -1, int hotSpotY = -1,
59 const char maskBits[] = NULL);
60 void Create(WXPixmap cursor, WXPixmap mask, int hotSpotX, int hotSpotY);
61
83df96d6 62 // Make a cursor from standard id
bc6e28d5 63 WXCursor MakeCursor(WXDisplay* display, wxStockCursor id) const;
8f884a0d
VZ
64
65 DECLARE_DYNAMIC_CLASS(wxCursor)
9b6dbb09
JS
66};
67
53a2db12 68extern WXDLLIMPEXP_CORE void wxSetCursor(const wxCursor& cursor);
9b6dbb09
JS
69
70#endif
83df96d6 71// _WX_CURSOR_H_