X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/be2958285a158420c7268554b9ad587952926199..5a224901b8ede55e1db9980f0fcaf7d2cb49285f:/src/mac/toolbar.cpp diff --git a/src/mac/toolbar.cpp b/src/mac/toolbar.cpp index c7dd11d195..152e1aaddf 100644 --- a/src/mac/toolbar.cpp +++ b/src/mac/toolbar.cpp @@ -41,14 +41,15 @@ class wxToolBarTool : public wxToolBarToolBase public: wxToolBarTool(wxToolBar *tbar, int id, - const wxBitmap& bitmap1, - const wxBitmap& bitmap2, - bool toggle, + const wxString& label, + const wxBitmap& bmpNormal, + const wxBitmap& bmpDisabled, + wxItemKind kind, wxObject *clientData, - const wxString& shortHelpString, - const wxString& longHelpString) - : wxToolBarToolBase(tbar, id, bitmap1, bitmap2, toggle, - clientData, shortHelpString, longHelpString) + const wxString& shortHelp, + const wxString& longHelp) + : wxToolBarToolBase(tbar, id, label, bmpNormal, bmpDisabled, kind, + clientData, shortHelp, longHelp) { m_nSepCount = 0; m_index = -1 ; @@ -87,15 +88,16 @@ const short kwxMacToolBarLeftMargin = 2 ; wxToolBarToolBase *wxToolBar::CreateTool(int id, - const wxBitmap& bitmap1, - const wxBitmap& bitmap2, - bool toggle, + const wxString& label, + const wxBitmap& bmpNormal, + const wxBitmap& bmpDisabled, + wxItemKind kind, wxObject *clientData, - const wxString& shortHelpString, - const wxString& longHelpString) + const wxString& shortHelp, + const wxString& longHelp) { - return new wxToolBarTool(this, id, bitmap1, bitmap2, toggle, - clientData, shortHelpString, longHelpString); + return new wxToolBarTool(this, id, label, bmpNormal, bmpDisabled, kind, + clientData, shortHelp, longHelp); } wxToolBarToolBase *wxToolBar::CreateTool(wxControl *control) @@ -200,7 +202,7 @@ bool wxToolBar::Realize() while (node) { wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - wxBitmapRefData * bmap = (wxBitmapRefData*) ( tool->GetBitmap1().GetRefData()) ; + wxBitmapRefData * bmap = (wxBitmapRefData*) ( tool->GetNormalBitmap().GetRefData()) ; if( !tool->IsSeparator() ) { @@ -210,7 +212,7 @@ bool wxToolBar::Realize() toolrect.bottom = toolrect.top + toolSize.y ; ControlButtonContentInfo info ; - wxMacCreateBitmapButton( &info , tool->GetBitmap1() ) ; + wxMacCreateBitmapButton( &info , tool->GetNormalBitmap() ) ; ControlHandle m_macToolHandle ; SInt16 behaviour = kControlBehaviorOffsetContents ; @@ -391,7 +393,7 @@ void wxToolBar::MacSuperChangedPosition() while (node) { wxToolBarTool *tool = (wxToolBarTool *)node->Data(); - wxBitmapRefData * bmap = (wxBitmapRefData*) ( tool->GetBitmap1().GetRefData()) ; + wxBitmapRefData * bmap = (wxBitmapRefData*) ( tool->GetNormalBitmap().GetRefData()) ; if( !tool->IsSeparator() ) {