]>
git.saurik.com Git - wxWidgets.git/blob - src/generic/statbmpg.cpp
735c0b9d32ca8ea8f37766334ccc0f037f5130ba
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/generic/statbmpg.cpp
3 // Purpose: wxGenericStaticBitmap
4 // Author: Marcin Wojdyr, Stefan Csomor
7 // Copyright: wxWidgets developers
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #include "wx/wxprec.h"
16 #include "wx/dcclient.h"
19 #include "wx/generic/statbmpg.h"
21 bool wxGenericStaticBitmap::Create(wxWindow
*parent
, wxWindowID id
,
22 const wxBitmap
& bitmap
,
23 const wxPoint
& pos
, const wxSize
& size
,
24 long style
, const wxString
& name
)
26 if (! wxControl::Create(parent
, id
, pos
, size
, style
,
27 wxDefaultValidator
, name
))
30 Connect(wxEVT_PAINT
, wxPaintEventHandler(wxGenericStaticBitmap::OnPaint
));
34 void wxGenericStaticBitmap::OnPaint(wxPaintEvent
& WXUNUSED(event
))
38 dc
.DrawBitmap(m_bitmap
, 0, 0, true);
41 // under OSX_cocoa is a define, avoid duplicate info
42 #ifndef wxGenericStaticBitmap
44 IMPLEMENT_DYNAMIC_CLASS(wxGenericStaticBitmap
, wxStaticBitmapBase
)
48 #endif // wxUSE_STATBMP