added wxFrame::Command()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-03-31 17:53:27 +00:00
parent 40c7a5fc4e
commit 30f1b5f3ef
5 changed files with 39 additions and 1 deletions

View File

@@ -640,6 +640,23 @@ wxStatusBar *wxFrame::OnCreateStatusBar( int number, long style, wxWindowID id,
return statusBar;
}
void wxFrame::Command( int id )
{
wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, id);
commandEvent.SetInt( id );
commandEvent.SetEventObject( this );
wxMenuBar *bar = GetMenuBar();
if (!bar) return;
wxMenuItem *item = bar->FindItemForId(id) ;
if (item && item->IsCheckable())
{
bar->Check(id,!bar->Checked(id)) ;
}
GetEventHandler()->ProcessEvent(commandEvent);
}
void wxFrame::SetStatusText(const wxString& text, int number)
{
wxASSERT_MSG( (m_widget != NULL), "invalid frame" );