]>
Commit | Line | Data |
---|---|---|
9b6dbb09 | 1 | ///////////////////////////////////////////////////////////////////////////// |
925f7740 | 2 | // Name: wx/motif/statbmp.h |
9b6dbb09 JS |
3 | // Purpose: wxStaticBitmap class |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 17/09/98 | |
9b6dbb09 | 7 | // Copyright: (c) Julian Smart |
65571936 | 8 | // Licence: wxWindows licence |
9b6dbb09 JS |
9 | ///////////////////////////////////////////////////////////////////////////// |
10 | ||
11 | #ifndef _WX_STATBMP_H_ | |
12 | #define _WX_STATBMP_H_ | |
13 | ||
aae91497 | 14 | #include "wx/motif/bmpmotif.h" |
b1519886 | 15 | #include "wx/icon.h" |
9b6dbb09 | 16 | |
53a2db12 | 17 | class WXDLLIMPEXP_CORE wxStaticBitmap : public wxStaticBitmapBase |
9b6dbb09 | 18 | { |
83df96d6 | 19 | DECLARE_DYNAMIC_CLASS(wxStaticBitmap) |
925f7740 | 20 | |
bfc6fde4 VZ |
21 | public: |
22 | wxStaticBitmap() { } | |
d3c7fc99 | 23 | virtual ~wxStaticBitmap(); |
925f7740 | 24 | |
bfc6fde4 | 25 | wxStaticBitmap(wxWindow *parent, wxWindowID id, |
83df96d6 JS |
26 | const wxBitmap& label, |
27 | const wxPoint& pos = wxDefaultPosition, | |
28 | const wxSize& size = wxDefaultSize, | |
29 | long style = 0, | |
30 | const wxString& name = wxStaticBitmapNameStr) | |
bfc6fde4 VZ |
31 | { |
32 | Create(parent, id, label, pos, size, style, name); | |
33 | } | |
925f7740 | 34 | |
bfc6fde4 | 35 | bool Create(wxWindow *parent, wxWindowID id, |
83df96d6 JS |
36 | const wxBitmap& label, |
37 | const wxPoint& pos = wxDefaultPosition, | |
38 | const wxSize& size = wxDefaultSize, | |
39 | long style = 0, | |
40 | const wxString& name = wxStaticBitmapNameStr); | |
925f7740 | 41 | |
bfc6fde4 | 42 | virtual void SetBitmap(const wxBitmap& bitmap); |
925f7740 | 43 | |
31528cd3 VZ |
44 | virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event)) |
45 | { | |
96be256b | 46 | return false; |
31528cd3 | 47 | } |
925f7740 | 48 | |
9a595736 | 49 | wxBitmap GetBitmap() const { return m_messageBitmap; } |
925f7740 | 50 | |
b1519886 | 51 | // for compatibility with wxMSW |
9a595736 | 52 | wxIcon GetIcon() const |
b1519886 VZ |
53 | { |
54 | // don't use wxDynamicCast, icons and bitmaps are really the same thing | |
9a595736 | 55 | return *(wxIcon*)&m_messageBitmap; |
b1519886 | 56 | } |
925f7740 | 57 | |
b1519886 VZ |
58 | // for compatibility with wxMSW |
59 | void SetIcon(const wxIcon& icon) | |
60 | { | |
61 | SetBitmap( icon ); | |
62 | } | |
925f7740 | 63 | |
bfc6fde4 | 64 | // Implementation |
bfc6fde4 VZ |
65 | virtual void ChangeBackgroundColour(); |
66 | virtual void ChangeForegroundColour(); | |
925f7740 | 67 | |
7af68c66 MB |
68 | protected: |
69 | void DoSetBitmap(); | |
70 | ||
bfc6fde4 VZ |
71 | protected: |
72 | wxBitmap m_messageBitmap; | |
7af68c66 | 73 | wxBitmap m_messageBitmapOriginal; |
aae91497 | 74 | wxBitmapCache m_bitmapCache; |
9b6dbb09 JS |
75 | }; |
76 | ||
77 | #endif | |
83df96d6 | 78 | // _WX_STATBMP_H_ |