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