+ SetBitmap(wxNullBitmap);
+}
+
+void wxStaticBitmap::DoSetBitmap()
+{
+ Widget widget = (Widget) m_mainWidget;
+ int w2, h2;
+
+ if (m_messageBitmapOriginal.Ok())
+ {
+ w2 = m_messageBitmapOriginal.GetWidth();
+ h2 = m_messageBitmapOriginal.GetHeight();
+
+ Pixmap pixmap;
+
+ // Must re-make the bitmap to have its transparent areas drawn
+ // in the current widget background colour.
+ if (m_messageBitmapOriginal.GetMask())
+ {
+ int backgroundPixel;
+ XtVaGetValues( widget, XmNbackground, &backgroundPixel,
+ NULL);
+
+ wxColour col;
+ col.SetPixel(backgroundPixel);
+
+ wxBitmap newBitmap = wxCreateMaskedBitmap(m_messageBitmapOriginal, col);
+ m_messageBitmap = newBitmap;
+
+ pixmap = (Pixmap) m_messageBitmap.GetDrawable();
+ }
+ else
+ {
+ m_bitmapCache.SetBitmap( m_messageBitmap );
+ pixmap = (Pixmap)m_bitmapCache.GetLabelPixmap(widget);
+ }
+
+ XtVaSetValues (widget,
+ XmNlabelPixmap, pixmap,
+ XmNlabelType, XmPIXMAP,
+ NULL);
+
+ SetSize(w2, h2);
+ }
+ else
+ {
+ // Null bitmap: must not use current pixmap
+ // since it is no longer valid.
+ XtVaSetValues (widget,
+ XmNlabelType, XmSTRING,
+ XmNlabelPixmap, XmUNSPECIFIED_PIXMAP,
+ NULL);
+ }