]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/statbmp.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __GTKSTATICBITMAPH__
12 #define __GTKSTATICBITMAPH__
22 #include "wx/object.h"
23 #include "wx/control.h"
24 #include "wx/bitmap.h"
27 //-----------------------------------------------------------------------------
29 //-----------------------------------------------------------------------------
33 //-----------------------------------------------------------------------------
35 //-----------------------------------------------------------------------------
37 extern const char* wxStaticBitmapNameStr
;
39 //-----------------------------------------------------------------------------
41 //-----------------------------------------------------------------------------
43 class wxStaticBitmap
: public wxControl
45 DECLARE_DYNAMIC_CLASS(wxStaticBitmap
)
49 wxStaticBitmap( wxWindow
*parent
,
51 const wxBitmap
& label
,
52 const wxPoint
& pos
= wxDefaultPosition
,
53 const wxSize
& size
= wxDefaultSize
,
55 const wxString
& name
= wxStaticBitmapNameStr
);
56 bool Create( wxWindow
*parent
,
58 const wxBitmap
& label
,
59 const wxPoint
& pos
= wxDefaultPosition
,
60 const wxSize
& size
= wxDefaultSize
,
62 const wxString
& name
= wxStaticBitmapNameStr
);
64 virtual void SetBitmap( const wxBitmap
& bitmap
);
66 wxBitmap
& GetBitmap() { return m_bitmap
; }
67 const wxBitmap
& GetBitmap() const { return m_bitmap
; }
69 // for compatibility with wxMSW
70 const wxIcon
& GetIcon() const
72 // don't use wxDynamicCast, icons and bitmaps are really the same thing
74 return (const wxIcon
&)m_bitmap
;
77 // for compatibility with wxMSW
78 void SetIcon(const wxIcon
& icon
)
84 virtual wxSize
DoGetBestSize() const;
87 // creates the new pixmap widget
88 void CreatePixmapWidget();
95 #endif // __GTKSTATICBITMAPH__