]>
Commit | Line | Data |
---|---|---|
c801d85f | 1 | ///////////////////////////////////////////////////////////////////////////// |
1e6feb95 | 2 | // Name: wx/gtk/statbmp.h |
c801d85f KB |
3 | // Purpose: |
4 | // Author: Robert Roebling | |
58614078 RR |
5 | // Id: $Id$ |
6 | // Copyright: (c) 1998 Robert Roebling | |
65571936 | 7 | // Licence: wxWindows licence |
c801d85f KB |
8 | ///////////////////////////////////////////////////////////////////////////// |
9 | ||
10 | ||
11 | #ifndef __GTKSTATICBITMAPH__ | |
12 | #define __GTKSTATICBITMAPH__ | |
13 | ||
12028905 | 14 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
c801d85f KB |
15 | #pragma interface |
16 | #endif | |
17 | ||
2df7be7f | 18 | #include "wx/icon.h" |
c801d85f | 19 | |
c801d85f KB |
20 | //----------------------------------------------------------------------------- |
21 | // wxStaticBitmap | |
22 | //----------------------------------------------------------------------------- | |
23 | ||
1e6feb95 | 24 | class wxStaticBitmap : public wxStaticBitmapBase |
1a56f55c | 25 | { |
7f24bd19 VZ |
26 | public: |
27 | wxStaticBitmap(); | |
28 | wxStaticBitmap( wxWindow *parent, | |
29 | wxWindowID id, | |
30 | const wxBitmap& label, | |
31 | const wxPoint& pos = wxDefaultPosition, | |
32 | const wxSize& size = wxDefaultSize, | |
33 | long style = 0, | |
34 | const wxString& name = wxStaticBitmapNameStr ); | |
35 | bool Create( wxWindow *parent, | |
36 | wxWindowID id, | |
37 | const wxBitmap& label, | |
38 | const wxPoint& pos = wxDefaultPosition, | |
39 | const wxSize& size = wxDefaultSize, | |
40 | long style = 0, | |
41 | const wxString& name = wxStaticBitmapNameStr); | |
42 | ||
1e6feb95 | 43 | virtual void SetIcon(const wxIcon& icon) { SetBitmap( icon ); } |
1a56f55c | 44 | virtual void SetBitmap( const wxBitmap& bitmap ); |
1e6feb95 | 45 | virtual wxBitmap GetBitmap() const { return m_bitmap; } |
7f24bd19 VZ |
46 | |
47 | // for compatibility with wxMSW | |
1e6feb95 | 48 | wxIcon GetIcon() const |
c35414db VZ |
49 | { |
50 | // don't use wxDynamicCast, icons and bitmaps are really the same thing | |
51 | // in wxGTK | |
52 | return (const wxIcon &)m_bitmap; | |
53 | } | |
7f24bd19 | 54 | |
9d522606 RD |
55 | static wxVisualAttributes |
56 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
57 | ||
7f24bd19 VZ |
58 | private: |
59 | wxBitmap m_bitmap; | |
1a56f55c | 60 | |
1e6feb95 VZ |
61 | DECLARE_DYNAMIC_CLASS(wxStaticBitmap) |
62 | }; | |
dcf924a3 | 63 | |
c801d85f | 64 | #endif // __GTKSTATICBITMAPH__ |