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