X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c368d904fc27d35ae1e533155e2154dc496432e4..742fc581e46beca2328551cdaec38c3dfca50cb1:/wxPython/src/events.i diff --git a/wxPython/src/events.i b/wxPython/src/events.i index b534f076b7..e6933f8e25 100644 --- a/wxPython/src/events.i +++ b/wxPython/src/events.i @@ -30,7 +30,10 @@ //--------------------------------------------------------------------------- -class wxEvent { + +int wxNewEventType(); + +class wxEvent : public wxObject { public: wxEvent(int id = 0); ~wxEvent(); @@ -86,6 +89,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; + } + } + } }; @@ -157,6 +172,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; @@ -165,6 +184,9 @@ public: bool m_shiftDown; bool m_altDown; bool m_metaDown; + int m_wheelRotation; + int m_wheelDelta; + int m_linesPerAction; }; //--------------------------------------------------------------------------- @@ -281,7 +303,8 @@ public: class wxIconizeEvent: public wxEvent { public: - wxIconizeEvent(int id = 0); + wxIconizeEvent(int id = 0, bool iconized = TRUE); + bool Iconized(); }; //--------------------------------------------------------------------------- @@ -383,6 +406,7 @@ class wxNotifyEvent : public wxCommandEvent { public: wxNotifyEvent(int commandType = wxEVT_NULL, int id = 0); bool IsAllowed(); + void Allow(); void Veto(); }; @@ -434,6 +458,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(); +}; //--------------------------------------------------------------------------- //---------------------------------------------------------------------------