X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/83624f79609f0d5e240c1f7d77d044bfff9702fc..8bedcdce08e1575b74250d2ebac4355a687ccf8d:/src/gtk/statbmp.cpp diff --git a/src/gtk/statbmp.cpp b/src/gtk/statbmp.cpp index 7d752190cd..ad12ed7cf2 100644 --- a/src/gtk/statbmp.cpp +++ b/src/gtk/statbmp.cpp @@ -4,7 +4,7 @@ // Author: Robert Roebling // Id: $Id$ // Copyright: (c) 1998 Robert Roebling -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -13,6 +13,8 @@ #include "wx/statbmp.h" +#if wxUSE_STATBMP + #include "gdk/gdk.h" #include "gtk/gtk.h" @@ -60,9 +62,7 @@ bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi m_widget = gtk_label_new( "Bitmap" ); } - m_parent->AddChild( this ); - - (m_parent->m_insertCallback)( m_parent, this ); + m_parent->DoAddChild( this ); PostCreation(); @@ -82,3 +82,14 @@ void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap ) gtk_pixmap_set( GTK_PIXMAP(m_widget), m_bitmap.GetPixmap(), mask ); } } + +wxIcon& wxStaticBitmap::GetIcon() +{ + wxIcon *icon = wxDynamicCast(&m_bitmap, wxIcon); + + if (!icon) return wxNullIcon; + + return *icon; +} + +#endif