]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/events.i
compilation fix for recent commit
[wxWidgets.git] / wxPython / src / events.i
index 03c1a0d1bb8557d66676fc7432294a8f052f6d37..9b1ef3743193319848d2ed638a59d9ded2557295 100644 (file)
@@ -35,7 +35,7 @@ int wxNewEventType();
 
 class wxEvent : public wxObject {
 public:
 
 class wxEvent : public wxObject {
 public:
-    wxEvent(int id = 0);
+    // wxEvent(int id = 0);     // *** This class is now an ABC
     ~wxEvent();
 
     wxObject* GetEventObject();
     ~wxEvent();
 
     wxObject* GetEventObject();
@@ -48,6 +48,8 @@ public:
     void SetId(int id);
     void SetTimestamp(long timeStamp);
     void Skip(bool skip = TRUE);
     void SetId(int id);
     void SetTimestamp(long timeStamp);
     void Skip(bool skip = TRUE);
+
+    wxEvent *Clone();
 };
 
 //---------------------------------------------------------------------------
 };
 
 //---------------------------------------------------------------------------
@@ -89,6 +91,18 @@ public:
     void SetExtraLong(long extraLong);
     void SetInt(int i);
 
     void SetExtraLong(long extraLong);
     void SetInt(int i);
 
+    %addmethods {
+        PyObject* GetClientData() {
+            wxPyClientData* data = (wxPyClientData*)self->GetClientObject();
+            if (data) {
+                Py_INCREF(data->m_obj);
+                return data->m_obj;
+            } else {
+                Py_INCREF(Py_None);
+                return Py_None;
+            }
+        }
+    }
 };
 
 
 };
 
 
@@ -255,6 +269,18 @@ public:
     wxFocusEvent(WXTYPE eventType = 0, int id = 0);
 };
 
     wxFocusEvent(WXTYPE eventType = 0, int id = 0);
 };
 
+//---------------------------------------------------------------------------
+
+// wxChildFocusEvent notifies the parent that a child has got the focus: unlike
+// wxFocusEvent it is propgated upwards the window chain
+class  wxChildFocusEvent : public wxCommandEvent
+{
+public:
+    wxChildFocusEvent(wxWindow *win = NULL);
+    wxWindow *GetWindow() const;
+};
+
+
 //---------------------------------------------------------------------------
 
 class wxActivateEvent: public wxEvent{
 //---------------------------------------------------------------------------
 
 class wxActivateEvent: public wxEvent{
@@ -446,6 +472,17 @@ public:
     int GetInterval();
 };
 
     int GetInterval();
 };
 
+//---------------------------------------------------------------------------
+
+class wxTextUrlEvent : public wxCommandEvent
+{
+public:
+    wxTextUrlEvent(int id, const wxMouseEvent& evtMouse,
+                   long start, long end);
+    const wxMouseEvent& GetMouseEvent();
+    long GetURLStart();
+    long GetURLEnd();
+};
 
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------
 
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------