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 {
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 {
141 // void Position(float *OUTPUT, float *OUTPUT);
146 //---------------------------------------------------------------------------
148 class wxMoveEvent: public wxEvent {
150 wxPoint GetPosition();
153 //---------------------------------------------------------------------------
155 class wxPaintEvent: public wxEvent {
160 //---------------------------------------------------------------------------
162 class wxEraseEvent: public wxEvent {
167 //---------------------------------------------------------------------------
169 class wxFocusEvent: public wxEvent {
174 //---------------------------------------------------------------------------
176 class wxActivateEvent: public wxEvent{
181 //---------------------------------------------------------------------------
183 class wxInitDialogEvent: public wxEvent {
188 //---------------------------------------------------------------------------
190 class wxMenuEvent: public wxEvent {
195 //---------------------------------------------------------------------------
197 class wxShowEvent: public wxEvent {
199 void SetShow(bool show);
203 //---------------------------------------------------------------------------
205 class wxIconizeEvent: public wxEvent {
209 //---------------------------------------------------------------------------
211 class wxMaximizeEvent: public wxEvent {
216 //---------------------------------------------------------------------------
218 class wxJoystickEvent: public wxEvent {
220 wxPoint GetPosition();
222 int GetButtonState();
223 int GetButtonChange();
225 void SetJoystick(int stick);
226 void SetButtonState(int state);
227 void SetButtonChange(int change);
228 void SetPosition(const wxPoint& pos);
229 void SetZPosition(int zPos);
233 bool ButtonDown(int but = wxJOY_BUTTON_ANY);
234 bool ButtonUp(int but = wxJOY_BUTTON_ANY);
235 bool ButtonIsDown(int but = wxJOY_BUTTON_ANY);
238 //---------------------------------------------------------------------------
240 class wxDropFilesEvent: public wxEvent {
242 wxPoint GetPosition();
243 int GetNumberOfFiles();
246 PyObject* GetFiles() {
247 int count = self->GetNumberOfFiles();
248 wxString* files = self->GetFiles();
249 PyObject* list = PyList_New(count);
252 PyErr_SetString(PyExc_MemoryError, "Can't allocate list of files!");
256 for (int i=0; i<count; i++) {
257 PyList_SetItem(list, i, PyString_FromString((const char*)files[i]));
264 //---------------------------------------------------------------------------
266 class wxIdleEvent: public wxEvent {
268 void RequestMore(bool needMore = TRUE);
269 bool MoreRequested();
272 //---------------------------------------------------------------------------
274 class wxUpdateUIEvent: public wxEvent {
280 bool GetSetChecked();
281 bool GetSetEnabled();
283 void Check(bool check);
284 void Enable(bool enable);
285 void SetText(const wxString& text);
288 //---------------------------------------------------------------------------
290 class wxSysColourChangedEvent: public wxEvent {
295 //---------------------------------------------------------------------------
298 /////////////////////////////////////////////////////////////////////////////
301 // Revision 1.6 1999/02/06 22:55:00 RD
302 // Follow up for changes in wxWindows to various event classes
304 // Revision 1.5 1998/12/15 20:41:17 RD
305 // Changed the import semantics from "from wxPython import *" to "from
306 // wxPython.wx import *" This is for people who are worried about
307 // namespace pollution, they can use "from wxPython import wx" and then
308 // prefix all the wxPython identifiers with "wx."
310 // Added wxTaskbarIcon for wxMSW.
312 // Made the events work for wxGrid.
316 // Added wxMiniFrame for wxGTK, (untested.)
318 // Changed many of the args and return values that were pointers to gdi
319 // objects to references to reflect changes in the wxWindows API.
321 // Other assorted fixes and additions.
323 // Revision 1.4 1998/11/16 00:00:55 RD
324 // Generic treectrl for wxPython/GTK compiles...
326 // Revision 1.3 1998/10/20 06:43:56 RD
327 // New wxTreeCtrl wrappers (untested)
328 // some changes in helpers
331 // Revision 1.2 1998/08/15 07:36:33 RD
332 // - Moved the header in the .i files out of the code that gets put into
333 // the .cpp files. It caused CVS conflicts because of the RCS ID being
334 // different each time.
336 // - A few minor fixes.
338 // Revision 1.1 1998/08/09 08:25:50 RD