]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xml/xh_bttn.cpp
test for bug with new wu-ftpd
[wxWidgets.git] / contrib / src / xml / xh_bttn.cpp
index 39c58b49896f128e7f73a718cea8f888be73cc35..c73b849310f4f38c3a9d565b7956eb028e1a0232 100644 (file)
 #include "wx/button.h"
 
 
 #include "wx/button.h"
 
 
+wxButtonXmlHandler::wxButtonXmlHandler() 
+: wxXmlResourceHandler() 
+{
+    AddWindowStyles();
+}
+
+
 wxObject *wxButtonXmlHandler::DoCreateResource()
 { 
     wxButton *button = new wxButton(m_ParentAsWindow,
                                     GetID(),
                                     GetText(_T("label")),
                                     GetPosition(), GetSize(),
 wxObject *wxButtonXmlHandler::DoCreateResource()
 { 
     wxButton *button = new wxButton(m_ParentAsWindow,
                                     GetID(),
                                     GetText(_T("label")),
                                     GetPosition(), GetSize(),
-                                    GetStyle());
-    button->SetName(GetName());
+                                    GetStyle(),
+                                    wxDefaultValidator,
+                                    GetName());
     if (GetBool(_T("default"), 0) == 1) button->SetDefault();
     SetupWindow(button);
     
     if (GetBool(_T("default"), 0) == 1) button->SetDefault();
     SetupWindow(button);
     
@@ -41,7 +49,7 @@ wxObject *wxButtonXmlHandler::DoCreateResource()
 
 bool wxButtonXmlHandler::CanHandle(wxXmlNode *node)
 {
 
 bool wxButtonXmlHandler::CanHandle(wxXmlNode *node)
 {
-    return node->GetName() == _T("button");
+    return IsOfClass(node, _T("wxButton"));
 }
 
 
 }