]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/statbmp.h
c24b2128705a0dbba740a6432fa782fbf53028d2
[wxWidgets.git] / include / wx / gtk1 / statbmp.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: statbmp.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10
11 #ifndef __GTKSTATICBITMAPH__
12 #define __GTKSTATICBITMAPH__
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "wx/defs.h"
19
20 #if wxUSE_STATBMP
21
22 #include "wx/object.h"
23 #include "wx/control.h"
24 #include "wx/bitmap.h"
25
26 //-----------------------------------------------------------------------------
27 // classes
28 //-----------------------------------------------------------------------------
29
30 class wxStaticBitmap;
31
32 //-----------------------------------------------------------------------------
33 // global data
34 //-----------------------------------------------------------------------------
35
36 extern const char* wxStaticBitmapNameStr;
37
38 //-----------------------------------------------------------------------------
39 // wxStaticBitmap
40 //-----------------------------------------------------------------------------
41
42 class wxStaticBitmap: public wxControl
43 {
44 DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
45
46 public:
47 wxStaticBitmap();
48 wxStaticBitmap( wxWindow *parent,
49 wxWindowID id,
50 const wxBitmap& label,
51 const wxPoint& pos = wxDefaultPosition,
52 const wxSize& size = wxDefaultSize,
53 long style = 0,
54 const wxString& name = wxStaticBitmapNameStr );
55 bool Create( wxWindow *parent,
56 wxWindowID id,
57 const wxBitmap& label,
58 const wxPoint& pos = wxDefaultPosition,
59 const wxSize& size = wxDefaultSize,
60 long style = 0,
61 const wxString& name = wxStaticBitmapNameStr);
62
63 virtual void SetBitmap( const wxBitmap& bitmap );
64
65 wxBitmap& GetBitmap() { return m_bitmap; }
66 const wxBitmap& GetBitmap() const { return m_bitmap; }
67
68 // for compatibility with wxMSW
69 wxIcon& GetIcon()
70 { return *(wxDynamicCast(&m_bitmap, wxIcon)); }
71
72 private:
73 wxBitmap m_bitmap;
74 };
75
76 #endif
77
78 #endif // __GTKSTATICBITMAPH__