]> git.saurik.com Git - wxWidgets.git/blob - include/wx/motif/statbmp.h
Added many WXUNUSED, untabified once again.
[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 #ifdef __GNUG__
16 #pragma interface "statbmp.h"
17 #endif
18
19 #include "wx/control.h"
20 #include "wx/icon.h"
21
22 WXDLLEXPORT_DATA(extern const char*) wxStaticBitmapNameStr;
23
24 class WXDLLEXPORT wxStaticBitmap : public wxControl
25 {
26 DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
27
28 public:
29 wxStaticBitmap() { }
30 ~wxStaticBitmap();
31
32 wxStaticBitmap(wxWindow *parent, wxWindowID id,
33 const wxBitmap& label,
34 const wxPoint& pos = wxDefaultPosition,
35 const wxSize& size = wxDefaultSize,
36 long style = 0,
37 const wxString& name = wxStaticBitmapNameStr)
38 {
39 Create(parent, id, label, pos, size, style, name);
40 }
41
42 bool Create(wxWindow *parent, wxWindowID id,
43 const wxBitmap& label,
44 const wxPoint& pos = wxDefaultPosition,
45 const wxSize& size = wxDefaultSize,
46 long style = 0,
47 const wxString& name = wxStaticBitmapNameStr);
48
49 virtual void SetBitmap(const wxBitmap& bitmap);
50
51 virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
52 {
53 return FALSE;
54 }
55
56 wxBitmap& GetBitmap() const { return (wxBitmap&) m_messageBitmap; }
57
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 }
64
65 // for compatibility with wxMSW
66 void SetIcon(const wxIcon& icon)
67 {
68 SetBitmap( icon );
69 }
70
71 // overriden base class virtuals
72 virtual bool AcceptsFocus() const { return FALSE; }
73
74 // Implementation
75 virtual void ChangeFont(bool keepOriginalSize = TRUE);
76 virtual void ChangeBackgroundColour();
77 virtual void ChangeForegroundColour();
78
79 protected:
80 wxBitmap m_messageBitmap;
81 };
82
83 #endif
84 // _WX_STATBMP_H_