for( size_t i = 0 ; i < GetMenuCount() ; ++i )
{
wxMenuInfo* info = new wxMenuInfo() ;
- info->Create( const_cast<wxMenuBar*>(this)->GetMenu(i) , GetLabelTop(i) ) ;
+ info->Create( const_cast<wxMenuBar*>(this)->GetMenu(i) , GetMenuLabel(i) ) ;
list->Append( info ) ;
}
return m_menuInfos ;
// Palm OS does not have support for grayed or disabled items
}
-void wxMenuBar::SetLabelTop(size_t pos, const wxString& label)
+void wxMenuBar::SetMenuLabel(size_t pos, const wxString& label)
{
wxCHECK_RET( pos < GetMenuCount(), wxT("invalid menu index") );
- m_titles[pos]=wxStripMenuCodes(label);
+ m_titles[pos] = label;
if ( !IsAttached() )
{
Refresh();
}
-wxString wxMenuBar::GetLabelTop(size_t pos) const
+wxString wxMenuBar::GetMenuLabel(size_t pos) const
{
wxCHECK_MSG( pos < GetMenuCount(), wxEmptyString,
- wxT("invalid menu index in wxMenuBar::GetLabelTop") );
+ wxT("invalid menu index in wxMenuBar::GetMenuLabel") );
- return wxMenuItem::GetLabelFromText(m_titles[pos]);
+ return m_titles[pos];
}
// ---------------------------------------------------------------------------
if ( !menuOld )
return NULL;
- m_titles[pos]=wxStripMenuCodes(title);
+ m_titles[pos] = title;
if ( IsAttached() )
{
if ( !wxMenuBarBase::Insert(pos, menu, title) )
return false;
- m_titles.Insert(wxStripMenuCodes(title), pos);
+ m_titles.Insert(title, pos);
if ( IsAttached() )
{
if ( !wxMenuBarBase::Append(menu, title) )
return false;
- m_titles.Add(wxStripMenuCodes(title));
+ m_titles.Add(title);
if(IsAttached())
{