X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c25a510b30bd87f26deaf3532a48d29a158f0aea..2d956b58023a4955313a1c1531bc70a0deb0b831:/src/msw/tbarmsw.cpp?ds=sidebyside diff --git a/src/msw/tbarmsw.cpp b/src/msw/tbarmsw.cpp index 5de16db0f8..92b60a0fa1 100644 --- a/src/msw/tbarmsw.cpp +++ b/src/msw/tbarmsw.cpp @@ -83,14 +83,14 @@ class WXDLLEXPORT wxToolBarTool : public wxToolBarToolBase public: wxToolBarTool(wxToolBar *tbar, int id, - const wxBitmap& bitmap1, - const wxBitmap& bitmap2, + const wxBitmap& bmpNormal, + const wxBitmap& bmpDisabled, bool toggle, 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, bmpNormal, bmpDisabled, toggle, + clientData, shortHelp, longHelp) { } @@ -119,7 +119,7 @@ public: // ---------------------------------------------------------------------------- #if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxToolBarBase) BEGIN_EVENT_TABLE(wxToolBar, wxToolBarBase) EVT_PAINT(wxToolBar::OnPaint) @@ -136,15 +136,16 @@ END_EVENT_TABLE() // ---------------------------------------------------------------------------- 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) @@ -490,7 +491,7 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase) // TODO: use the mapping code from wxToolBar95 to get it right in this class #if !defined(__WIN32__) && !defined(__WIN386__) - wxBitmap bitmap2; + wxBitmap bmpDisabled; if (tool->CanBeToggled()) { HBITMAP hbmp = CreateMappedBitmap((WXHINSTANCE)wxGetInstance(), @@ -784,7 +785,7 @@ void wxToolBar::DrawButton(WXHDC hdc, int x, int y, int dx, int dy, dxFace -= 3; dyFace -= 3; - // Using bitmap2 can cause problems (don't know why!) + // Using bmpDisabled can cause problems (don't know why!) #if !defined(__WIN32__) && !defined(__WIN386__) HBITMAP bitmapOld; if (tool->GetBitmap2().Ok())