#include "wx/wx.h"
#endif
+#include "wx/frame.h"
+
// For ::UpdateWindow
#ifdef __WXMSW__
#include <windows.h>
event.SetEventObject(this);
event.SetExtraLong((long) toggleDown);
+ // Send events to this toolbar instead (and thence up the window hierarchy)
GetEventHandler()->ProcessEvent(event);
return TRUE;
void wxToolBarBase::AddSeparator ()
{
wxToolBarTool *tool = new wxToolBarTool;
+ tool->m_index = -1;
tool->m_toolStyle = wxTOOL_STYLE_SEPARATOR;
m_tools.Append(-1, tool);
}
// Do the toolbar button updates (check for EVT_UPDATE_UI handlers)
void wxToolBarBase::DoToolbarUpdates()
{
+ wxEvtHandler* evtHandler = GetEventHandler() ;
+
wxNode* node = GetTools().First();
while (node)
{
wxUpdateUIEvent event(tool->m_index);
event.SetEventObject(this);
- if (GetEventHandler()->ProcessEvent(event))
+ if (evtHandler->ProcessEvent(event))
{
if (event.GetSetEnabled())
EnableTool(tool->m_index, event.GetEnabled());