X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fdc53e1302a8e366e5bf25c0444ce38709909888..f303d69f934a76c56e14713a0748fdd10635e462:/wxPython/src/_menu.i diff --git a/wxPython/src/_menu.i b/wxPython/src/_menu.i index f547e9f1bf..b57f7bd6e7 100644 --- a/wxPython/src/_menu.i +++ b/wxPython/src/_menu.i @@ -133,8 +133,10 @@ public: bool Delete(int id); %Rename(DeleteItem, bool, Delete(wxMenuItem *item)); - // delete the item from menu and destroy it (if it's a submenu) + %pythonAppend Destroy "args[0].thisown = 0" %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)); @@ -374,7 +376,9 @@ public: // SetText() virtual void SetAccel(wxAcceleratorEntry *accel); - + void SetBitmap(const wxBitmap& bitmap); + const wxBitmap& GetBitmap(); + // wxOwnerDrawn methods #ifdef __WXMSW__ void SetFont(const wxFont& font); @@ -405,8 +409,10 @@ public: wxColour GetTextColour() { return wxNullColour; } void SetBackgroundColour(const wxColour& colBack) {} wxColour GetBackgroundColour() { return wxNullColour; } + void SetBitmaps(const wxBitmap& bmpChecked, - const wxBitmap& bmpUnchecked = wxNullBitmap) {} + const wxBitmap& bmpUnchecked = wxNullBitmap) + { self->SetBitmap( bmpChecked ); } void SetDisabledBitmap( const wxBitmap& bmpDisabled ) {} const wxBitmap& GetDisabledBitmap() const { return wxNullBitmap; } @@ -419,9 +425,6 @@ public: void ResetOwnerDrawn() {} } #endif - - void SetBitmap(const wxBitmap& bitmap); - const wxBitmap& GetBitmap(); }; //---------------------------------------------------------------------------