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