-bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap,
- const wxPoint &pos, const wxSize &size,
- long style, const wxString &name )
+// empty bitmap, so that we can create GtkPixmap widget:
+static char * bogus_xpm[] = {
+"2 2 1 1",
+" c None",
+" ",
+" "};
+
+bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap,
+ const wxPoint &pos, const wxSize &size,
+ long style, const wxString &name )
+{
+ m_needParent = TRUE;
+
+ if (!PreCreation( parent, pos, size ) ||
+ !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
+ {
+ wxFAIL_MSG( wxT("wxStaticBitmap creation failed") );
+ return false;
+ }
+
+ m_bitmap = bitmap;
+
+ wxBitmap bmp(bitmap.IsOk() ? bitmap : wxBitmap(bogus_xpm));
+ m_widget = gtk_pixmap_new(bmp.GetPixmap(), NULL);
+
+ if (bitmap.IsOk())
+ SetBitmap(bitmap);
+
+ PostCreation(size);
+ m_parent->DoAddChild( this );
+
+ return true;
+}
+
+void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap )