]>
git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_tglbtn.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: XRC resource for wxCheckBox
4 // Author: Bob Mitchell
7 // Copyright: (c) 2000 Bob Mitchell and Verant Interactive
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
12 #pragma implementation "xh_tglbtn.h"
15 // For compilers that support precompilation, includes "wx.h".
16 #include "wx/wxprec.h"
22 #if wxUSE_XRC && wxUSE_TOGGLEBTN
24 #include "wx/xrc/xh_tglbtn.h"
25 #include "wx/tglbtn.h"
27 IMPLEMENT_DYNAMIC_CLASS(wxToggleButtonXmlHandler
, wxXmlResourceHandler
)
29 wxToggleButtonXmlHandler::wxToggleButtonXmlHandler()
30 : wxXmlResourceHandler()
35 wxObject
*wxToggleButtonXmlHandler::DoCreateResource()
37 XRC_MAKE_INSTANCE(control
, wxToggleButton
)
39 control
->Create(m_parentAsWindow
,
41 GetText(wxT("label")),
42 GetPosition(), GetSize(),
47 control
->SetValue(GetBool( wxT("checked")));
53 bool wxToggleButtonXmlHandler::CanHandle(wxXmlNode
*node
)
55 return IsOfClass(node
, wxT("wxToggleButton"));
58 #endif // wxUSE_XRC && wxUSE_TOGGLEBTN