IMPLEMENT_DYNAMIC_CLASS(wxPropertySheet, wxObject)
-wxPropertySheet::wxPropertySheet(void):m_properties(wxKEY_STRING)
+wxPropertySheet::wxPropertySheet(const wxString& name)
+:m_properties(wxKEY_STRING),m_name(name)
{
}
}
// 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)
return (wxProperty *)node->Data();
}
+bool wxPropertySheet::SetProperty(const wxString& name, const wxPropertyValue& value)
+{
+ wxProperty* prop = GetProperty(name);
+ if(prop){
+ prop->SetValue(value);
+ return TRUE;
+ }else{
+ return FALSE;
+ }
+}
+
+void wxPropertySheet::RemoveProperty(const wxString& name)
+{
+ wxNode *node = m_properties.Find(name);
+ if(node)
+ {
+ wxProperty *prop = (wxProperty *)node->Data();
+ delete prop;
+ m_properties.DeleteNode(node);
+ }
+}
+
+bool wxPropertySheet::HasProperty(const wxString& name) const
+{
+ return (GetProperty(name)?TRUE:FALSE);
+}
+
// Clear all properties
void wxPropertySheet::Clear(void)
{