Added menu_highlight behaviour as in wxMSW (statusbar)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1606 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-02-05 13:25:40 +00:00
parent 341c92a8b4
commit 342b6a2fe4
10 changed files with 115 additions and 45 deletions

View File

@@ -152,6 +152,7 @@ bool wxMenuBar::Enabled( int id ) const
{
wxMenuItem* item = FindMenuItemById( id );
if (item) return item->IsEnabled();
return FALSE;
}
@@ -161,7 +162,7 @@ wxString wxMenuBar::GetLabel( int id ) const
if (item) return item->GetText();
return "";
return wxString("");
}
void wxMenuBar::SetLabel( int id, const wxString &label )
@@ -204,6 +205,23 @@ void wxMenuBar::SetLabelTop( int pos, const wxString& label )
menu->SetTitle( label );
}
void wxMenuBar::SetHelpString( int id, const wxString& helpString )
{
wxMenuItem* item = FindMenuItemById( id );
if (item) item->SetHelp( helpString );
}
wxString wxMenuBar::GetHelpString( int id ) const
{
wxMenuItem* item = FindMenuItemById( id );
if (item)
return item->GetHelp();
else
return wxString("");
}
//-----------------------------------------------------------------------------
// "activate"
//-----------------------------------------------------------------------------
@@ -262,9 +280,8 @@ static void gtk_menu_hilight_callback( GtkWidget *widget, wxMenu *menu )
if (!menu->IsEnabled(id)) return;
wxCommandEvent event( wxEVT_MENU_HIGHLIGHT, id );
wxMenuEvent event( wxEVT_MENU_HIGHLIGHT, id );
event.SetEventObject( menu );
event.SetInt(id );
/* wxMSW doesn't call callback here either