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 wxScrollWinEvent: public wxEvent {
94 //---------------------------------------------------------------------------
96 class wxSpinEvent : public wxScrollEvent {
101 //---------------------------------------------------------------------------
103 class wxMouseEvent: public wxEvent {
106 bool ButtonDown(int but = -1);
107 bool ButtonDClick(int but = -1);
108 bool ButtonUp(int but = -1);
109 bool Button(int but);
110 bool ButtonIsDown(int but);
131 void Position(long *OUTPUT, long *OUTPUT);
132 wxPoint GetPosition();
133 wxPoint GetLogicalPosition(const wxDC& dc);
138 //---------------------------------------------------------------------------
140 class wxKeyEvent: public wxEvent {
150 //---------------------------------------------------------------------------
152 class wxMoveEvent: public wxEvent {
154 wxPoint GetPosition();
157 //---------------------------------------------------------------------------
159 class wxPaintEvent: public wxEvent {
164 //---------------------------------------------------------------------------
166 class wxEraseEvent: public wxEvent {
171 //---------------------------------------------------------------------------
173 class wxFocusEvent: public wxEvent {
178 //---------------------------------------------------------------------------
180 class wxActivateEvent: public wxEvent{
185 //---------------------------------------------------------------------------
187 class wxInitDialogEvent: public wxEvent {
192 //---------------------------------------------------------------------------
194 class wxMenuEvent: public wxEvent {
199 //---------------------------------------------------------------------------
201 class wxShowEvent: public wxEvent {
203 void SetShow(bool show);
207 //---------------------------------------------------------------------------
209 class wxIconizeEvent: public wxEvent {
213 //---------------------------------------------------------------------------
215 class wxMaximizeEvent: public wxEvent {
220 //---------------------------------------------------------------------------
222 class wxJoystickEvent: public wxEvent {
224 wxPoint GetPosition();
226 int GetButtonState();
227 int GetButtonChange();
229 void SetJoystick(int stick);
230 void SetButtonState(int state);
231 void SetButtonChange(int change);
232 void SetPosition(const wxPoint& pos);
233 void SetZPosition(int zPos);
237 bool ButtonDown(int but = wxJOY_BUTTON_ANY);
238 bool ButtonUp(int but = wxJOY_BUTTON_ANY);
239 bool ButtonIsDown(int but = wxJOY_BUTTON_ANY);
242 //---------------------------------------------------------------------------
244 class wxDropFilesEvent: public wxEvent {
246 wxPoint GetPosition();
247 int GetNumberOfFiles();
250 PyObject* GetFiles() {
251 int count = self->GetNumberOfFiles();
252 wxString* files = self->GetFiles();
253 PyObject* list = PyList_New(count);
256 PyErr_SetString(PyExc_MemoryError, "Can't allocate list of files!");
260 for (int i=0; i<count; i++) {
261 PyList_SetItem(list, i, PyString_FromString((const char*)files[i]));
268 //---------------------------------------------------------------------------
270 class wxIdleEvent: public wxEvent {
272 void RequestMore(bool needMore = TRUE);
273 bool MoreRequested();
276 //---------------------------------------------------------------------------
278 class wxUpdateUIEvent: public wxEvent {
284 bool GetSetChecked();
285 bool GetSetEnabled();
287 void Check(bool check);
288 void Enable(bool enable);
289 void SetText(const wxString& text);
292 //---------------------------------------------------------------------------
294 class wxSysColourChangedEvent: public wxEvent {
299 //---------------------------------------------------------------------------
301 class wxPyEvent : public wxCommandEvent {
303 wxPyEvent(wxEventType commandType = wxEVT_NULL, PyObject* userData = Py_None);
306 void SetUserData(PyObject* userData);
307 PyObject* GetUserData();
312 //---------------------------------------------------------------------------
314 class wxNotifyEvent : public wxCommandEvent {
320 //---------------------------------------------------------------------------
321 //---------------------------------------------------------------------------