/////////////////////////////////////////////////////////////////////////////
// Name: xh_tglbtn.cpp
-// Purpose: XRC resource for wxCheckBox
+// Purpose: XRC resource for wxToggleButton
// Author: Bob Mitchell
// Created: 2000/03/21
// RCS-ID: $Id$
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation "xh_tglbtn.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#pragma hdrstop
#endif
+#if wxUSE_XRC && wxUSE_TOGGLEBTN
+
#include "wx/xrc/xh_tglbtn.h"
#include "wx/tglbtn.h"
-
-#if wxUSE_TOGGLEBTN
+#include "wx/button.h" // solely for wxBU_EXACTFIT
IMPLEMENT_DYNAMIC_CLASS(wxToggleButtonXmlHandler, wxXmlResourceHandler)
wxToggleButtonXmlHandler::wxToggleButtonXmlHandler()
-: wxXmlResourceHandler()
+ : wxXmlResourceHandler()
{
+ XRC_ADD_STYLE(wxBU_EXACTFIT);
+
AddWindowStyles();
}
return IsOfClass(node, wxT("wxToggleButton"));
}
-#endif
+#endif // wxUSE_XRC && wxUSE_TOGGLEBTN