X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/78e8819c2e3e35d6a7383af683e8d14b295462a2..7faa9591f499a5d10f7d3ef7b061c0fe5774c53f:/wxPython/src/windows.i?ds=sidebyside diff --git a/wxPython/src/windows.i b/wxPython/src/windows.i index 1aab58d1da..4867c07566 100644 --- a/wxPython/src/windows.i +++ b/wxPython/src/windows.i @@ -123,7 +123,7 @@ public: wxPyValidator* ptr = NULL; wxPyValidator* self = (wxPyValidator*)this; - wxPyTState* state = wxPyBeginBlockThreads(); + wxPyBeginBlockThreads(); if (self->m_myInst.findCallback("Clone")) { PyObject* ro; ro = self->m_myInst.callCallbackObj(Py_BuildValue("()")); @@ -132,7 +132,7 @@ public: Py_DECREF(ro); } } - wxPyEndBlockThreads(state); + wxPyEndBlockThreads(); // This is very dangerous!!! But is the only way I could find // to squash a memory leak. Currently it is okay, but if the @@ -283,6 +283,13 @@ public: wxEvtHandler* PopEventHandler(bool deleteHandler = FALSE); void PushEventHandler(wxEvtHandler* handler); + // find the given handler in the event handler chain and remove (but + // not delete) it from the event handler chain, return TRUE if it was + // found and FALSE otherwise (this also results in an assert failure so + // this function should only be called when the handler is supposed to + // be there) + bool RemoveEventHandler(wxEvtHandler *handler); + %name(PopupMenuXY)bool PopupMenu(wxMenu *menu, int x, int y); bool PopupMenu(wxMenu *menu, const wxPoint& pos); @@ -401,8 +408,13 @@ public: void SetAcceleratorTable(const wxAcceleratorTable& accel); wxAcceleratorTable *GetAcceleratorTable(); +#ifdef __WXMSW__ + // A way to do the native draw first... Too bad it isn't in wxGTK too. + void OnPaint(wxPaintEvent& event); +#endif - %name(base_OnPaint)void OnPaint(wxPaintEvent& event); + wxButton* GetDefaultItem(); + void SetDefaultItem(wxButton *btn); }; @@ -458,8 +470,6 @@ public: %pragma(python) addtomethod = "wxPrePanel:val._setOORInfo(val)" void InitDialog(); - wxButton* GetDefaultItem(); - void SetDefaultItem(wxButton *btn); };