X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c6a2657789bc8259c538f405362d9ff498e92559..9146872cb5243c629dfb0afc51fd5d8d8ca22826:/wxPython/src/_menu.i diff --git a/wxPython/src/_menu.i b/wxPython/src/_menu.i index af7a940d08..f7584ed534 100644 --- a/wxPython/src/_menu.i +++ b/wxPython/src/_menu.i @@ -17,13 +17,20 @@ %newgroup +MustHaveApp(wxMenu); + class wxMenu : public wxEvtHandler { public: %pythonAppend wxMenu "self._setOORInfo(self)" + %typemap(out) wxMenu*; // turn off this typemap + wxMenu(const wxString& title = wxPyEmptyString, long style = 0); + // Turn it back on again + %typemap(out) wxMenu* { $result = wxPyMake_wxObject($1, $owner); } + // append any kind of item (normal/check/radio/separator) wxMenuItem* Append(int id, const wxString& text, @@ -203,12 +210,18 @@ public: //--------------------------------------------------------------------------- %newgroup +MustHaveApp(wxMenuBar); + class wxMenuBar : public wxWindow { public: %pythonAppend wxMenuBar "self._setOORInfo(self)" + %typemap(out) wxMenuBar*; // turn off this typemap + wxMenuBar(long style = 0); + // Turn it back on again + %typemap(out) wxMenuBar* { $result = wxPyMake_wxObject($1, $owner); } // append a menu to the end of menubar, return True if ok virtual bool Append(wxMenu *menu, const wxString& title);