wxMenu::Append (and similar) now return a pointer to the wxMenuItem
that was added. Checked on MSW, GTK, and Mac, other port authors please double check changes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
1ba7e7b79f
commit
fe4a107dda
@ -46,9 +46,9 @@ protected:
|
||||
// ------------------------------------------------------------------------
|
||||
protected:
|
||||
// implement base class virtuals
|
||||
virtual bool DoAppend(wxMenuItem *item);
|
||||
virtual bool DoInsert(size_t pos, wxMenuItem *item);
|
||||
virtual wxMenuItem *DoRemove(wxMenuItem *item);
|
||||
virtual wxMenuItem* DoAppend(wxMenuItem *item);
|
||||
virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item);
|
||||
virtual wxMenuItem* DoRemove(wxMenuItem *item);
|
||||
|
||||
#if wxUSE_ACCEL
|
||||
// add/remove accel for the given menu item
|
||||
|
@ -53,22 +53,22 @@ wxMenu::~wxMenu()
|
||||
[m_cocoaNSMenu release];
|
||||
}
|
||||
|
||||
bool wxMenu::DoAppend(wxMenuItem *item)
|
||||
wxMenuItem* wxMenu::DoAppend(wxMenuItem *item)
|
||||
{
|
||||
wxAutoNSAutoreleasePool pool;
|
||||
if(!wxMenuBase::DoAppend(item))
|
||||
return false;
|
||||
return NULL;
|
||||
[m_cocoaNSMenu addItem: item->GetNSMenuItem()];
|
||||
return true;
|
||||
return item;
|
||||
}
|
||||
|
||||
bool wxMenu::DoInsert(unsigned long pos, wxMenuItem *item)
|
||||
wxMenuItem* wxMenu::DoInsert(unsigned long pos, wxMenuItem *item)
|
||||
{
|
||||
wxAutoNSAutoreleasePool pool;
|
||||
if(!wxMenuBase::DoInsert(pos,item))
|
||||
return false;
|
||||
return NULL;
|
||||
[m_cocoaNSMenu insertItem:item->GetNSMenuItem() atIndex:pos];
|
||||
return true;
|
||||
return item;
|
||||
}
|
||||
|
||||
wxMenuItem* wxMenu::DoRemove(wxMenuItem *item)
|
||||
|
Loading…
Reference in New Issue
Block a user