]>
git.saurik.com Git - wxWidgets.git/blob - src/generic/statbmpg.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/generic/statbmpg.cpp
3 // Purpose: wxGenericStaticBitmap
4 // Author: Marcin Wojdyr, Stefan Csomor
6 // Copyright: wxWidgets developers
7 // Licence: wxWindows licence
8 ///////////////////////////////////////////////////////////////////////////////
10 #include "wx/wxprec.h"
15 #include "wx/dcclient.h"
18 #include "wx/generic/statbmpg.h"
20 bool wxGenericStaticBitmap::Create(wxWindow
*parent
, wxWindowID id
,
21 const wxBitmap
& bitmap
,
22 const wxPoint
& pos
, const wxSize
& size
,
23 long style
, const wxString
& name
)
25 if (! wxControl::Create(parent
, id
, pos
, size
, style
,
26 wxDefaultValidator
, name
))
29 Connect(wxEVT_PAINT
, wxPaintEventHandler(wxGenericStaticBitmap::OnPaint
));
33 void wxGenericStaticBitmap::OnPaint(wxPaintEvent
& WXUNUSED(event
))
37 dc
.DrawBitmap(m_bitmap
, 0, 0, true);
40 // under OSX_cocoa is a define, avoid duplicate info
41 #ifndef wxGenericStaticBitmap
43 IMPLEMENT_DYNAMIC_CLASS(wxGenericStaticBitmap
, wxStaticBitmapBase
)
47 #endif // wxUSE_STATBMP