| 1 | ///////////////////////////////////////////////////////////////////////////// |
| 2 | // Name: wx/univ/statbmp.h |
| 3 | // Purpose: wxStaticBitmap class for wxUniversal |
| 4 | // Author: Vadim Zeitlin |
| 5 | // Modified by: |
| 6 | // Created: 25.08.00 |
| 7 | // RCS-ID: $Id$ |
| 8 | // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com) |
| 9 | // Licence: wxWindows licence |
| 10 | ///////////////////////////////////////////////////////////////////////////// |
| 11 | |
| 12 | #ifndef _WX_UNIV_STATBMP_H_ |
| 13 | #define _WX_UNIV_STATBMP_H_ |
| 14 | |
| 15 | #include "wx/bitmap.h" |
| 16 | |
| 17 | // ---------------------------------------------------------------------------- |
| 18 | // wxStaticBitmap |
| 19 | // ---------------------------------------------------------------------------- |
| 20 | |
| 21 | class WXDLLEXPORT wxStaticBitmap : public wxStaticBitmapBase |
| 22 | { |
| 23 | public: |
| 24 | wxStaticBitmap() |
| 25 | { |
| 26 | } |
| 27 | |
| 28 | wxStaticBitmap(wxWindow *parent, |
| 29 | const wxBitmap& label, |
| 30 | const wxPoint& pos = wxDefaultPosition, |
| 31 | const wxSize& size = wxDefaultSize, |
| 32 | long style = 0) |
| 33 | { |
| 34 | Create(parent, wxID_ANY, label, pos, size, style); |
| 35 | } |
| 36 | |
| 37 | wxStaticBitmap(wxWindow *parent, |
| 38 | wxWindowID id, |
| 39 | const wxBitmap& label, |
| 40 | const wxPoint& pos = wxDefaultPosition, |
| 41 | const wxSize& size = wxDefaultSize, |
| 42 | long style = 0, |
| 43 | const wxString& name = wxStaticBitmapNameStr) |
| 44 | { |
| 45 | Create(parent, id, label, pos, size, style, name); |
| 46 | } |
| 47 | |
| 48 | bool Create(wxWindow *parent, |
| 49 | wxWindowID id, |
| 50 | const wxBitmap& label, |
| 51 | const wxPoint& pos = wxDefaultPosition, |
| 52 | const wxSize& size = wxDefaultSize, |
| 53 | long style = 0, |
| 54 | const wxString& name = wxStaticBitmapNameStr); |
| 55 | |
| 56 | virtual void SetBitmap(const wxBitmap& bitmap); |
| 57 | virtual void SetIcon(const wxIcon& icon); |
| 58 | virtual wxBitmap GetBitmap() const { return m_bitmap; } |
| 59 | |
| 60 | wxIcon GetIcon() const; |
| 61 | |
| 62 | virtual bool HasTransparentBackground() { return true; } |
| 63 | |
| 64 | protected: |
| 65 | virtual void DoDraw(wxControlRenderer *renderer); |
| 66 | |
| 67 | private: |
| 68 | // the bitmap which we show |
| 69 | wxBitmap m_bitmap; |
| 70 | |
| 71 | DECLARE_DYNAMIC_CLASS(wxStaticBitmap) |
| 72 | }; |
| 73 | |
| 74 | #endif // _WX_UNIV_STATBMP_H_ |