]>
git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_radbt.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_radbt.cpp
3 // Purpose: XRC resource for wxRadioButton
4 // Author: Bob Mitchell
6 // Copyright: (c) 2000 Bob Mitchell and Verant Interactive
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
17 #if wxUSE_XRC && wxUSE_RADIOBTN
19 #include "wx/xrc/xh_radbt.h"
22 #include "wx/radiobut.h"
25 IMPLEMENT_DYNAMIC_CLASS(wxRadioButtonXmlHandler
, wxXmlResourceHandler
)
27 wxRadioButtonXmlHandler::wxRadioButtonXmlHandler()
28 : wxXmlResourceHandler()
30 XRC_ADD_STYLE(wxRB_GROUP
);
31 XRC_ADD_STYLE(wxRB_SINGLE
);
35 wxObject
*wxRadioButtonXmlHandler::DoCreateResource()
37 /* BOBM - implementation note.
38 * once the wxBitmapRadioButton is implemented.
39 * look for a bitmap property. If not null,
40 * make it a wxBitmapRadioButton instead of the
41 * normal radio button.
44 XRC_MAKE_INSTANCE(control
, wxRadioButton
)
46 control
->Create(m_parentAsWindow
,
48 GetText(wxT("label")),
49 GetPosition(), GetSize(),
54 control
->SetValue(GetBool(wxT("value"), 0));
60 bool wxRadioButtonXmlHandler::CanHandle(wxXmlNode
*node
)
62 return IsOfClass(node
, wxT("wxRadioButton"));
65 #endif // wxUSE_XRC && wxUSE_RADIOBTN