]> git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/carbon/statbmp.h
Remove all lines containing cvs/svn "$Id$" keyword.
[wxWidgets.git] / include / wx / osx / carbon / statbmp.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/carbon/statbmp.h
3 // Purpose: wxStaticBitmap class
4 // Author: Stefan Csomor
5 // Modified by:
6 // Created: 1998-01-01
7 // Copyright: (c) Stefan Csomor
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_STATBMP_H_
12 #define _WX_STATBMP_H_
13
14 #include "wx/icon.h"
15
16 class WXDLLIMPEXP_CORE wxStaticBitmap: public wxStaticBitmapBase
17 {
18 DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
19 public:
20 wxStaticBitmap() { }
21
22 wxStaticBitmap(wxWindow *parent, wxWindowID id,
23 const wxBitmap& label,
24 const wxPoint& pos = wxDefaultPosition,
25 const wxSize& size = wxDefaultSize,
26 long style = 0,
27 const wxString& name = wxStaticBitmapNameStr)
28 {
29 Create(parent, id, label, pos, size, style, name);
30 }
31
32 bool Create(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 virtual void SetBitmap(const wxBitmap& bitmap);
40
41 virtual void Command(wxCommandEvent& WXUNUSED(event)) {}
42 virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {}
43 void OnPaint( wxPaintEvent &event ) ;
44
45 wxBitmap GetBitmap() const { return m_bitmap; }
46 wxIcon GetIcon() const
47 {
48 // icons and bitmaps are really the same thing in wxMac
49 return (const wxIcon &)m_bitmap;
50 }
51 void SetIcon(const wxIcon& icon) { SetBitmap( (const wxBitmap &)icon ) ; }
52
53 // overridden base class virtuals
54 virtual bool AcceptsFocus() const { return false; }
55
56 protected:
57 virtual wxSize DoGetBestSize() const;
58
59 wxBitmap m_bitmap;
60 DECLARE_EVENT_TABLE()
61 };
62
63 #endif
64 // _WX_STATBMP_H_