]>
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 /////////////////////////////////////////////////////////////////////////////
11 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
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_RADIOBTN
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
);
33 XRC_ADD_STYLE(wxRB_SINGLE
);
37 wxObject
*wxRadioButtonXmlHandler::DoCreateResource()
39 /* BOBM - implementation note.
40 * once the wxBitmapRadioButton is implemented.
41 * look for a bitmap property. If not null,
42 * make it a wxBitmapRadioButton instead of the
43 * normal radio button.
46 XRC_MAKE_INSTANCE(control
, wxRadioButton
)
48 control
->Create(m_parentAsWindow
,
50 GetText(wxT("label")),
51 GetPosition(), GetSize(),
56 control
->SetValue(GetBool(wxT("value"), 0));
62 bool wxRadioButtonXmlHandler::CanHandle(wxXmlNode
*node
)
64 return IsOfClass(node
, wxT("wxRadioButton"));
67 #endif // wxUSE_XRC && wxUSE_RADIOBTN