Removed some old cruft from wxBitmap, moved wxMotif- and

wxControl-specific functionality (GetXXXPixmap) into a separate
class, and fixed the implementation. Adapted wxStaticBitmap,
wxBitmapButton and wxToolBar to the new situation.
  Various fixes to wxToolBar: Realize does not create buttons
multiple times anymore, use the disabled bitmap as the disabled
bitmap, not as the toggled bitmap for toggle buttons (!),
reposition buttons/controls when a tool is removed/deleted.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2003-03-27 19:40:32 +00:00
parent fc7ca9b347
commit aae91497f6
13 changed files with 523 additions and 134 deletions

View File

@@ -124,7 +124,10 @@ void wxStaticBitmap::DoSetBitmap()
pixmap = (Pixmap) m_messageBitmap.GetPixmap();
}
else
pixmap = (Pixmap) m_messageBitmap.GetLabelPixmap(widget);
{
m_bitmapCache.SetBitmap( m_messageBitmap );
pixmap = (Pixmap)m_bitmapCache.GetLabelPixmap(widget);
}
XtVaSetValues (widget,
XmNlabelPixmap, pixmap,
@@ -164,11 +167,13 @@ void wxStaticBitmap::ChangeBackgroundColour()
wxWindow::ChangeBackgroundColour();
// must recalculate the background colour
m_bitmapCache.SetColoursChanged();
DoSetBitmap();
}
void wxStaticBitmap::ChangeForegroundColour()
{
m_bitmapCache.SetColoursChanged();
wxWindow::ChangeForegroundColour();
}