1//--------------------------------------------------------------------------- 2// This file is generated by wxPython's SIP generator. Do not edit by hand. 3// 4// Copyright: (c) 2018 by Total Control Software 5// License: wxWindows License 6// 7// This file will be included by _core.sip 8// 9//--------------------------------------------------------------------------- 10 11//--------------------------------------------------------------------------- 12 13class wxCursor : wxGDIObject 14{ 15 %Docstring 16 Cursor() 17 Cursor(cursorName, type=BITMAP_TYPE_ANY, hotSpotX=0, hotSpotY=0) 18 Cursor(cursorId) 19 Cursor(image) 20 Cursor(cursor) 21 22 A cursor is a small bitmap usually used for denoting where the mouse 23 pointer is, with a picture that might indicate the interpretation of a 24 mouse click. 25 %End 26 %TypeHeaderCode 27 #include <wx/cursor.h> 28 %End 29 30public: 31 wxCursor(); 32 33 wxCursor( 34 const wxString & cursorName, 35 wxBitmapType type = wxBITMAP_TYPE_ANY, 36 int hotSpotX = 0, 37 int hotSpotY = 0 38 ); 39 %PreMethodCode 40 if (!wxPyCheckForApp()) return NULL; 41 %End 42 43 wxCursor( 44 wxStockCursor cursorId 45 ); 46 %PreMethodCode 47 if (!wxPyCheckForApp()) return NULL; 48 %End 49 50 wxCursor( 51 const wxImage & image 52 ); 53 %PreMethodCode 54 if (!wxPyCheckForApp()) return NULL; 55 %End 56 57 wxCursor( 58 const wxCursor & cursor 59 ); 60 %PreMethodCode 61 if (!wxPyCheckForApp()) return NULL; 62 %End 63 64 virtual 65 ~wxCursor(); 66 67 virtual 68 bool IsOk() const; 69 %Docstring 70 IsOk() -> bool 71 72 Returns true if cursor data is present. 73 %End 74 75 int __nonzero__(); 76 %Docstring 77 __nonzero__() -> int 78 %End 79 %MethodCode 80 PyErr_Clear(); 81 Py_BEGIN_ALLOW_THREADS 82 sipRes = _wxCursor___nonzero__(sipCpp); 83 Py_END_ALLOW_THREADS 84 if (PyErr_Occurred()) sipIsErr = 1; 85 %End 86 %TypeCode 87 int _wxCursor___nonzero__(wxCursor* self) 88 { 89 return self->IsOk(); 90 } 91 %End 92 93 int __bool__(); 94 %Docstring 95 __bool__() -> int 96 %End 97 %MethodCode 98 PyErr_Clear(); 99 Py_BEGIN_ALLOW_THREADS 100 sipRes = _wxCursor___bool__(sipCpp); 101 Py_END_ALLOW_THREADS 102 if (PyErr_Occurred()) sipIsErr = 1; 103 %End 104 %TypeCode 105 int _wxCursor___bool__(wxCursor* self) 106 { 107 return self->IsOk(); 108 } 109 %End 110 111 long GetHandle(); 112 %Docstring 113 GetHandle() -> long 114 115 Get the handle for the Cursor. Windows only. 116 %End 117 %MethodCode 118 PyErr_Clear(); 119 Py_BEGIN_ALLOW_THREADS 120 sipRes = _wxCursor_GetHandle(sipCpp); 121 Py_END_ALLOW_THREADS 122 if (PyErr_Occurred()) sipIsErr = 1; 123 %End 124 %TypeCode 125 long _wxCursor_GetHandle(wxCursor* self) 126 { 127 #ifdef __WXMSW__ 128 return (long)self->GetHandle(); 129 #else 130 return 0; 131 #endif 132 } 133 %End 134 135 void SetHandle(long handle); 136 %Docstring 137 SetHandle(handle) 138 139 Set the handle to use for this Cursor. Windows only. 140 %End 141 %MethodCode 142 PyErr_Clear(); 143 Py_BEGIN_ALLOW_THREADS 144 _wxCursor_SetHandle(sipCpp, handle); 145 Py_END_ALLOW_THREADS 146 if (PyErr_Occurred()) sipIsErr = 1; 147 %End 148 %TypeCode 149 void _wxCursor_SetHandle(wxCursor* self, long handle) 150 { 151 #ifdef __WXMSW__ 152 self->SetHandle((WXHANDLE)handle); 153 #endif 154 } 155 %End 156 157 void _copyFrom(const wxCursor* other); 158 %Docstring 159 _copyFrom(other) 160 161 For internal use only. 162 %End 163 %MethodCode 164 PyErr_Clear(); 165 Py_BEGIN_ALLOW_THREADS 166 _wxCursor__copyFrom(sipCpp, other); 167 Py_END_ALLOW_THREADS 168 if (PyErr_Occurred()) sipIsErr = 1; 169 %End 170 %TypeCode 171 void _wxCursor__copyFrom(wxCursor* self, const wxCursor* other) 172 { 173 *self = *other; 174 } 175 %End 176 177 public: 178 179 180 %Property(name=Handle, get=GetHandle, set=SetHandle) 181}; // end of class wxCursor 182 183 184wxCursor wxNullCursor; 185 186%Extract(id=pycode_core) 187# These stock cursors will be initialized when the wx.App object is created. 188STANDARD_CURSOR = Cursor() 189HOURGLASS_CURSOR = Cursor() 190CROSS_CURSOR = Cursor() 191 192%End 193 194%Extract(id=pycode_core) 195StockCursor = wx.deprecated(Cursor, "Use Cursor instead.") 196 197%End 198 199%Extract(id=pycode_core) 200CursorFromImage = wx.deprecated(Cursor, "Use Cursor instead.") 201 202%End 203 204 205//--------------------------------------------------------------------------- 206 207