]>
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 #if wxUSE_XRC && wxUSE_RADIOBOX
24 #include "wx/xrc/xh_radbt.h"
25 #include "wx/radiobut.h"
27 IMPLEMENT_DYNAMIC_CLASS(wxRadioButtonXmlHandler
, wxXmlResourceHandler
)
29 wxRadioButtonXmlHandler::wxRadioButtonXmlHandler()
30 : wxXmlResourceHandler()
32 XRC_ADD_STYLE(wxRB_GROUP
);
36 wxObject
*wxRadioButtonXmlHandler::DoCreateResource()
38 /* BOBM - implementation note.
39 * once the wxBitmapRadioButton is implemented.
40 * look for a bitmap property. If not null,
41 * make it a wxBitmapRadioButton instead of the
42 * normal radio button.
45 XRC_MAKE_INSTANCE(control
, wxRadioButton
)
47 control
->Create(m_parentAsWindow
,
49 GetText(wxT("label")),
50 GetPosition(), GetSize(),
55 control
->SetValue(GetBool(wxT("value"), 0));
61 bool wxRadioButtonXmlHandler::CanHandle(wxXmlNode
*node
)
63 return IsOfClass(node
, wxT("wxRadioButton"));
66 #endif // wxUSE_XRC && wxUSE_NOTEBOOK