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 =
wxCoord *start,
wxCoord *end) const
{
- wxCHECK_RET( start && end, _T("NULL pointer in GetRectLimits") );
+ wxCHECK_RET( start && end, wxT("NULL pointer in GetRectLimits") );
if ( IsVertical() )
{
{
wxToolBarToolBase *tool = FindById(id);
- wxCHECK_RET( tool, _T("SetToolShortHelp: no such tool") );
+ wxCHECK_RET( tool, wxT("SetToolShortHelp: no such tool") );
// TODO: set tooltip/short help
tool->SetShortHelp(help);
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);
}
// ----------------------------------------------------------------------------
wxRect rect;
- wxCHECK_MSG( tool, rect, _T("GetToolRect: NULL tool") );
+ wxCHECK_MSG( tool, rect, wxT("GetToolRect: NULL tool") );
// ensure that we always have the valid tool position
if ( m_needsLayout )
}
// paints a border
-void wxButtonToolBar::OnPaint(wxPaintEvent& event)
+void wxButtonToolBar::OnPaint(wxPaintEvent& WXUNUSED(event))
{
wxPaintDC dc(this);
{
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, tool->GetId());
event.SetEventObject(tool->GetButton());
- if (!ProcessEvent(event))
+ if (!GetEventHandler()->ProcessEvent(event))
event.Skip();
}
}