1
/////////////////////////////////////////////////////////////////////////////
2
// Name: src/xrc/xh_radbt.cpp
3
// Purpose: XRC resource for wxRadioButton
4
// Author: Bob Mitchell
6
// RCS-ID: $Id: xh_radbt.cpp 39567 2006-06-05 16:46:15Z ABX $
7
// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
8
// Licence: wxWindows licence
9
/////////////////////////////////////////////////////////////////////////////
11
// For compilers that support precompilation, includes "wx.h".
12
#include "wx/wxprec.h"
18
#if wxUSE_XRC && wxUSE_RADIOBTN
20
#include "wx/xrc/xh_radbt.h"
23
#include "wx/radiobut.h"
26
IMPLEMENT_DYNAMIC_CLASS(wxRadioButtonXmlHandler, wxXmlResourceHandler)
28
wxRadioButtonXmlHandler::wxRadioButtonXmlHandler()
29
: wxXmlResourceHandler()
31
XRC_ADD_STYLE(wxRB_GROUP);
32
XRC_ADD_STYLE(wxRB_SINGLE);
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_RADIOBTN