1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG interface for wxCursor
7 // Created: 7-July-1997
9 // Copyright: (c) 2003 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
16 //---------------------------------------------------------------------------
18 class wxCursor : public wxGDIObject
22 wxCursor(const wxString* cursorName, long flags, int hotSpotX=0, int hotSpotY=0) {
24 wxCHECK_MSG(False, NULL,
25 wxT("wxCursor constructor not implemented for wxGTK, use wxStockCursor, wxCursorFromImage, or wxCursorFromBits instead."));
27 return new wxCursor(*cursorName, flags, hotSpotX, hotSpotY);
34 // alternate constructors
35 %name(StockCursor) wxCursor(int id);
36 %name(CursorFromImage) wxCursor(const wxImage& image);
38 %name(CursorFromBits) wxCursor(PyObject* bits, int width, int height,
39 int hotSpotX=-1, int hotSpotY=-1,
40 PyObject* maskBits=0) {
44 PyString_AsStringAndSize(bits, &bitsbuf, &length);
46 PyString_AsStringAndSize(maskBits, &maskbuf, &length);
47 return new wxCursor(bitsbuf, width, height, hotSpotX, hotSpotY, maskbuf);
54 void SetHandle(long handle);
64 void SetHeight(int h);
66 void SetSize(const wxSize& size);
69 %pythoncode { def __nonzero__(self): return self.Ok() }
73 //---------------------------------------------------------------------------
74 //---------------------------------------------------------------------------