]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_radbt.cpp
fix for non-utf-8 character support in 'content'
[wxWidgets.git] / src / xrc / xh_radbt.cpp
CommitLineData
78d14f80
VS
1/////////////////////////////////////////////////////////////////////////////
2// Name: xh_radbt.cpp
b5d6954b 3// Purpose: XRC resource for wxRadioButton
78d14f80
VS
4// Author: Bob Mitchell
5// Created: 2000/03/21
6// RCS-ID: $Id$
7// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
f80ea77b 10
78d14f80
VS
11// For compilers that support precompilation, includes "wx.h".
12#include "wx/wxprec.h"
13
14#ifdef __BORLANDC__
15 #pragma hdrstop
16#endif
17
0148745b 18#if wxUSE_XRC && wxUSE_RADIOBTN
a1e4ec87 19
78d14f80
VS
20#include "wx/xrc/xh_radbt.h"
21#include "wx/radiobut.h"
22
854e189f
VS
23IMPLEMENT_DYNAMIC_CLASS(wxRadioButtonXmlHandler, wxXmlResourceHandler)
24
f80ea77b
WS
25wxRadioButtonXmlHandler::wxRadioButtonXmlHandler()
26: wxXmlResourceHandler()
78d14f80 27{
544fee32 28 XRC_ADD_STYLE(wxRB_GROUP);
a565f84b 29 XRC_ADD_STYLE(wxRB_SINGLE);
78d14f80
VS
30 AddWindowStyles();
31}
32
33wxObject *wxRadioButtonXmlHandler::DoCreateResource()
f80ea77b 34{
78d14f80
VS
35 /* BOBM - implementation note.
36 * once the wxBitmapRadioButton is implemented.
f80ea77b
WS
37 * look for a bitmap property. If not null,
38 * make it a wxBitmapRadioButton instead of the
78d14f80 39 * normal radio button.
f80ea77b 40 */
78d14f80 41
544fee32 42 XRC_MAKE_INSTANCE(control, wxRadioButton)
f2588180
VS
43
44 control->Create(m_parentAsWindow,
45 GetID(),
46 GetText(wxT("label")),
47 GetPosition(), GetSize(),
48 GetStyle(),
49 wxDefaultValidator,
50 GetName());
78d14f80 51
544fee32 52 control->SetValue(GetBool(wxT("value"), 0));
78d14f80 53 SetupWindow(control);
f80ea77b 54
78d14f80
VS
55 return control;
56}
57
78d14f80
VS
58bool wxRadioButtonXmlHandler::CanHandle(wxXmlNode *node)
59{
60 return IsOfClass(node, wxT("wxRadioButton"));
61}
62
0148745b 63#endif // wxUSE_XRC && wxUSE_RADIOBTN