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 {
58 // **** bool GetSessionEnding();
60 void Veto(bool veto = TRUE);
62 void SetForce(bool force);
63 void SetCanVeto(bool canVeto);
64 void SetLoggingOff(bool loggingOff);
68 //---------------------------------------------------------------------------
70 class wxCommandEvent : public wxEvent {
82 //---------------------------------------------------------------------------
84 class wxScrollEvent: public wxCommandEvent {
90 //---------------------------------------------------------------------------
92 class wxSpinEvent : public wxScrollEvent {
97 //---------------------------------------------------------------------------
99 class wxMouseEvent: public wxEvent {
102 bool ButtonDown(int but = -1);
103 bool ButtonDClick(int but = -1);
104 bool ButtonUp(int but = -1);
105 bool Button(int but);
106 bool ButtonIsDown(int but);
127 void Position(long *OUTPUT, long *OUTPUT);
128 wxPoint GetPosition();
129 wxPoint GetLogicalPosition(const wxDC& dc);
134 //---------------------------------------------------------------------------
136 class wxKeyEvent: public wxEvent {
143 void Position(float *OUTPUT, float *OUTPUT);
148 //---------------------------------------------------------------------------
150 class wxMoveEvent: public wxEvent {
152 wxPoint GetPosition();
155 //---------------------------------------------------------------------------
157 class wxPaintEvent: public wxEvent {
162 //---------------------------------------------------------------------------
164 class wxEraseEvent: public wxEvent {
169 //---------------------------------------------------------------------------
171 class wxFocusEvent: public wxEvent {
176 //---------------------------------------------------------------------------
178 class wxActivateEvent: public wxEvent{
183 //---------------------------------------------------------------------------
185 class wxInitDialogEvent: public wxEvent {
190 //---------------------------------------------------------------------------
192 class wxMenuEvent: public wxEvent {
197 //---------------------------------------------------------------------------
199 class wxShowEvent: public wxEvent {
201 void SetShow(bool show);
205 //---------------------------------------------------------------------------
207 class wxIconizeEvent: public wxEvent {
211 //---------------------------------------------------------------------------
213 class wxMaximizeEvent: public wxEvent {
218 //---------------------------------------------------------------------------
220 class wxJoystickEvent: public wxEvent {
222 wxPoint GetPosition();
224 int GetButtonState();
225 int GetButtonChange();
227 void SetJoystick(int stick);
228 void SetButtonState(int state);
229 void SetButtonChange(int change);
230 void SetPosition(const wxPoint& pos);
231 void SetZPosition(int zPos);
235 bool ButtonDown(int but = wxJOY_BUTTON_ANY);
236 bool ButtonUp(int but = wxJOY_BUTTON_ANY);
237 bool ButtonIsDown(int but = wxJOY_BUTTON_ANY);
240 //---------------------------------------------------------------------------
242 class wxDropFilesEvent: public wxEvent {
244 wxPoint GetPosition();
245 int GetNumberOfFiles();
248 PyObject* GetFiles() {
249 int count = self->GetNumberOfFiles();
250 wxString* files = self->GetFiles();
251 PyObject* list = PyList_New(count);
254 PyErr_SetString(PyExc_MemoryError, "Can't allocate list of files!");
258 for (int i=0; i<count; i++) {
259 PyList_SetItem(list, i, PyString_FromString((const char*)files[i]));
266 //---------------------------------------------------------------------------
268 class wxIdleEvent: public wxEvent {
270 void RequestMore(bool needMore = TRUE);
271 bool MoreRequested();
274 //---------------------------------------------------------------------------
276 class wxUpdateUIEvent: public wxEvent {
282 bool GetSetChecked();
283 bool GetSetEnabled();
285 void Check(bool check);
286 void Enable(bool enable);
287 void SetText(const wxString& text);
290 //---------------------------------------------------------------------------
292 class wxSysColourChangedEvent: public wxEvent {
297 //---------------------------------------------------------------------------
300 /////////////////////////////////////////////////////////////////////////////
303 // Revision 1.5 1998/12/15 20:41:17 RD
304 // Changed the import semantics from "from wxPython import *" to "from
305 // wxPython.wx import *" This is for people who are worried about
306 // namespace pollution, they can use "from wxPython import wx" and then
307 // prefix all the wxPython identifiers with "wx."
309 // Added wxTaskbarIcon for wxMSW.
311 // Made the events work for wxGrid.
315 // Added wxMiniFrame for wxGTK, (untested.)
317 // Changed many of the args and return values that were pointers to gdi
318 // objects to references to reflect changes in the wxWindows API.
320 // Other assorted fixes and additions.
322 // Revision 1.4 1998/11/16 00:00:55 RD
323 // Generic treectrl for wxPython/GTK compiles...
325 // Revision 1.3 1998/10/20 06:43:56 RD
326 // New wxTreeCtrl wrappers (untested)
327 // some changes in helpers
330 // Revision 1.2 1998/08/15 07:36:33 RD
331 // - Moved the header in the .i files out of the code that gets put into
332 // the .cpp files. It caused CVS conflicts because of the RCS ID being
333 // different each time.
335 // - A few minor fixes.
337 // Revision 1.1 1998/08/09 08:25:50 RD