bool Delete(int id);
%Rename(DeleteItem, bool, Delete(wxMenuItem *item));
- %pythonAppend Destroy "args[0].thisown = 0"
+ %pythonPrepend Destroy "args[0].this.own(False)"
%extend { void Destroy() { delete self; } }
// delete the item from menu and destroy it (if it's a submenu)
- %Rename(DestroyId, bool, Destroy(int id));
- %Rename(DestroyItem, bool, Destroy(wxMenuItem *item));
+ %pythonPrepend Destroy "";
+ DocDeclStrName(
+ bool , Destroy(int id),
+ "", "",
+ DestroyId);
+
+ DocDeclStrName(
+ bool , Destroy(wxMenuItem *item),
+ "", "",
+ DestroyItem);
// get the items
class wxMenuItem : public wxObject {
public:
+ // turn off this typemap
+ %typemap(out) wxMenuItem*;
+
wxMenuItem(wxMenu* parentMenu=NULL, int id=wxID_ANY,
const wxString& text = wxPyEmptyString,
const wxString& help = wxPyEmptyString,
wxMenu* subMenu = NULL);
~wxMenuItem();
+ // Turn it back on again
+ %typemap(out) wxEvtHandler* { $result = wxPyMake_wxObject($1, $owner); }
+
+
// the menu we're in
wxMenu *GetMenu() const;
void SetMenu(wxMenu* menu);