]> git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/statbmp.h
wxMGL revitalised with OpenWatcom.
[wxWidgets.git] / include / wx / motif / statbmp.h
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
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_STATBMP_H_
13 #define _WX_STATBMP_H_
14
15 #include "wx/motif/bmpmotif.h"
16 #include "wx/icon.h"
17
18 class WXDLLEXPORT wxStaticBitmap : public wxStaticBitmapBase
19 {
20 DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
21
22 public:
23 wxStaticBitmap() { }
24 ~wxStaticBitmap();
25
26 wxStaticBitmap(wxWindow *parent, wxWindowID id,
27 const wxBitmap& label,
28 const wxPoint& pos = wxDefaultPosition,
29 const wxSize& size = wxDefaultSize,
30 long style = 0,
31 const wxString& name = wxStaticBitmapNameStr)
32 {
33 Create(parent, id, label, pos, size, style, name);
34 }
35
36 bool Create(wxWindow *parent, wxWindowID id,
37 const wxBitmap& label,
38 const wxPoint& pos = wxDefaultPosition,
39 const wxSize& size = wxDefaultSize,
40 long style = 0,
41 const wxString& name = wxStaticBitmapNameStr);
42
43 virtual void SetBitmap(const wxBitmap& bitmap);
44
45 virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
46 {
47 return false;
48 }
49
50 wxBitmap GetBitmap() const { return m_messageBitmap; }
51
52 // for compatibility with wxMSW
53 wxIcon GetIcon() const
54 {
55 // don't use wxDynamicCast, icons and bitmaps are really the same thing
56 return *(wxIcon*)&m_messageBitmap;
57 }
58
59 // for compatibility with wxMSW
60 void SetIcon(const wxIcon& icon)
61 {
62 SetBitmap( icon );
63 }
64
65 // Implementation
66 virtual void ChangeBackgroundColour();
67 virtual void ChangeForegroundColour();
68
69 protected:
70 void DoSetBitmap();
71
72 protected:
73 wxBitmap m_messageBitmap;
74 wxBitmap m_messageBitmapOriginal;
75 wxBitmapCache m_bitmapCache;
76 };
77
78 #endif
79 // _WX_STATBMP_H_