]>
Commit | Line | Data |
---|---|---|
c801d85f | 1 | ///////////////////////////////////////////////////////////////////////////// |
80fdcdb9 | 2 | // Name: wx/gtk/cursor.h |
c801d85f KB |
3 | // Purpose: |
4 | // Author: Robert Roebling | |
dbf858b5 | 5 | // Copyright: (c) 1998 Robert Roebling |
65571936 | 6 | // Licence: wxWindows licence |
c801d85f KB |
7 | ///////////////////////////////////////////////////////////////////////////// |
8 | ||
0416c418 PC |
9 | #ifndef _WX_GTK_CURSOR_H_ |
10 | #define _WX_GTK_CURSOR_H_ | |
c801d85f | 11 | |
8f884a0d | 12 | #include "wx/gdiobj.h" |
f4efd805 | 13 | #include "wx/gdicmn.h" |
c801d85f | 14 | |
b5dbe15d VS |
15 | class WXDLLIMPEXP_FWD_CORE wxColour; |
16 | class WXDLLIMPEXP_FWD_CORE wxImage; | |
7eff657c | 17 | |
c801d85f KB |
18 | //----------------------------------------------------------------------------- |
19 | // wxCursor | |
20 | //----------------------------------------------------------------------------- | |
21 | ||
8f884a0d | 22 | class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject |
c801d85f | 23 | { |
20e05ffb | 24 | public: |
8bbe427f | 25 | wxCursor(); |
0ef5b1da FM |
26 | wxCursor(wxStockCursor id) { InitFromStock(id); } |
27 | #if WXWIN_COMPATIBILITY_2_8 | |
28 | wxCursor(int id) { InitFromStock((wxStockCursor)id); } | |
29 | #endif | |
7eff657c JS |
30 | #if wxUSE_IMAGE |
31 | wxCursor( const wxImage & image ); | |
d6764050 FM |
32 | wxCursor(const wxString& name, |
33 | wxBitmapType type = wxCURSOR_DEFAULT_TYPE, | |
34 | int hotSpotX = 0, int hotSpotY = 0); | |
7eff657c | 35 | #endif |
f4efd805 FM |
36 | wxCursor( const char bits[], int width, int height, |
37 | int hotSpotX = -1, int hotSpotY = -1, | |
8f884a0d | 38 | const char maskBits[] = NULL, |
f4efd805 | 39 | const wxColour* fg = NULL, const wxColour* bg = NULL); |
d3c7fc99 | 40 | virtual ~wxCursor(); |
8bbe427f | 41 | |
20e05ffb RR |
42 | // implementation |
43 | ||
8bbe427f | 44 | GdkCursor *GetCursor() const; |
c801d85f | 45 | |
8f884a0d | 46 | protected: |
0ef5b1da | 47 | void InitFromStock(wxStockCursor); |
d6764050 FM |
48 | #if wxUSE_IMAGE |
49 | void InitFromImage(const wxImage& image); | |
50 | #endif | |
0ef5b1da | 51 | |
8f884a0d VZ |
52 | virtual wxGDIRefData *CreateGDIRefData() const; |
53 | virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; | |
54 | ||
20e05ffb RR |
55 | private: |
56 | DECLARE_DYNAMIC_CLASS(wxCursor) | |
c801d85f KB |
57 | }; |
58 | ||
0416c418 | 59 | #endif // _WX_GTK_CURSOR_H_ |