]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xml/xh_spin.cpp
1) some cleanup in wxHtmlWindow, moved private structures out of headers
[wxWidgets.git] / contrib / src / xml / xh_spin.cpp
index 9ebd9471ee2c4bd9815b83848785df2925c00166..3cc514893e1d121c79b9693ec1d380a277aeec0e 100644 (file)
@@ -31,6 +31,7 @@ wxSpinButtonXmlHandler::wxSpinButtonXmlHandler()
     ADD_STYLE( wxSP_VERTICAL );
     ADD_STYLE( wxSP_ARROW_KEYS );
     ADD_STYLE( wxSP_WRAP );
+    AddWindowStyles();
 }
 
 wxObject *wxSpinButtonXmlHandler::DoCreateResource()
@@ -38,13 +39,13 @@ wxObject *wxSpinButtonXmlHandler::DoCreateResource()
     wxSpinButton *control = new wxSpinButton(m_ParentAsWindow,
                                     GetID(),
                                     GetPosition(), GetSize(),
-                                    GetStyle( _T("style"), wxSP_VERTICAL | wxSP_ARROW_KEYS ),
+                                    GetStyle( wxT("style"), wxSP_VERTICAL | wxSP_ARROW_KEYS ),
                                     GetName()
                                     );
 
-    control->SetValue( GetLong( _T("value"), wxSP_DEFAULT_VALUE) );
-    control->SetRange( GetLong( _T("min"), wxSP_DEFAULT_MIN),
-            GetLong( _T("max"), wxSP_DEFAULT_MAX) );
+    control->SetValue( GetLong( wxT("value"), wxSP_DEFAULT_VALUE) );
+    control->SetRange( GetLong( wxT("min"), wxSP_DEFAULT_MIN),
+            GetLong( wxT("max"), wxSP_DEFAULT_MAX) );
     SetupWindow(control);
     
     return control;
@@ -54,7 +55,7 @@ wxObject *wxSpinButtonXmlHandler::DoCreateResource()
 
 bool wxSpinButtonXmlHandler::CanHandle(wxXmlNode *node)
 {
-    return node->GetName() == _T("spinbutton");
+    return node->GetName() == wxT("spinbutton");
 }
 
 #endif // wxUSE_SPINBTN
@@ -74,12 +75,12 @@ wxObject *wxSpinCtrlXmlHandler::DoCreateResource()
 { 
     wxSpinCtrl *control = new wxSpinCtrl(m_ParentAsWindow,
                                     GetID(),
-                                    GetText(_T("value")),
+                                    GetText(wxT("value")),
                                     GetPosition(), GetSize(),
-                                    GetStyle( _T("style"), wxSP_ARROW_KEYS ),
-                                    GetLong( _T("min"), wxSP_DEFAULT_MIN),
-                                    GetLong( _T("max"), wxSP_DEFAULT_MAX),
-                                    GetLong( _T("value"), wxSP_DEFAULT_VALUE),
+                                    GetStyle( wxT("style"), wxSP_ARROW_KEYS ),
+                                    GetLong( wxT("min"), wxSP_DEFAULT_MIN),
+                                    GetLong( wxT("max"), wxSP_DEFAULT_MAX),
+                                    GetLong( wxT("value"), wxSP_DEFAULT_VALUE),
                                     GetName()
                                     );
 
@@ -92,7 +93,7 @@ wxObject *wxSpinCtrlXmlHandler::DoCreateResource()
 
 bool wxSpinCtrlXmlHandler::CanHandle(wxXmlNode *node)
 {
-    return node->GetName() == _T("spinctrl");
+    return IsOfClass(node, wxT("wxSpinCtrl"));
 }
 
 #endif // wxUSE_SPINCTRL