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