]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xml/xh_bmpbt.cpp
added 'name' to wxEditableListBox ctor
[wxWidgets.git] / contrib / src / xml / xh_bmpbt.cpp
index cfc3fe5891f568567ee8f0db1673b104b5d05e39..314d91e24c25bb5ca219ae3158d94592a42be371 100644 (file)
@@ -36,17 +36,23 @@ wxBitmapButtonXmlHandler::wxBitmapButtonXmlHandler()
 
 wxObject *wxBitmapButtonXmlHandler::DoCreateResource()
 { 
-    wxBitmapButton *button = new wxBitmapButton(m_ParentAsWindow,
+    wxBitmapButton *button = new wxBitmapButton(m_parentAsWindow,
                                     GetID(),
-                                    GetBitmap(_T("bitmap"), GetSize()),
-                                    //GetBitmap(_T("bitmap")),
+                                    GetBitmap(wxT("bitmap")),
                                     GetPosition(), GetSize(),
-                                    GetStyle(_T("style"), wxBU_AUTODRAW),
+                                    GetStyle(wxT("style"), wxBU_AUTODRAW),
                                     wxDefaultValidator,
                                     GetName());
-    if (GetBool(_T("default"), 0) == 1) button->SetDefault();
+    if (GetBool(wxT("default"), 0) == 1) button->SetDefault();
     SetupWindow(button);
     
+    if (!GetParamValue(wxT("selected")).IsEmpty())
+        button->SetBitmapSelected(GetBitmap(wxT("selected")));
+    if (!GetParamValue(wxT("focus")).IsEmpty())
+        button->SetBitmapFocus(GetBitmap(wxT("focus")));
+    if (!GetParamValue(wxT("disabled")).IsEmpty())
+        button->SetBitmapDisabled(GetBitmap(wxT("disabled")));
+    
     return button;
 }
 
@@ -54,7 +60,7 @@ wxObject *wxBitmapButtonXmlHandler::DoCreateResource()
 
 bool wxBitmapButtonXmlHandler::CanHandle(wxXmlNode *node)
 {
-    return node->GetName() == _T("bitmapbutton");
+    return IsOfClass(node, wxT("wxBitmapButton"));
 }