X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/83b18bab391d242907d18b4b040720eae6202f76..a92b0cfd2bd0bef75b43c071df0b0e028f360d8e:/wxPython/src/events.i diff --git a/wxPython/src/events.i b/wxPython/src/events.i index d1454016dc..9b1ef37431 100644 --- a/wxPython/src/events.i +++ b/wxPython/src/events.i @@ -33,9 +33,9 @@ int wxNewEventType(); -class wxEvent { +class wxEvent : public wxObject { public: - wxEvent(int id = 0); + // wxEvent(int id = 0); // *** This class is now an ABC ~wxEvent(); wxObject* GetEventObject(); @@ -48,6 +48,8 @@ public: 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); + %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; + } + } + } }; @@ -160,6 +174,10 @@ public: long GetX(); long GetY(); + int GetWheelRotation() const { return m_wheelRotation; } + int GetWheelDelta() const { return m_wheelDelta; } + int GetLinesPerAction() const { return m_linesPerAction; } + long m_x, m_y; bool m_leftDown; bool m_middleDown; @@ -168,6 +186,9 @@ public: bool m_shiftDown; bool m_altDown; bool m_metaDown; + int m_wheelRotation; + int m_wheelDelta; + int m_linesPerAction; }; //--------------------------------------------------------------------------- @@ -248,6 +269,18 @@ public: 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{ @@ -284,7 +317,8 @@ public: class wxIconizeEvent: public wxEvent { public: - wxIconizeEvent(int id = 0); + wxIconizeEvent(int id = 0, bool iconized = TRUE); + bool Iconized(); }; //--------------------------------------------------------------------------- @@ -438,6 +472,17 @@ public: int GetInterval(); }; +//--------------------------------------------------------------------------- + +class wxTextUrlEvent : public wxCommandEvent +{ +public: + wxTextUrlEvent(int id, const wxMouseEvent& evtMouse, + long start, long end); + const wxMouseEvent& GetMouseEvent(); + long GetURLStart(); + long GetURLEnd(); +}; //--------------------------------------------------------------------------- //---------------------------------------------------------------------------