1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIGgable Event classes for wxPython
9 // Copyright: (c) 1998 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
20 //----------------------------------------------------------------------
23 %include my_typemaps.i
25 // Import some definitions of other classes, etc.
29 //---------------------------------------------------------------------------
33 wxObject* GetEventObject();
34 wxEventType GetEventType();
38 void SetEventObject(wxObject* object);
39 void SetEventType(wxEventType typ);
41 void SetTimestamp(long timeStamp);
42 void Skip(bool skip = TRUE);
45 //---------------------------------------------------------------------------
47 class wxSizeEvent : public wxEvent {
52 //---------------------------------------------------------------------------
54 class wxCloseEvent : public wxEvent {
56 // ??? it's in the docs ??? bool GetSessionEnding();
58 void Veto(bool veto = TRUE);
60 void SetForce(bool force);
64 //---------------------------------------------------------------------------
66 class wxCommandEvent : public wxEvent {
78 //---------------------------------------------------------------------------
80 class wxScrollEvent: public wxCommandEvent {
86 //---------------------------------------------------------------------------
88 class wxMouseEvent: public wxEvent {
91 bool ButtonDown(int but = -1);
92 bool ButtonDClick(int but = -1);
93 bool ButtonUp(int but = -1);
95 bool ButtonIsDown(int but);
116 void Position(long *OUTPUT, long *OUTPUT);
117 wxPoint GetPosition();
118 wxPoint GetLogicalPosition(const wxDC& dc);
123 //---------------------------------------------------------------------------
125 class wxKeyEvent: public wxEvent {
132 void Position(float *OUTPUT, float *OUTPUT);
137 //---------------------------------------------------------------------------
139 class wxMoveEvent: public wxEvent {
141 wxPoint GetPosition();
144 //---------------------------------------------------------------------------
146 class wxPaintEvent: public wxEvent {
151 //---------------------------------------------------------------------------
153 class wxEraseEvent: public wxEvent {
158 //---------------------------------------------------------------------------
160 class wxFocusEvent: public wxEvent {
165 //---------------------------------------------------------------------------
167 class wxActivateEvent: public wxEvent{
172 //---------------------------------------------------------------------------
174 class wxInitDialogEvent: public wxEvent {
179 //---------------------------------------------------------------------------
181 class wxMenuEvent: public wxEvent {
186 //---------------------------------------------------------------------------
188 class wxShowEvent: public wxEvent {
190 void SetShow(bool show);
194 //---------------------------------------------------------------------------
196 class wxIconizeEvent: public wxEvent {
200 //---------------------------------------------------------------------------
202 class wxMaximizeEvent: public wxEvent {
207 //---------------------------------------------------------------------------
209 class wxJoystickEvent: public wxEvent {
211 wxPoint GetPosition();
213 int GetButtonState();
214 int GetButtonChange();
216 void SetJoystick(int stick);
217 void SetButtonState(int state);
218 void SetButtonChange(int change);
219 void SetPosition(const wxPoint& pos);
220 void SetZPosition(int zPos);
224 bool ButtonDown(int but = wxJOY_BUTTON_ANY);
225 bool ButtonUp(int but = wxJOY_BUTTON_ANY);
226 bool ButtonIsDown(int but = wxJOY_BUTTON_ANY);
229 //---------------------------------------------------------------------------
231 class wxDropFilesEvent: public wxEvent {
233 wxPoint GetPosition();
234 int GetNumberOfFiles();
237 PyObject* GetFiles() {
238 int count = self->GetNumberOfFiles();
239 wxString* files = self->GetFiles();
240 PyObject* list = PyList_New(count);
243 PyErr_SetString(PyExc_MemoryError, "Can't allocate list of files!");
247 for (int i=0; i<count; i++) {
248 PyList_SetItem(list, i, PyString_FromString((const char*)files[i]));
255 //---------------------------------------------------------------------------
257 class wxIdleEvent: public wxEvent {
259 void RequestMore(bool needMore = TRUE);
260 bool MoreRequested();
263 //---------------------------------------------------------------------------
265 class wxUpdateUIEvent: public wxEvent {
271 bool GetSetChecked();
272 bool GetSetEnabled();
274 void Check(bool check);
275 void Enable(bool enable);
276 void SetText(const wxString& text);
279 //---------------------------------------------------------------------------
281 class wxSysColourChangedEvent: public wxEvent {
286 //---------------------------------------------------------------------------
289 /////////////////////////////////////////////////////////////////////////////
292 // Revision 1.3 1998/10/20 06:43:56 RD
293 // New wxTreeCtrl wrappers (untested)
294 // some changes in helpers
297 // Revision 1.2 1998/08/15 07:36:33 RD
298 // - Moved the header in the .i files out of the code that gets put into
299 // the .cpp files. It caused CVS conflicts because of the RCS ID being
300 // different each time.
302 // - A few minor fixes.
304 // Revision 1.1 1998/08/09 08:25:50 RD