]>
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 // For compilers that support precompilation, includes "wx.h". 
  12 #include "wx/wxprec.h" 
  18 #if wxUSE_XRC && wxUSE_TOGGLEBTN 
  20 #include "wx/xrc/xh_tglbtn.h" 
  21 #include "wx/tglbtn.h" 
  23 IMPLEMENT_DYNAMIC_CLASS(wxToggleButtonXmlHandler
, wxXmlResourceHandler
) 
  25 wxToggleButtonXmlHandler::wxToggleButtonXmlHandler() 
  26 : wxXmlResourceHandler() 
  31 wxObject 
*wxToggleButtonXmlHandler::DoCreateResource() 
  33     XRC_MAKE_INSTANCE(control
, wxToggleButton
) 
  35     control
->Create(m_parentAsWindow
, 
  37                     GetText(wxT("label")), 
  38                     GetPosition(), GetSize(), 
  43     control
->SetValue(GetBool( wxT("checked"))); 
  49 bool wxToggleButtonXmlHandler::CanHandle(wxXmlNode 
*node
) 
  51     return IsOfClass(node
, wxT("wxToggleButton")); 
  54 #endif // wxUSE_XRC && wxUSE_TOGGLEBTN