wxProperty::wxProperty(void)
{
- m_propertyRole = (char *)NULL;
+ m_propertyRole = wxEmptyString;
m_propertyValidator = NULL;
m_propertyWindow = NULL;
m_enabled = TRUE;
IMPLEMENT_DYNAMIC_CLASS(wxPropertySheet, wxObject)
-wxPropertySheet::wxPropertySheet(void):m_properties(wxKEY_STRING)
+wxPropertySheet::wxPropertySheet(wxString name)
+:m_properties(wxKEY_STRING),m_name(name)
{
}
else
return (wxProperty *)node->Data();
}
-
+bool wxPropertySheet::SetProperty(const wxString name, wxPropertyValue value)
+{
+ wxProperty* prop = GetProperty(name);
+ if(prop){
+ prop->SetValue(value);
+ return TRUE;
+ }else{
+ return FALSE;
+ }
+}
+void wxPropertySheet::RemoveProperty(wxString name)
+{
+ wxNode *node = m_properties.Find(name);
+ if(node)
+ {
+ wxProperty *prop = (wxProperty *)node->Data();
+ delete prop;
+ m_properties.DeleteNode(node);
+ }
+}
+bool wxPropertySheet::HasProperty(wxString name)
+{
+ return (GetProperty(name)?TRUE:FALSE);
+}
// Clear all properties
void wxPropertySheet::Clear(void)
{