]>
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
8 // Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 #include "wx/wxprec.h"
28 #include "wx/statbmp.h"
33 #include "wx/validate.h"
36 #include "wx/univ/renderer.h"
37 #include "wx/univ/theme.h"
39 // ============================================================================
41 // ============================================================================
43 // ----------------------------------------------------------------------------
45 // ----------------------------------------------------------------------------
47 bool wxStaticBitmap::Create(wxWindow
*parent
,
49 const wxBitmap
&label
,
55 if ( !wxControl::Create(parent
, id
, pos
, size
, style
, wxDefaultValidator
, name
) )
61 // and adjust our size to fit it after this
67 // ----------------------------------------------------------------------------
68 // bitmap/icon setting/getting and converting between
69 // ----------------------------------------------------------------------------
71 void wxStaticBitmap::SetBitmap(const wxBitmap
& bitmap
)
76 void wxStaticBitmap::SetIcon(const wxIcon
& icon
)
79 m_bitmap
.CopyFromIcon(icon
);
81 m_bitmap
= (const wxBitmap
&)icon
;
85 wxIcon
wxStaticBitmap::GetIcon() const
89 icon
.CopyFromBitmap(m_bitmap
);
91 icon
= (const wxIcon
&)m_bitmap
;
96 // ----------------------------------------------------------------------------
98 // ----------------------------------------------------------------------------
100 void wxStaticBitmap::DoDraw(wxControlRenderer
*renderer
)
102 wxControl::DoDraw(renderer
);
103 renderer
->DrawBitmap(GetBitmap());
106 #endif // wxUSE_STATBMP