// Only allow toggle if returns true
bool wxToolBarBase::OnLeftClick(int toolid, bool toggleDown)
{
- wxCommandEvent event(wxEVT_COMMAND_TOOL_CLICKED, toolid);
+ wxCommandEvent event(wxEVT_TOOL, toolid);
event.SetEventObject(this);
// we use SetInt() to make wxCommandEvent::IsChecked() return toggleDown
long WXUNUSED(x),
long WXUNUSED(y))
{
- wxCommandEvent event(wxEVT_COMMAND_TOOL_RCLICKED, toolid);
+ wxCommandEvent event(wxEVT_TOOL_RCLICKED, toolid);
event.SetEventObject(this);
event.SetInt(toolid);
// the tool toolid.
void wxToolBarBase::OnMouseEnter(int toolid)
{
- wxCommandEvent event(wxEVT_COMMAND_TOOL_ENTER, GetId());
+ wxCommandEvent event(wxEVT_TOOL_ENTER, GetId());
event.SetEventObject(this);
event.SetInt(toolid);
if ( !IsShown() )
return;
- // There is no sense in updating the toolbar UI
- // if the parent window is about to get destroyed
- wxWindow *tlw = wxGetTopLevelParent( this );
- if (tlw && wxPendingDelete.Member( tlw ))
- return;
-
wxEvtHandler* evtHandler = GetEventHandler() ;
for ( wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();