]> git.saurik.com Git - wxWidgets.git/blame - contrib/src/xml/xh_chckb.cpp
Moved applet code into contrib.
[wxWidgets.git] / contrib / src / xml / xh_chckb.cpp
CommitLineData
56d2f750
VS
1/////////////////////////////////////////////////////////////////////////////
2// Name: xh_chckb.cpp
3// Purpose: XML resource for wxCheckBox
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/xml/xh_chckb.h"
23#include "wx/checkbox.h"
24
25#if wxUSE_CHECKBOX
26
27wxCheckBoxXmlHandler::wxCheckBoxXmlHandler()
28: wxXmlResourceHandler()
29{
09dc1241 30 AddWindowStyles();
56d2f750
VS
31}
32
33wxObject *wxCheckBoxXmlHandler::DoCreateResource()
34{
ab708d5d 35 wxCheckBox *control = new wxCheckBox(m_parentAsWindow,
56d2f750 36 GetID(),
a559d708 37 GetText(wxT("label")),
56d2f750
VS
38 GetPosition(), GetSize(),
39 GetStyle(),
40 wxDefaultValidator,
41 GetName()
42 );
43
a559d708 44 control->SetValue( GetBool( wxT("checked")));
56d2f750
VS
45 SetupWindow(control);
46
47 return control;
48}
49
50
51
52bool wxCheckBoxXmlHandler::CanHandle(wxXmlNode *node)
53{
a559d708 54 return IsOfClass(node, wxT("wxCheckBox"));
56d2f750
VS
55}
56
57#endif