]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xml/xh_bttn.cpp
added 'name' to wxEditableListBox ctor
[wxWidgets.git] / contrib / src / xml / xh_bttn.cpp
index a689d49ed33bfde09d78c94d9d376a69aa612a38..b0c31f12c18682e4ab5ae65befa2502b28bb96eb 100644 (file)
 #include "wx/button.h"
 
 
+wxButtonXmlHandler::wxButtonXmlHandler() 
+: wxXmlResourceHandler() 
+{
+    AddWindowStyles();
+}
+
+
 wxObject *wxButtonXmlHandler::DoCreateResource()
 { 
-    wxButton *button = new wxButton(m_ParentAsWindow,
+    wxButton *button = new wxButton(m_parentAsWindow,
                                     GetID(),
-                                    GetText(_T("label")),
+                                    GetText(wxT("label")),
                                     GetPosition(), GetSize(),
                                     GetStyle(),
                                     wxDefaultValidator,
                                     GetName());
-    if (GetBool(_T("default"), 0) == 1) button->SetDefault();
+    if (GetBool(wxT("default"), 0) == 1) button->SetDefault();
     SetupWindow(button);
     
     return button;
@@ -42,7 +49,7 @@ wxObject *wxButtonXmlHandler::DoCreateResource()
 
 bool wxButtonXmlHandler::CanHandle(wxXmlNode *node)
 {
-    return node->GetName() == _T("button");
+    return IsOfClass(node, wxT("wxButton"));
 }