]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_radbt.cpp
Determine better whether the property editor needs to be refreshed in wxPGProperty...
[wxWidgets.git] / src / xrc / xh_radbt.cpp
CommitLineData
78d14f80 1/////////////////////////////////////////////////////////////////////////////
b0b5881a 2// Name: src/xrc/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 20#include "wx/xrc/xh_radbt.h"
b0b5881a
WS
21
22#ifndef WX_PRECOMP
23 #include "wx/radiobut.h"
24#endif
78d14f80 25
854e189f
VS
26IMPLEMENT_DYNAMIC_CLASS(wxRadioButtonXmlHandler, wxXmlResourceHandler)
27
f80ea77b
WS
28wxRadioButtonXmlHandler::wxRadioButtonXmlHandler()
29: wxXmlResourceHandler()
78d14f80 30{
544fee32 31 XRC_ADD_STYLE(wxRB_GROUP);
a565f84b 32 XRC_ADD_STYLE(wxRB_SINGLE);
78d14f80
VS
33 AddWindowStyles();
34}
35
36wxObject *wxRadioButtonXmlHandler::DoCreateResource()
f80ea77b 37{
78d14f80
VS
38 /* BOBM - implementation note.
39 * once the wxBitmapRadioButton is implemented.
f80ea77b
WS
40 * look for a bitmap property. If not null,
41 * make it a wxBitmapRadioButton instead of the
78d14f80 42 * normal radio button.
f80ea77b 43 */
78d14f80 44
544fee32 45 XRC_MAKE_INSTANCE(control, wxRadioButton)
f2588180
VS
46
47 control->Create(m_parentAsWindow,
48 GetID(),
49 GetText(wxT("label")),
50 GetPosition(), GetSize(),
51 GetStyle(),
52 wxDefaultValidator,
53 GetName());
78d14f80 54
544fee32 55 control->SetValue(GetBool(wxT("value"), 0));
78d14f80 56 SetupWindow(control);
f80ea77b 57
78d14f80
VS
58 return control;
59}
60
78d14f80
VS
61bool wxRadioButtonXmlHandler::CanHandle(wxXmlNode *node)
62{
63 return IsOfClass(node, wxT("wxRadioButton"));
64}
65
0148745b 66#endif // wxUSE_XRC && wxUSE_RADIOBTN