+ wxString str;
+ str.Printf( _T("Clicked on tool %d\n"), event.GetId());
+ m_textWindow->WriteText( str );
+
+ if (event.GetId() == wxID_HELP)
+ {
+ if ((bool)event.GetExtraLong())
+ m_textWindow->WriteText( _T("Help button down now.\n") );
+ else
+ m_textWindow->WriteText( _T("Help button up now.\n") );
+ }
+
+ if (event.GetId() == wxID_COPY)
+ {
+ wxToolBar *tb = GetToolBar();
+ if (tb->GetToolEnabled(wxID_PRINT))
+ tb->EnableTool( wxID_PRINT, FALSE );
+ else
+ tb->EnableTool( wxID_PRINT, TRUE );
+ }
+
+ if (event.GetId() == wxID_CUT)
+ {
+ wxToolBar *tb = GetToolBar();
+ tb->ToggleTool( wxID_HELP, !tb->GetToolState( wxID_HELP ) );
+ }