]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/statbmp.h
Modified Files:
[wxWidgets.git] / include / wx / mac / statbmp.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: statbmp.h
3 // Purpose: wxStaticBitmap class
4 // Author: AUTHOR
5 // Modified by:
6 // Created: ??/??/98
7 // RCS-ID: $Id$
8 // Copyright: (c) AUTHOR
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/icon.h"
20
21 class WXDLLEXPORT wxStaticBitmap: public wxStaticBitmapBase
22 {
23 DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
24 public:
25 inline wxStaticBitmap() { }
26
27 inline wxStaticBitmap(wxWindow *parent, wxWindowID id,
28 const wxBitmap& label,
29 const wxPoint& pos = wxDefaultPosition,
30 const wxSize& size = wxDefaultSize,
31 long style = 0,
32 const wxString& name = wxStaticBitmapNameStr)
33 {
34 Create(parent, id, label, pos, size, style, name);
35 }
36
37 bool Create(wxWindow *parent, wxWindowID id,
38 const wxBitmap& label,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize,
41 long style = 0,
42 const wxString& name = wxStaticBitmapNameStr);
43
44 virtual void SetBitmap(const wxBitmap& bitmap);
45
46 virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
47 virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
48 virtual void OnPaint( wxPaintEvent &event ) ;
49 void SetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO);
50
51 wxBitmap GetBitmap() const { return m_bitmap; }
52 wxIcon GetIcon() const
53 {
54 // icons and bitmaps are really the same thing in wxMac
55 return (const wxIcon &)m_bitmap;
56 }
57 void SetIcon(const wxIcon& icon) { SetBitmap( (const wxBitmap &)icon ) ; }
58
59 // overriden base class virtuals
60 virtual bool AcceptsFocus() const { return FALSE; }
61 virtual wxSize DoGetBestSize() const ;
62
63 protected:
64 wxBitmap m_bitmap;
65 DECLARE_EVENT_TABLE()
66 };
67
68 #endif
69 // _WX_STATBMP_H_