]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/prop.cpp
Uses Unicode strings. Now we've got a __TFILE__ macro, too (I think?)
[wxWidgets.git] / src / generic / prop.cpp
index b63cafa0cf6932a89a3a83031e6ebe2120b102ea..a353201fcc596d2ea0bd4a23dd09f94aa9eb1fd7 100644 (file)
@@ -941,7 +941,7 @@ wxPropertyValidator *wxPropertyView::FindPropertyValidator(wxProperty *property)
 
 IMPLEMENT_DYNAMIC_CLASS(wxPropertySheet, wxObject)
 
-wxPropertySheet::wxPropertySheet(wxString name)
+wxPropertySheet::wxPropertySheet(const wxString& name)
 :m_properties(wxKEY_STRING),m_name(name)
 {
 }
@@ -972,7 +972,7 @@ void wxPropertySheet::AddProperty(wxProperty *property)
 }
 
 // Get property by name
-wxProperty *wxPropertySheet::GetProperty(wxString name)
+wxProperty *wxPropertySheet::GetProperty(const wxString& name) const
 {
   wxNode *node = m_properties.Find((const char*) name);
   if (!node)
@@ -980,17 +980,19 @@ wxProperty *wxPropertySheet::GetProperty(wxString name)
   else
     return (wxProperty *)node->Data();
 }
-bool wxPropertySheet::SetProperty(const wxString name, wxPropertyValue value)
+
+bool wxPropertySheet::SetProperty(const wxString& name, const wxPropertyValue& value)
 {
   wxProperty* prop = GetProperty(name);
   if(prop){
     prop->SetValue(value);
-    return true;
+    return TRUE;
   }else{
-    return false;
+    return FALSE;
   }
 }
-void wxPropertySheet::RemoveProperty(wxString name)
+
+void wxPropertySheet::RemoveProperty(const wxString& name)
 {
   wxNode *node = m_properties.Find(name);
   if(node)
@@ -1000,10 +1002,12 @@ void wxPropertySheet::RemoveProperty(wxString name)
     m_properties.DeleteNode(node);
   }
 }      
-bool wxPropertySheet::HasProperty(wxString name)
+
+bool wxPropertySheet::HasProperty(const wxString& name) const
 { 
-       return (GetProperty(name)?true:false); 
+       return (GetProperty(name)?TRUE:FALSE); 
 }
+
 // Clear all properties
 void wxPropertySheet::Clear(void)
 {