1 /** \file wximagepanel.h 2 * 3 * This file is part of wxSmithContribItems plugin for Code::Blocks Studio 4 * Copyright (C) 2010 Ron Collins 5 * 6 * wxSmithContribItems is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * wxSmithContribItems is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with wxSmithContribItems. If not, see <http://www.gnu.org/licenses/>. 18 * 19 */ 20 21 22 #ifndef _IMAGEPANEL_H_ 23 #define _IMAGEPANEL_H_ 24 25 #include <wx/object.h> 26 #include <wx/panel.h> 27 #include <wx/image.h> 28 #include <wx/bitmap.h> 29 #include <wx/dcclient.h> 30 31 32 class wxImagePanel : public wxPanel 33 { 34 public: 35 36 wxImagePanel(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const wxString& name = _("ImagePanel")); 37 38 void SetBitmap(wxBitmap &inBitmap); 39 wxBitmap GetBitmap(void); 40 41 void SetStretch(bool inStretch); 42 bool GetStretch(void); 43 44 void DoPaint(wxPaintEvent& event); 45 46 47 48 protected: 49 50 wxBitmap mBitmap; 51 bool mStretch; 52 53 DECLARE_DYNAMIC_CLASS(wxImagePanel) 54 55 }; 56 57 58 59 #endif // _IMAGEPANEL_H_ 60