]>
git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_radbt.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: XRC resource for wxRadioButton
4 // Author: Bob Mitchell
7 // Copyright: (c) 2000 Bob Mitchell and Verant Interactive
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #pragma implementation "xh_radbt.h"
15 // For compilers that support precompilation, includes "wx.h".
16 #include "wx/wxprec.h"
22 #include "wx/xrc/xh_radbt.h"
23 #include "wx/radiobut.h"
27 wxRadioButtonXmlHandler::wxRadioButtonXmlHandler()
28 : wxXmlResourceHandler()
30 ADD_STYLE( wxRB_GROUP
);
34 wxObject
*wxRadioButtonXmlHandler::DoCreateResource()
36 /* BOBM - implementation note.
37 * once the wxBitmapRadioButton is implemented.
38 * look for a bitmap property. If not null,
39 * make it a wxBitmapRadioButton instead of the
40 * normal radio button.
43 wxRadioButton
*control
= wxStaticCast(m_instance
, wxRadioButton
);
46 control
= new wxRadioButton
;
48 control
->Create(m_parentAsWindow
,
50 GetText(wxT("label")),
51 GetPosition(), GetSize(),
56 control
->SetValue( GetBool(wxT("value"), 0));
64 bool wxRadioButtonXmlHandler::CanHandle(wxXmlNode
*node
)
66 return IsOfClass(node
, wxT("wxRadioButton"));