#include <math.h>
#include <string.h>
+#if !WXWIN_COMPATIBILITY_2_4
static inline wxChar* copystring(const wxChar* s)
{ return wxStrcpy(new wxChar[wxStrlen(s) + 1], s); }
+#endif
IMPLEMENT_DYNAMIC_CLASS(wxPropertyValue, wxObject)
m_modifiedFlag = FALSE;
m_type = wxPropertyValueString;
- m_value.string = copystring((const wxChar *)val);
+ m_value.string = copystring(val.c_str());
m_clientData = NULL;
m_next = NULL;
m_last = NULL;
m_last = NULL;
m_value.first = NULL;
- wxNode *node = the_list->GetFirst();
+ wxObjectList::compatibility_iterator node = the_list->GetFirst();
while (node)
{
wxPropertyValue *expr = (wxPropertyValue *)node->GetData();
m_last = NULL;
m_value.first = NULL;
- wxStringList::Node *node = the_list->GetFirst();
+ wxStringList::compatibility_iterator node = the_list->GetFirst();
while (node)
{
- wxChar *s = node->GetData();
+ wxString s = node->GetData();
Append(new wxPropertyValue(s));
node = node->GetNext();
}
if (property->GetValidator())
return property->GetValidator();
- wxNode *node = m_validatorRegistryList.GetFirst();
+ wxObjectList::compatibility_iterator node = m_validatorRegistryList.GetFirst();
while (node)
{
wxPropertyValidatorRegistry *registry = (wxPropertyValidatorRegistry *)node->GetData();
// Get property by name
wxProperty *wxPropertySheet::GetProperty(const wxString& name) const
{
- wxNode *node = m_properties.Find((const wxChar*) name);
+ wxObjectList::compatibility_iterator node = m_properties.Find((const wxChar*) name);
if (!node)
return NULL;
else
void wxPropertySheet::RemoveProperty(const wxString& name)
{
- wxNode *node = m_properties.Find(name);
+ wxObjectList::compatibility_iterator node = m_properties.Find(name);
if(node)
{
wxProperty *prop = (wxProperty *)node->GetData();
delete prop;
- m_properties.DeleteNode(node);
+ m_properties.Erase(node);
}
}
// Clear all properties
void wxPropertySheet::Clear(void)
{
- wxNode *node = m_properties.GetFirst();
+ wxObjectList::compatibility_iterator node = m_properties.GetFirst();
while (node)
{
wxProperty *prop = (wxProperty *)node->GetData();
- wxNode *next = node->GetNext();
+ wxObjectList::compatibility_iterator next = node->GetNext();
delete prop;
delete node;
node = next;
// Sets/clears the modified flag for each property value
void wxPropertySheet::SetAllModified(bool flag)
{
- wxNode *node = m_properties.GetFirst();
+ wxObjectList::compatibility_iterator node = m_properties.GetFirst();
while (node)
{
wxProperty *prop = (wxProperty *)node->GetData();
void wxPropertyValidatorRegistry::ClearRegistry(void)
{
BeginFind();
- wxNode *node;
+ wxHashTable::Node *node;
while ((node = Next()) != NULL)
{
delete (wxPropertyValidator *)node->GetData();