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 // ??? it's in the docs ??? bool GetSessionEnding();
59 void Veto(bool veto = TRUE);
61 void SetForce(bool force);
65 //---------------------------------------------------------------------------
67 class wxCommandEvent : public wxEvent {
79 //---------------------------------------------------------------------------
81 class wxScrollEvent: public wxCommandEvent {
87 //---------------------------------------------------------------------------
89 class wxSpinEvent : public wxScrollEvent {
94 //---------------------------------------------------------------------------
96 class wxMouseEvent: public wxEvent {
99 bool ButtonDown(int but = -1);
100 bool ButtonDClick(int but = -1);
101 bool ButtonUp(int but = -1);
102 bool Button(int but);
103 bool ButtonIsDown(int but);
124 void Position(long *OUTPUT, long *OUTPUT);
125 wxPoint GetPosition();
126 wxPoint GetLogicalPosition(const wxDC& dc);
131 //---------------------------------------------------------------------------
133 class wxKeyEvent: public wxEvent {
140 void Position(float *OUTPUT, float *OUTPUT);
145 //---------------------------------------------------------------------------
147 class wxMoveEvent: public wxEvent {
149 wxPoint GetPosition();
152 //---------------------------------------------------------------------------
154 class wxPaintEvent: public wxEvent {
159 //---------------------------------------------------------------------------
161 class wxEraseEvent: public wxEvent {
166 //---------------------------------------------------------------------------
168 class wxFocusEvent: public wxEvent {
173 //---------------------------------------------------------------------------
175 class wxActivateEvent: public wxEvent{
180 //---------------------------------------------------------------------------
182 class wxInitDialogEvent: public wxEvent {
187 //---------------------------------------------------------------------------
189 class wxMenuEvent: public wxEvent {
194 //---------------------------------------------------------------------------
196 class wxShowEvent: public wxEvent {
198 void SetShow(bool show);
202 //---------------------------------------------------------------------------
204 class wxIconizeEvent: public wxEvent {
208 //---------------------------------------------------------------------------
210 class wxMaximizeEvent: public wxEvent {
215 //---------------------------------------------------------------------------
217 class wxJoystickEvent: public wxEvent {
219 wxPoint GetPosition();
221 int GetButtonState();
222 int GetButtonChange();
224 void SetJoystick(int stick);
225 void SetButtonState(int state);
226 void SetButtonChange(int change);
227 void SetPosition(const wxPoint& pos);
228 void SetZPosition(int zPos);
232 bool ButtonDown(int but = wxJOY_BUTTON_ANY);
233 bool ButtonUp(int but = wxJOY_BUTTON_ANY);
234 bool ButtonIsDown(int but = wxJOY_BUTTON_ANY);
237 //---------------------------------------------------------------------------
239 class wxDropFilesEvent: public wxEvent {
241 wxPoint GetPosition();
242 int GetNumberOfFiles();
245 PyObject* GetFiles() {
246 int count = self->GetNumberOfFiles();
247 wxString* files = self->GetFiles();
248 PyObject* list = PyList_New(count);
251 PyErr_SetString(PyExc_MemoryError, "Can't allocate list of files!");
255 for (int i=0; i<count; i++) {
256 PyList_SetItem(list, i, PyString_FromString((const char*)files[i]));
263 //---------------------------------------------------------------------------
265 class wxIdleEvent: public wxEvent {
267 void RequestMore(bool needMore = TRUE);
268 bool MoreRequested();
271 //---------------------------------------------------------------------------
273 class wxUpdateUIEvent: public wxEvent {
279 bool GetSetChecked();
280 bool GetSetEnabled();
282 void Check(bool check);
283 void Enable(bool enable);
284 void SetText(const wxString& text);
287 //---------------------------------------------------------------------------
289 class wxSysColourChangedEvent: public wxEvent {
294 //---------------------------------------------------------------------------
297 /////////////////////////////////////////////////////////////////////////////
300 // Revision 1.4 1998/11/16 00:00:55 RD
301 // Generic treectrl for wxPython/GTK compiles...
303 // Revision 1.3 1998/10/20 06:43:56 RD
304 // New wxTreeCtrl wrappers (untested)
305 // some changes in helpers
308 // Revision 1.2 1998/08/15 07:36:33 RD
309 // - Moved the header in the .i files out of the code that gets put into
310 // the .cpp files. It caused CVS conflicts because of the RCS ID being
311 // different each time.
313 // - A few minor fixes.
315 // Revision 1.1 1998/08/09 08:25:50 RD