]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/gtk1/cursor.h | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
5 | // Copyright: (c) 1998 Robert Roebling | |
6 | // Licence: wxWindows licence | |
7 | ///////////////////////////////////////////////////////////////////////////// | |
8 | ||
9 | #ifndef __GTKCURSORH__ | |
10 | #define __GTKCURSORH__ | |
11 | ||
12 | #include "wx/gdiobj.h" | |
13 | #include "wx/gdicmn.h" | |
14 | ||
15 | #if wxUSE_IMAGE | |
16 | #include "wx/image.h" | |
17 | #endif | |
18 | ||
19 | //----------------------------------------------------------------------------- | |
20 | // wxCursor | |
21 | //----------------------------------------------------------------------------- | |
22 | ||
23 | class WXDLLIMPEXP_CORE wxCursor : public wxGDIObject | |
24 | { | |
25 | public: | |
26 | wxCursor(); | |
27 | wxCursor(wxStockCursor id) { InitFromStock(id); } | |
28 | #if WXWIN_COMPATIBILITY_2_8 | |
29 | wxCursor(int id) { InitFromStock((wxStockCursor)id); } | |
30 | #endif | |
31 | #if wxUSE_IMAGE | |
32 | wxCursor( const wxImage & image ); | |
33 | #endif | |
34 | wxCursor( const char bits[], int width, int height, | |
35 | int hotSpotX=-1, int hotSpotY=-1, | |
36 | const char maskBits[] = NULL, | |
37 | const wxColour* fg = NULL, const wxColour* bg = NULL); | |
38 | ||
39 | /* WARNING: the following ctor is missing: | |
40 | ||
41 | wxCursor(const wxString& name, | |
42 | wxBitmapType type = wxCURSOR_DEFAULT_TYPE, | |
43 | int hotSpotX = 0, int hotSpotY = 0); | |
44 | */ | |
45 | ||
46 | virtual ~wxCursor(); | |
47 | ||
48 | // implementation | |
49 | ||
50 | GdkCursor *GetCursor() const; | |
51 | ||
52 | protected: | |
53 | void InitFromStock(wxStockCursor); | |
54 | ||
55 | virtual wxGDIRefData *CreateGDIRefData() const; | |
56 | virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; | |
57 | ||
58 | private: | |
59 | DECLARE_DYNAMIC_CLASS(wxCursor) | |
60 | }; | |
61 | ||
62 | #endif // __GTKCURSORH__ |