]>
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 | ||
15 | #ifdef __GNUG__ | |
16 | #pragma interface "statbmp.h" | |
17 | #endif | |
18 | ||
19 | #include "wx/control.h" | |
b1519886 | 20 | #include "wx/icon.h" |
9b6dbb09 JS |
21 | |
22 | WXDLLEXPORT_DATA(extern const char*) wxStaticBitmapNameStr; | |
23 | ||
bfc6fde4 | 24 | class WXDLLEXPORT wxStaticBitmap : public wxControl |
9b6dbb09 | 25 | { |
83df96d6 JS |
26 | DECLARE_DYNAMIC_CLASS(wxStaticBitmap) |
27 | ||
bfc6fde4 VZ |
28 | public: |
29 | wxStaticBitmap() { } | |
30 | ~wxStaticBitmap(); | |
83df96d6 | 31 | |
bfc6fde4 | 32 | wxStaticBitmap(wxWindow *parent, wxWindowID id, |
83df96d6 JS |
33 | const wxBitmap& label, |
34 | const wxPoint& pos = wxDefaultPosition, | |
35 | const wxSize& size = wxDefaultSize, | |
36 | long style = 0, | |
37 | const wxString& name = wxStaticBitmapNameStr) | |
bfc6fde4 VZ |
38 | { |
39 | Create(parent, id, label, pos, size, style, name); | |
40 | } | |
83df96d6 | 41 | |
bfc6fde4 | 42 | bool Create(wxWindow *parent, wxWindowID id, |
83df96d6 JS |
43 | const wxBitmap& label, |
44 | const wxPoint& pos = wxDefaultPosition, | |
45 | const wxSize& size = wxDefaultSize, | |
46 | long style = 0, | |
47 | const wxString& name = wxStaticBitmapNameStr); | |
48 | ||
bfc6fde4 | 49 | virtual void SetBitmap(const wxBitmap& bitmap); |
83df96d6 | 50 | |
31528cd3 VZ |
51 | virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event)) |
52 | { | |
53 | return FALSE; | |
54 | } | |
83df96d6 | 55 | |
bfc6fde4 | 56 | wxBitmap& GetBitmap() const { return (wxBitmap&) m_messageBitmap; } |
83df96d6 | 57 | |
b1519886 VZ |
58 | // for compatibility with wxMSW |
59 | const wxIcon& GetIcon() const | |
60 | { | |
61 | // don't use wxDynamicCast, icons and bitmaps are really the same thing | |
62 | return (const wxIcon &)m_messageBitmap; | |
63 | } | |
83df96d6 | 64 | |
b1519886 VZ |
65 | // for compatibility with wxMSW |
66 | void SetIcon(const wxIcon& icon) | |
67 | { | |
68 | SetBitmap( icon ); | |
69 | } | |
83df96d6 | 70 | |
bfc6fde4 VZ |
71 | // overriden base class virtuals |
72 | virtual bool AcceptsFocus() const { return FALSE; } | |
83df96d6 | 73 | |
bfc6fde4 VZ |
74 | // Implementation |
75 | virtual void ChangeFont(bool keepOriginalSize = TRUE); | |
76 | virtual void ChangeBackgroundColour(); | |
77 | virtual void ChangeForegroundColour(); | |
83df96d6 | 78 | |
bfc6fde4 VZ |
79 | protected: |
80 | wxBitmap m_messageBitmap; | |
9b6dbb09 JS |
81 | }; |
82 | ||
83 | #endif | |
83df96d6 | 84 | // _WX_STATBMP_H_ |