]> git.saurik.com Git - wxWidgets.git/blame - contrib/src/xml/xh_radbt.cpp
removed libxpm dependencies from makefiles
[wxWidgets.git] / contrib / src / xml / xh_radbt.cpp
CommitLineData
56d2f750
VS
1/////////////////////////////////////////////////////////////////////////////
2// Name: xh_radbt.cpp
3// Purpose: XML resource for wxRadioButton
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/xml/xh_radbt.h"
23#include "wx/radiobut.h"
24
25#if wxUSE_RADIOBOX
26
27wxRadioButtonXmlHandler::wxRadioButtonXmlHandler()
28: wxXmlResourceHandler()
29{
30 ADD_STYLE( wxRB_GROUP );
09dc1241 31 AddWindowStyles();
56d2f750
VS
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
ab708d5d 43 wxRadioButton *control = new wxRadioButton(m_parentAsWindow,
56d2f750 44 GetID(),
a559d708 45 GetText(wxT("label")),
56d2f750
VS
46 GetPosition(), GetSize(),
47 GetStyle(),
48 wxDefaultValidator,
49 GetName()
50 );
51
a559d708 52 control->SetValue( GetBool(wxT("value"), 0));
56d2f750
VS
53 SetupWindow(control);
54
55 return control;
56}
57
58
59
60bool wxRadioButtonXmlHandler::CanHandle(wxXmlNode *node)
61{
a559d708 62 return IsOfClass(node, wxT("wxRadioButton"));
56d2f750
VS
63}
64
65
66#endif