]>
git.saurik.com Git - wxWidgets.git/blob - contrib/src/xml/xh_bmpbt.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: XML resource for bitmap buttons
7 // Copyright: (c) 2000 Brian Gavin
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #pragma implementation "xh_bmpbt.h"
15 // For compilers that support precompilation, includes "wx.h".
16 #include "wx/wxprec.h"
22 #include "wx/xml/xh_bmpbt.h"
23 #include <wx/bmpbuttn.h>
25 wxBitmapButtonXmlHandler::wxBitmapButtonXmlHandler()
26 : wxXmlResourceHandler()
28 ADD_STYLE(wxBU_AUTODRAW
);
30 ADD_STYLE(wxBU_RIGHT
);
32 ADD_STYLE(wxBU_BOTTOM
);
37 wxObject
*wxBitmapButtonXmlHandler::DoCreateResource()
39 wxBitmapButton
*button
= new wxBitmapButton(m_ParentAsWindow
,
41 GetBitmap(_T("bitmap"), GetSize()),
42 //GetBitmap(_T("bitmap")),
43 GetPosition(), GetSize(),
44 GetStyle(_T("style"), wxBU_AUTODRAW
),
47 if (GetBool(_T("default"), 0) == 1) button
->SetDefault();
55 bool wxBitmapButtonXmlHandler::CanHandle(wxXmlNode
*node
)
57 return node
->GetName() == _T("bitmapbutton");