X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aae91497f6ac36a76d3313cf405cae0f098ea1d1..9806a823b04b05f1f07121526e5a9fafb74689cd:/src/motif/toolbar.cpp diff --git a/src/motif/toolbar.cpp b/src/motif/toolbar.cpp index a4279e48bf..4078d2eefe 100644 --- a/src/motif/toolbar.cpp +++ b/src/motif/toolbar.cpp @@ -17,7 +17,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "toolbar.h" #endif @@ -53,7 +53,7 @@ // ---------------------------------------------------------------------------- #if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxToolBarBase) +IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxControl) #endif // ---------------------------------------------------------------------------- @@ -239,7 +239,6 @@ bool wxToolBar::Create(wxWindow *parent, if( rSize.x == -1 && GetParent() ) rSize.x = GetParent()->GetSize().x; - SetCanAddEventHandler(TRUE); AttachWidget (parent, m_mainWidget, (WXWidget) NULL, rPos.x, rPos.y, rSize.x, rSize.y); @@ -282,7 +281,7 @@ bool wxToolBar::Realize() Pixmap pixmap, insensPixmap; wxBitmap bmp, insensBmp; - wxToolBarToolsList::Node *node = m_tools.GetFirst(); + wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst(); while ( node ) { wxToolBarTool *tool = (wxToolBarTool *)node->GetData(); @@ -361,8 +360,8 @@ bool wxToolBar::Realize() if( !tool->GetButtonWidget() ) { - DoChangeBackgroundColour((WXWidget) button, - m_backgroundColour, TRUE); + wxDoChangeBackgroundColour((WXWidget) button, + m_backgroundColour, TRUE); tool->SetWidget(button); } @@ -389,13 +388,13 @@ bool wxToolBar::Realize() wxColour col; col.SetPixel(backgroundPixel); - if( bmp.GetMask() ) + if( bmp.Ok() && bmp.GetMask() ) { bmp = wxCreateMaskedBitmap(bmp, col); tool->SetNormalBitmap(bmp); } - if( insensBmp.GetMask() ) + if( insensBmp.Ok() && insensBmp.GetMask() ) { insensBmp = wxCreateMaskedBitmap(insensBmp, col); tool->SetDisabledBitmap(insensBmp); @@ -415,12 +414,12 @@ bool wxToolBar::Realize() wxColour col; col.SetPixel(backgroundPixel); - pixmap = (Pixmap) bmp.GetPixmap(); + pixmap = (Pixmap) bmp.GetDrawable(); { wxBitmap tmp = tool->GetDisabledBitmap(); insensPixmap = tmp.Ok() ? - (Pixmap)tmp.GetPixmap() : + (Pixmap)tmp.GetDrawable() : tool->GetInsensPixmap(); } @@ -508,7 +507,7 @@ bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool) int packing = GetToolPacking(); int offset = 0; - for( wxToolBarToolsList::Node *node = m_tools.GetFirst(); + for( wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst(); node; node = node->GetNext() ) { wxToolBarTool *t = (wxToolBarTool*)node->GetData(); @@ -645,7 +644,7 @@ void wxToolBar::DoSetSize(int x, int y, int width, int height, int sizeFlags) wxToolBarToolBase *wxToolBar::FindToolByWidget(WXWidget w) const { - wxToolBarToolsList::Node* node = m_tools.GetFirst(); + wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst(); while ( node ) { wxToolBarTool *tool = (wxToolBarTool *)node->GetData();