]>
git.saurik.com Git - wxWidgets.git/blob - src/univ/statbmp.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/univ/statbmp.cpp
3 // Purpose: wxStaticBitmap implementation
4 // Author: Vadim Zeitlin
7 // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // ============================================================================
13 // ============================================================================
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 #include "wx/wxprec.h"
27 #include "wx/statbmp.h"
32 #include "wx/validate.h"
35 #include "wx/univ/renderer.h"
36 #include "wx/univ/theme.h"
38 // ============================================================================
40 // ============================================================================
42 // ----------------------------------------------------------------------------
44 // ----------------------------------------------------------------------------
46 bool wxStaticBitmap::Create(wxWindow
*parent
,
48 const wxBitmap
&label
,
54 if ( !wxControl::Create(parent
, id
, pos
, size
, style
, wxDefaultValidator
, name
) )
60 // and adjust our size to fit it after this
66 // ----------------------------------------------------------------------------
67 // bitmap/icon setting/getting and converting between
68 // ----------------------------------------------------------------------------
70 void wxStaticBitmap::SetBitmap(const wxBitmap
& bitmap
)
75 void wxStaticBitmap::SetIcon(const wxIcon
& icon
)
78 m_bitmap
.CopyFromIcon(icon
);
80 m_bitmap
= (const wxBitmap
&)icon
;
84 wxIcon
wxStaticBitmap::GetIcon() const
88 icon
.CopyFromBitmap(m_bitmap
);
90 icon
= (const wxIcon
&)m_bitmap
;
95 // ----------------------------------------------------------------------------
97 // ----------------------------------------------------------------------------
99 void wxStaticBitmap::DoDraw(wxControlRenderer
*renderer
)
101 wxControl::DoDraw(renderer
);
102 renderer
->DrawBitmap(GetBitmap());
105 #endif // wxUSE_STATBMP