X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2df7be7f2cca699a02ee0c9ce69de9bfe6b0922f..ec974d23005b5f225fe59e674d664b248619f3b2:/include/wx/gtk/statbmp.h diff --git a/include/wx/gtk/statbmp.h b/include/wx/gtk/statbmp.h index 7f902acf83..f56a5d4d56 100644 --- a/include/wx/gtk/statbmp.h +++ b/include/wx/gtk/statbmp.h @@ -67,9 +67,26 @@ public: const wxBitmap& GetBitmap() const { return m_bitmap; } // for compatibility with wxMSW - wxIcon& GetIcon(); + const wxIcon& GetIcon() const + { + // don't use wxDynamicCast, icons and bitmaps are really the same thing + // in wxGTK + return (const wxIcon &)m_bitmap; + } + + // for compatibility with wxMSW + void SetIcon(const wxIcon& icon) + { + SetBitmap( icon ); + } + +protected: + virtual wxSize DoGetBestSize() const; private: + // creates the new pixmap widget + void CreatePixmapWidget(); + wxBitmap m_bitmap; };