]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_radbt.cpp
fixed the menu bug introduced by the previous commit
[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/////////////////////////////////////////////////////////////////////////////
10
11#ifdef __GNUG__
12#pragma implementation "xh_radbt.h"
13#endif
14
15// For compilers that support precompilation, includes "wx.h".
16#include "wx/wxprec.h"
17
18#ifdef __BORLANDC__
19 #pragma hdrstop
20#endif
21
22#include "wx/xrc/xh_radbt.h"
23#include "wx/radiobut.h"
24
25#if wxUSE_RADIOBOX
26
27wxRadioButtonXmlHandler::wxRadioButtonXmlHandler()
28: wxXmlResourceHandler()
29{
544fee32 30 XRC_ADD_STYLE(wxRB_GROUP);
78d14f80
VS
31 AddWindowStyles();
32}
33
34wxObject *wxRadioButtonXmlHandler::DoCreateResource()
35{
36 /* BOBM - implementation note.
37 * once the wxBitmapRadioButton is implemented.
38 * look for a bitmap property. If not null,
39 * make it a wxBitmapRadioButton instead of the
40 * normal radio button.
41 */
42
544fee32 43 XRC_MAKE_INSTANCE(control, wxRadioButton)
f2588180
VS
44
45 control->Create(m_parentAsWindow,
46 GetID(),
47 GetText(wxT("label")),
48 GetPosition(), GetSize(),
49 GetStyle(),
50 wxDefaultValidator,
51 GetName());
78d14f80 52
544fee32 53 control->SetValue(GetBool(wxT("value"), 0));
78d14f80
VS
54 SetupWindow(control);
55
56 return control;
57}
58
78d14f80
VS
59bool wxRadioButtonXmlHandler::CanHandle(wxXmlNode *node)
60{
61 return IsOfClass(node, wxT("wxRadioButton"));
62}
63
78d14f80 64#endif