diff --git a/TODO.txt b/TODO.txt index b88e56e7..0626fc2e 100644 --- a/TODO.txt +++ b/TODO.txt @@ -150,9 +150,6 @@ other dev stuff * Finish richtext module - * Add missing methods to wx.MenuItem (Those that are MSW only with - empty stubs for the other platforms, such as SetDisabledBitmap.) - * Potential reference count issue with wxGridCellCoordsArray? Code like this:: @@ -164,6 +161,7 @@ other dev stuff a[0] a[0][0] - * In a Py3 build strings like wx.TreeCtrlNameStr are being generated as bytes - objects, they should probably be string objects. + * In a Py3 build strings like wx.TreeCtrlNameStr are being generated as + bytes objects, they should probably be string objects. Or not, sip's + default might be best... See ModuleDef.addGlobalStr if I change my mind. diff --git a/etg/menuitem.py b/etg/menuitem.py index cd7a3ff4..868fbc26 100644 --- a/etg/menuitem.py +++ b/etg/menuitem.py @@ -98,6 +98,15 @@ def run(): #endif """) + + c.find('GetBitmap').type = 'const wxBitmap*' + c.find('GetBitmap').setCppCode("""\ + #ifdef __WXMSW__ + return &self->GetBitmap(checked); + #else + return &self->GetBitmap(); + #endif + """) c.find('SetBitmap').setCppCode("""\ #ifdef __WXMSW__ @@ -115,6 +124,22 @@ def run(): #endif """) + + c.find('GetDisabledBitmap').type = 'const wxBitmap*' + c.find('GetDisabledBitmap').setCppCode("""\ + #ifdef __WXMSW__ + return &self->GetDisabledBitmap(); + #else + return &wxNullBitmap; + #endif + """) + + c.find('SetDisabledBitmap').setCppCode("""\ + #ifdef __WXMSW__ + self->SetDisabledBitmap(*disabled); + #endif + """) + c.find('GetAccel').factory = True c.find('GetAccelFromString').ignore() # Not implemented anywere?