3 /////////////////////////////////////////////////////////////////////////////
5 // Purpose: SWIGgable Event classes for wxPython
11 // Copyright: (c) 1998 by Total Control Software
12 // Licence: wxWindows license
13 /////////////////////////////////////////////////////////////////////////////
19 //----------------------------------------------------------------------
22 %include my_typemaps.i
24 // Import some definitions of other classes, etc.
28 //---------------------------------------------------------------------------
32 wxObject* GetEventObject();
33 wxEventType GetEventType();
37 void SetEventObject(wxObject* object);
38 void SetEventType(wxEventType typ);
40 void SetTimestamp(long timeStamp);
41 void Skip(bool skip = TRUE);
44 //---------------------------------------------------------------------------
46 class wxSizeEvent : public wxEvent {
51 //---------------------------------------------------------------------------
53 class wxCloseEvent : public wxEvent {
55 bool GetSessionEnding();
57 void Veto(bool veto = TRUE);
59 void SetForce(bool force);
63 //---------------------------------------------------------------------------
65 class wxCommandEvent : public wxEvent {
77 //---------------------------------------------------------------------------
79 class wxScrollEvent: public wxCommandEvent {
85 //---------------------------------------------------------------------------
87 class wxMouseEvent: public wxEvent {
90 bool ButtonDown(int but = -1);
91 bool ButtonDClick(int but = -1);
92 bool ButtonUp(int but = -1);
94 bool ButtonIsDown(int but);
115 void Position(long *OUTPUT, long *OUTPUT);
116 wxPoint GetPosition();
117 wxPoint GetLogicalPosition(const wxDC& dc);
122 //---------------------------------------------------------------------------
124 class wxKeyEvent: public wxEvent {
131 void Position(float *OUTPUT, float *OUTPUT);
136 //---------------------------------------------------------------------------
138 class wxMoveEvent: public wxEvent {
140 wxPoint GetPosition();
143 //---------------------------------------------------------------------------
145 class wxPaintEvent: public wxEvent {
150 //---------------------------------------------------------------------------
152 class wxEraseEvent: public wxEvent {
157 //---------------------------------------------------------------------------
159 class wxFocusEvent: public wxEvent {
164 //---------------------------------------------------------------------------
166 class wxActivateEvent: public wxEvent{
171 //---------------------------------------------------------------------------
173 class wxInitDialogEvent: public wxEvent {
178 //---------------------------------------------------------------------------
180 class wxMenuEvent: public wxEvent {
185 //---------------------------------------------------------------------------
187 class wxShowEvent: public wxEvent {
189 void SetShow(bool show);
193 //---------------------------------------------------------------------------
195 class wxIconizeEvent: public wxEvent {
199 //---------------------------------------------------------------------------
201 class wxMaximizeEvent: public wxEvent {
206 //---------------------------------------------------------------------------
208 class wxJoystickEvent: public wxEvent {
210 wxPoint GetPosition();
212 int GetButtonState();
213 int GetButtonChange();
215 void SetJoystick(int stick);
216 void SetButtonState(int state);
217 void SetButtonChange(int change);
218 void SetPosition(const wxPoint& pos);
219 void SetZPosition(int zPos);
223 bool ButtonDown(int but = wxJOY_BUTTON_ANY);
224 bool ButtonUp(int but = wxJOY_BUTTON_ANY);
225 bool ButtonIsDown(int but = wxJOY_BUTTON_ANY);
228 //---------------------------------------------------------------------------
230 class wxDropFilesEvent: public wxEvent {
232 wxPoint GetPosition();
233 int GetNumberOfFiles();
236 PyObject* GetFiles() {
237 int count = self->GetNumberOfFiles();
238 wxString* files = self->GetFiles();
239 PyObject* list = PyList_New(count);
242 PyErr_SetString(PyExc_MemoryError, "Can't allocate list of files!");
246 for (int i=0; i<count; i++) {
247 PyList_SetItem(list, i, PyString_FromString((const char*)files[i]));
254 //---------------------------------------------------------------------------
256 class wxIdleEvent: public wxEvent {
258 void RequestMore(bool needMore = TRUE);
259 bool MoreRequested();
262 //---------------------------------------------------------------------------
264 class wxUpdateUIEvent: public wxEvent {
270 bool GetSetChecked();
271 bool GetSetEnabled();
273 void Check(bool check);
274 void Enable(bool enable);
275 void SetText(const wxString& text);
278 //---------------------------------------------------------------------------
280 class wxSysColourChangedEvent: public wxEvent {
285 //---------------------------------------------------------------------------
288 /////////////////////////////////////////////////////////////////////////////
291 // Revision 1.1 1998/08/09 08:25:50 RD