]>
Commit | Line | Data |
---|---|---|
0dbd6262 SC |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: statbmp.h | |
3 | // Purpose: wxStaticBitmap class | |
a31a5f85 | 4 | // Author: Stefan Csomor |
0dbd6262 | 5 | // Modified by: |
a31a5f85 | 6 | // Created: 1998-01-01 |
0dbd6262 | 7 | // RCS-ID: $Id$ |
a31a5f85 | 8 | // Copyright: (c) Stefan Csomor |
e40298d5 | 9 | // Licence: wxWindows licence |
0dbd6262 SC |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_STATBMP_H_ | |
13 | #define _WX_STATBMP_H_ | |
14 | ||
12028905 | 15 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
0dbd6262 SC |
16 | #pragma interface "statbmp.h" |
17 | #endif | |
18 | ||
584bede0 | 19 | #include "wx/icon.h" |
0dbd6262 | 20 | |
584bede0 | 21 | class WXDLLEXPORT wxStaticBitmap: public wxStaticBitmapBase |
0dbd6262 SC |
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)) {}; | |
f8d5f1e2 | 48 | void OnPaint( wxPaintEvent &event ) ; |
0dbd6262 | 49 | |
584bede0 GD |
50 | wxBitmap GetBitmap() const { return m_bitmap; } |
51 | wxIcon GetIcon() const | |
52 | { | |
e40298d5 JS |
53 | // icons and bitmaps are really the same thing in wxMac |
54 | return (const wxIcon &)m_bitmap; | |
584bede0 | 55 | } |
f9d3748b | 56 | void SetIcon(const wxIcon& icon) { SetBitmap( (const wxBitmap &)icon ) ; } |
56d4016a | 57 | |
0dbd6262 SC |
58 | // overriden base class virtuals |
59 | virtual bool AcceptsFocus() const { return FALSE; } | |
9453cf2b | 60 | virtual wxSize DoGetBestSize() const ; |
0dbd6262 SC |
61 | |
62 | protected: | |
584bede0 | 63 | wxBitmap m_bitmap; |
e40298d5 | 64 | DECLARE_EVENT_TABLE() |
0dbd6262 SC |
65 | }; |
66 | ||
67 | #endif | |
68 | // _WX_STATBMP_H_ |