]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xrc/xh_chckb.cpp
removed enum that was causing more problems than it was worth
[wxWidgets.git] / contrib / src / xrc / xh_chckb.cpp
index 9bd2eb99ace4f78a886aa9a46e2b3cc917de3a88..242a33645be34a04f9b261231d2c5a11a27e3911 100644 (file)
@@ -7,7 +7,7 @@
 // Copyright:   (c) 2000 Bob Mitchell and Verant Interactive
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 // Copyright:   (c) 2000 Bob Mitchell and Verant Interactive
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
+
 #ifdef __GNUG__
 #pragma implementation "xh_chckb.h"
 #endif
 #ifdef __GNUG__
 #pragma implementation "xh_chckb.h"
 #endif
 
 #if wxUSE_CHECKBOX
 
 
 #if wxUSE_CHECKBOX
 
-wxCheckBoxXmlHandler::wxCheckBoxXmlHandler() 
-: wxXmlResourceHandler() 
+IMPLEMENT_DYNAMIC_CLASS(wxCheckBoxXmlHandler, wxXmlResourceHandler)
+
+wxCheckBoxXmlHandler::wxCheckBoxXmlHandler()
+: wxXmlResourceHandler()
 {
     AddWindowStyles();
 }
 
 wxObject *wxCheckBoxXmlHandler::DoCreateResource()
 {
     AddWindowStyles();
 }
 
 wxObject *wxCheckBoxXmlHandler::DoCreateResource()
-{ 
-    wxCheckBox *control = new wxCheckBox(m_parentAsWindow,
-                                    GetID(),
-                                    GetText(wxT("label")),
-                                    GetPosition(), GetSize(),
-                                    GetStyle(),
-                                    wxDefaultValidator,
-                                    GetName()
-                                    );
-
-    control->SetValue( GetBool( wxT("checked")));
+{
+    XRC_MAKE_INSTANCE(control, wxCheckBox)
+
+    control->Create(m_parentAsWindow,
+                    GetID(),
+                    GetText(wxT("label")),
+                    GetPosition(), GetSize(),
+                    GetStyle(),
+                    wxDefaultValidator,
+                    GetName());
+
+    control->SetValue(GetBool( wxT("checked")));
     SetupWindow(control);
     SetupWindow(control);
-    
+
     return control;
 }
 
     return control;
 }
 
-
-
 bool wxCheckBoxXmlHandler::CanHandle(wxXmlNode *node)
 {
     return IsOfClass(node, wxT("wxCheckBox"));
 bool wxCheckBoxXmlHandler::CanHandle(wxXmlNode *node)
 {
     return IsOfClass(node, wxT("wxCheckBox"));