1 #ifndef SPRINGLOBBY_HEADERGUARD_WXBACKGROUNDIMAGE_H 2 #define SPRINGLOBBY_HEADERGUARD_WXBACKGROUNDIMAGE_H 3 4 #include <wx/event.h> 5 #include <wx/bitmap.h> 6 7 /** Usage: 8 ToolBarBackground = new wxBackgroundBitmap(wxBITMAP("test")); 9 ToolBar->PushEventHandler(ToolBarBackground); 10 **/ 11 12 class wxBackgroundBitmap : public wxEvtHandler { 13 //typedef wxEvtHandler Inherited; 14 public: wxBackgroundBitmap(const wxBitmap & B)15 wxBackgroundBitmap(const wxBitmap &B) : 16 wxEvtHandler(), 17 Bitmap(B), 18 m_lastSize(wxDefaultSize) 19 { } 20 virtual bool ProcessEvent(wxEvent &Event); 21 protected: 22 wxBitmap Bitmap; 23 wxSize m_lastSize; 24 }; 25 26 //copied from http://forum.wxwidgets.org/viewtopic.php?t=10019 27 28 #endif // SPRINGLOBBY_HEADERGUARD_WXBACKGROUNDIMAGE_H 29 30