]>
Commit | Line | Data |
---|---|---|
5c6eb3a8 | 1 | ///////////////////////////////////////////////////////////////////////////// |
80fdcdb9 | 2 | // Name: wx/osx/carbon/statbmp.h |
5c6eb3a8 SC |
3 | // Purpose: wxStaticBitmap class |
4 | // Author: Stefan Csomor | |
5 | // Modified by: | |
6 | // Created: 1998-01-01 | |
5c6eb3a8 SC |
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 | ||
6dd0883d SN |
41 | virtual void Command(wxCommandEvent& WXUNUSED(event)) {} |
42 | virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {} | |
5c6eb3a8 SC |
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 | ||
4c51a665 | 53 | // overridden base class virtuals |
8e6efd1f | 54 | virtual bool AcceptsFocus() const { return false; } |
5c6eb3a8 SC |
55 | |
56 | protected: | |
57 | virtual wxSize DoGetBestSize() const; | |
58 | ||
59 | wxBitmap m_bitmap; | |
03647350 | 60 | DECLARE_EVENT_TABLE() |
5c6eb3a8 SC |
61 | }; |
62 | ||
63 | #endif | |
64 | // _WX_STATBMP_H_ |