1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIGgable Event classes for wxPython
9 // Copyright: (c) 1998 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
18 #include <wx/spinbutt.h>
21 //----------------------------------------------------------------------
24 %include my_typemaps.i
26 // Import some definitions of other classes, etc.
30 //---------------------------------------------------------------------------
34 wxObject* GetEventObject();
35 wxEventType GetEventType();
39 void SetEventObject(wxObject* object);
40 void SetEventType(wxEventType typ);
42 void SetTimestamp(long timeStamp);
43 void Skip(bool skip = TRUE);
46 //---------------------------------------------------------------------------
48 class wxSizeEvent : public wxEvent {
53 //---------------------------------------------------------------------------
55 class wxCloseEvent : public wxEvent {
57 void SetLoggingOff(bool loggingOff);
59 void Veto(bool veto = TRUE);
62 void SetCanVeto(bool canVeto);
65 //---------------------------------------------------------------------------
67 class wxCommandEvent : public wxEvent {
78 //---------------------------------------------------------------------------
80 class wxScrollEvent: public wxCommandEvent {
86 //---------------------------------------------------------------------------
88 class wxSpinEvent : public wxScrollEvent {
93 //---------------------------------------------------------------------------
95 class wxMouseEvent: public wxEvent {
98 bool ButtonDown(int but = -1);
99 bool ButtonDClick(int but = -1);
100 bool ButtonUp(int but = -1);
101 bool Button(int but);
102 bool ButtonIsDown(int but);
123 void Position(long *OUTPUT, long *OUTPUT);
124 wxPoint GetPosition();
125 wxPoint GetLogicalPosition(const wxDC& dc);
130 //---------------------------------------------------------------------------
132 class wxKeyEvent: public wxEvent {
142 //---------------------------------------------------------------------------
144 class wxMoveEvent: public wxEvent {
146 wxPoint GetPosition();
149 //---------------------------------------------------------------------------
151 class wxPaintEvent: public wxEvent {
156 //---------------------------------------------------------------------------
158 class wxEraseEvent: public wxEvent {
163 //---------------------------------------------------------------------------
165 class wxFocusEvent: public wxEvent {
170 //---------------------------------------------------------------------------
172 class wxActivateEvent: public wxEvent{
177 //---------------------------------------------------------------------------
179 class wxInitDialogEvent: public wxEvent {
184 //---------------------------------------------------------------------------
186 class wxMenuEvent: public wxEvent {
191 //---------------------------------------------------------------------------
193 class wxShowEvent: public wxEvent {
195 void SetShow(bool show);
199 //---------------------------------------------------------------------------
201 class wxIconizeEvent: public wxEvent {
205 //---------------------------------------------------------------------------
207 class wxMaximizeEvent: public wxEvent {
212 //---------------------------------------------------------------------------
214 class wxJoystickEvent: public wxEvent {
216 wxPoint GetPosition();
218 int GetButtonState();
219 int GetButtonChange();
221 void SetJoystick(int stick);
222 void SetButtonState(int state);
223 void SetButtonChange(int change);
224 void SetPosition(const wxPoint& pos);
225 void SetZPosition(int zPos);
229 bool ButtonDown(int but = wxJOY_BUTTON_ANY);
230 bool ButtonUp(int but = wxJOY_BUTTON_ANY);
231 bool ButtonIsDown(int but = wxJOY_BUTTON_ANY);
234 //---------------------------------------------------------------------------
236 class wxDropFilesEvent: public wxEvent {
238 wxPoint GetPosition();
239 int GetNumberOfFiles();
242 PyObject* GetFiles() {
243 int count = self->GetNumberOfFiles();
244 wxString* files = self->GetFiles();
245 PyObject* list = PyList_New(count);
248 PyErr_SetString(PyExc_MemoryError, "Can't allocate list of files!");
252 for (int i=0; i<count; i++) {
253 PyList_SetItem(list, i, PyString_FromString((const char*)files[i]));
260 //---------------------------------------------------------------------------
262 class wxIdleEvent: public wxEvent {
264 void RequestMore(bool needMore = TRUE);
265 bool MoreRequested();
268 //---------------------------------------------------------------------------
270 class wxUpdateUIEvent: public wxEvent {
276 bool GetSetChecked();
277 bool GetSetEnabled();
279 void Check(bool check);
280 void Enable(bool enable);
281 void SetText(const wxString& text);
284 //---------------------------------------------------------------------------
286 class wxSysColourChangedEvent: public wxEvent {
291 //---------------------------------------------------------------------------
293 class wxPyEvent : public wxCommandEvent {
295 wxPyEvent(wxEventType commandType = wxEVT_NULL, PyObject* userData = Py_None);
298 void SetUserData(PyObject* userData);
299 PyObject* GetUserData();
304 //---------------------------------------------------------------------------
306 class wxNotifyEvent : public wxCommandEvent {
312 //---------------------------------------------------------------------------
313 //---------------------------------------------------------------------------