]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_chckb.cpp
A little different fix for how to delay the call to __wxCleanup
[wxWidgets.git] / src / xrc / xh_chckb.cpp
CommitLineData
78d14f80
VS
1/////////////////////////////////////////////////////////////////////////////
2// Name: xh_chckb.cpp
b5d6954b 3// Purpose: XRC resource for wxCheckBox
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_chckb.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_chckb.h"
23#include "wx/checkbox.h"
24
25#if wxUSE_CHECKBOX
26
27wxCheckBoxXmlHandler::wxCheckBoxXmlHandler()
28: wxXmlResourceHandler()
29{
30 AddWindowStyles();
31}
32
33wxObject *wxCheckBoxXmlHandler::DoCreateResource()
34{
544fee32 35 XRC_MAKE_INSTANCE(control, wxCheckBox)
f2588180
VS
36
37 control->Create(m_parentAsWindow,
38 GetID(),
39 GetText(wxT("label")),
40 GetPosition(), GetSize(),
41 GetStyle(),
42 wxDefaultValidator,
43 GetName());
78d14f80 44
544fee32 45 control->SetValue(GetBool( wxT("checked")));
78d14f80
VS
46 SetupWindow(control);
47
48 return control;
49}
50
78d14f80
VS
51bool wxCheckBoxXmlHandler::CanHandle(wxXmlNode *node)
52{
53 return IsOfClass(node, wxT("wxCheckBox"));
54}
55
56#endif