]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_chckb.cpp
Somehow, setting a tint color makes gauge work :/.
[wxWidgets.git] / src / xrc / xh_chckb.cpp
CommitLineData
78d14f80 1/////////////////////////////////////////////////////////////////////////////
ab1ce969 2// Name: src/xrc/xh_chckb.cpp
b5d6954b 3// Purpose: XRC resource for wxCheckBox
78d14f80
VS
4// Author: Bob Mitchell
5// Created: 2000/03/21
78d14f80
VS
6// Copyright: (c) 2000 Bob Mitchell and Verant Interactive
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
f80ea77b 9
78d14f80
VS
10// For compilers that support precompilation, includes "wx.h".
11#include "wx/wxprec.h"
12
13#ifdef __BORLANDC__
14 #pragma hdrstop
15#endif
16
621be1ec 17#if wxUSE_XRC && wxUSE_CHECKBOX
a1e4ec87 18
78d14f80 19#include "wx/xrc/xh_chckb.h"
ab1ce969
WS
20
21#ifndef WX_PRECOMP
22 #include "wx/checkbox.h"
23#endif
78d14f80 24
854e189f
VS
25IMPLEMENT_DYNAMIC_CLASS(wxCheckBoxXmlHandler, wxXmlResourceHandler)
26
f80ea77b
WS
27wxCheckBoxXmlHandler::wxCheckBoxXmlHandler()
28: wxXmlResourceHandler()
78d14f80 29{
4ac23d05
RD
30 XRC_ADD_STYLE(wxCHK_2STATE);
31 XRC_ADD_STYLE(wxCHK_3STATE);
32 XRC_ADD_STYLE(wxCHK_ALLOW_3RD_STATE_FOR_USER);
33 XRC_ADD_STYLE(wxALIGN_RIGHT);
78d14f80
VS
34 AddWindowStyles();
35}
36
37wxObject *wxCheckBoxXmlHandler::DoCreateResource()
f80ea77b 38{
544fee32 39 XRC_MAKE_INSTANCE(control, wxCheckBox)
f2588180
VS
40
41 control->Create(m_parentAsWindow,
42 GetID(),
43 GetText(wxT("label")),
44 GetPosition(), GetSize(),
45 GetStyle(),
46 wxDefaultValidator,
47 GetName());
78d14f80 48
544fee32 49 control->SetValue(GetBool( wxT("checked")));
78d14f80 50 SetupWindow(control);
f80ea77b 51
78d14f80
VS
52 return control;
53}
54
78d14f80
VS
55bool wxCheckBoxXmlHandler::CanHandle(wxXmlNode *node)
56{
57 return IsOfClass(node, wxT("wxCheckBox"));
58}
59
621be1ec 60#endif // wxUSE_XRC && wxUSE_CHECKBOX