added labels support for toolbar controls for wxMac and wxMSW (modified patch 1613603)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-03-18 23:13:18 +00:00
parent 88c23b64c7
commit cdb11cb99e
13 changed files with 235 additions and 105 deletions

View File

@@ -197,12 +197,16 @@ wxToolBarBase::InsertTool(size_t pos, wxToolBarToolBase *tool)
return tool;
}
wxToolBarToolBase *wxToolBarBase::AddControl(wxControl *control)
wxToolBarToolBase *
wxToolBarBase::AddControl(wxControl *control, const wxString& label)
{
return InsertControl(GetToolsCount(), control);
return InsertControl(GetToolsCount(), control, label);
}
wxToolBarToolBase *wxToolBarBase::InsertControl(size_t pos, wxControl *control)
wxToolBarToolBase *
wxToolBarBase::InsertControl(size_t pos,
wxControl *control,
const wxString& label)
{
wxCHECK_MSG( control, (wxToolBarToolBase *)NULL,
_T("toolbar: can't insert NULL control") );
@@ -213,7 +217,7 @@ wxToolBarToolBase *wxToolBarBase::InsertControl(size_t pos, wxControl *control)
wxCHECK_MSG( pos <= GetToolsCount(), (wxToolBarToolBase *)NULL,
_T("invalid position in wxToolBar::InsertControl()") );
wxToolBarToolBase *tool = CreateTool(control);
wxToolBarToolBase *tool = CreateTool(control, label);
if ( !InsertTool(pos, tool) )
{