#include "wx/log.h"
#include "wx/frame.h"
#include "wx/dcclient.h"
+ #include "wx/settings.h"
+ #include "wx/image.h"
#endif
-#include "wx/image.h"
-#include "wx/settings.h"
-
// ----------------------------------------------------------------------------
// wxButtonToolBarTool: our implementation of wxToolBarToolBase
// ----------------------------------------------------------------------------
m_button = NULL;
}
- wxButtonToolBarTool(wxButtonToolBar *tbar, wxControl *control)
- : wxToolBarToolBase(tbar, control)
+ wxButtonToolBarTool(wxButtonToolBar *tbar,
+ wxControl *control,
+ const wxString& label)
+ : wxToolBarToolBase(tbar, control, label)
{
m_x = m_y = wxDefaultCoord;
m_width =
clientData, shortHelp, longHelp);
}
-wxToolBarToolBase *wxButtonToolBar::CreateTool(wxControl *control)
+wxToolBarToolBase *wxButtonToolBar::CreateTool(wxControl *control,
+ const wxString& label)
{
- return new wxButtonToolBarTool(this, control);
+ return new wxButtonToolBarTool(this, control, label);
}
// ----------------------------------------------------------------------------
m_needsLayout = true;
DoLayout();
- SetBestSize(wxSize(m_maxWidth, m_maxHeight));
+ SetInitialSize(wxSize(m_maxWidth, m_maxHeight));
return true;
}
{
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, tool->GetId());
event.SetEventObject(tool->GetButton());
- if (!ProcessEvent(event))
+ if (!GetEventHandler()->ProcessEvent(event))
event.Skip();
}
}