X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0f02d3d0ec5c415e222929d9fe587a603772fade..cfcc39321282c5877cbb45248bb8004ced24516b:/src/generic/propform.cpp diff --git a/src/generic/propform.cpp b/src/generic/propform.cpp index bfa779c272..21dc41e4ae 100644 --- a/src/generic/propform.cpp +++ b/src/generic/propform.cpp @@ -87,10 +87,10 @@ bool wxPropertyFormView::Check(void) if (!m_propertySheet) return FALSE; - wxNode *node = m_propertySheet->GetProperties().First(); + wxNode *node = m_propertySheet->GetProperties().GetFirst(); while (node) { - wxProperty *prop = (wxProperty *)node->Data(); + wxProperty *prop = (wxProperty *)node->GetData(); wxPropertyValidator *validator = FindPropertyValidator(prop); if (validator && validator->IsKindOf(CLASSINFO(wxPropertyFormValidator))) { @@ -98,7 +98,7 @@ bool wxPropertyFormView::Check(void) if (!formValidator->OnCheckValue(prop, this, m_propertyWindow)) return FALSE; } - node = node->Next(); + node = node->GetNext(); } return TRUE; } @@ -108,17 +108,17 @@ bool wxPropertyFormView::TransferToPropertySheet(void) if (!m_propertySheet) return FALSE; - wxNode *node = m_propertySheet->GetProperties().First(); + wxNode *node = m_propertySheet->GetProperties().GetFirst(); while (node) { - wxProperty *prop = (wxProperty *)node->Data(); + wxProperty *prop = (wxProperty *)node->GetData(); wxPropertyValidator *validator = FindPropertyValidator(prop); if (validator && validator->IsKindOf(CLASSINFO(wxPropertyFormValidator))) { wxPropertyFormValidator *formValidator = (wxPropertyFormValidator *)validator; formValidator->OnRetrieveValue(prop, this, m_propertyWindow); } - node = node->Next(); + node = node->GetNext(); } return TRUE; } @@ -128,17 +128,17 @@ bool wxPropertyFormView::TransferToDialog(void) if (!m_propertySheet) return FALSE; - wxNode *node = m_propertySheet->GetProperties().First(); + wxNode *node = m_propertySheet->GetProperties().GetFirst(); while (node) { - wxProperty *prop = (wxProperty *)node->Data(); + wxProperty *prop = (wxProperty *)node->GetData(); wxPropertyValidator *validator = FindPropertyValidator(prop); if (validator && validator->IsKindOf(CLASSINFO(wxPropertyFormValidator))) { wxPropertyFormValidator *formValidator = (wxPropertyFormValidator *)validator; formValidator->OnDisplayValue(prop, this, m_propertyWindow); } - node = node->Next(); + node = node->GetNext(); } return TRUE; } @@ -148,17 +148,17 @@ bool wxPropertyFormView::AssociateNames(void) if (!m_propertySheet || !m_propertyWindow) return FALSE; - wxNode *node = m_propertyWindow->GetChildren().First(); + wxWindowList::Node *node = m_propertyWindow->GetChildren().GetFirst(); while (node) { - wxWindow *win = (wxWindow *)node->Data(); - if (win->GetName() != wxT("")) + wxWindow *win = node->GetData(); + if ( win->GetName() != wxEmptyString ) { wxProperty *prop = m_propertySheet->GetProperty(win->GetName()); if (prop) prop->SetWindow(win); } - node = node->Next(); + node = node->GetNext(); } return TRUE; } @@ -229,10 +229,10 @@ void wxPropertyFormView::OnCommand(wxWindow& win, wxCommandEvent& event) else { // Find a validator to route the command to. - wxNode *node = m_propertySheet->GetProperties().First(); + wxNode *node = m_propertySheet->GetProperties().GetFirst(); while (node) { - wxProperty *prop = (wxProperty *)node->Data(); + wxProperty *prop = (wxProperty *)node->GetData(); if (prop->GetWindow() && (prop->GetWindow() == &win)) { wxPropertyValidator *validator = FindPropertyValidator(prop); @@ -243,7 +243,7 @@ void wxPropertyFormView::OnCommand(wxWindow& win, wxCommandEvent& event) return; } } - node = node->Next(); + node = node->GetNext(); } } } @@ -268,10 +268,10 @@ void wxPropertyFormView::OnDoubleClick(wxControl *item) return; // Find a validator to route the command to. - wxNode *node = m_propertySheet->GetProperties().First(); + wxNode *node = m_propertySheet->GetProperties().GetFirst(); while (node) { - wxProperty *prop = (wxProperty *)node->Data(); + wxProperty *prop = (wxProperty *)node->GetData(); if (prop->GetWindow() && ((wxControl *)prop->GetWindow() == item)) { wxPropertyValidator *validator = FindPropertyValidator(prop); @@ -282,7 +282,7 @@ void wxPropertyFormView::OnDoubleClick(wxControl *item) return; } } - node = node->Next(); + node = node->GetNext(); } } @@ -518,9 +518,9 @@ bool wxIntegerFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormVi if (val < m_integerMin || val > m_integerMax) { - char buf[200]; - sprintf(buf, "Value must be an integer between %ld and %ld!", m_integerMin, m_integerMax); - wxMessageBox(buf, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow); + wxChar buf[200]; + wxSprintf(buf, wxT("Value must be an integer between %ld and %ld!"), m_integerMin, m_integerMax); + wxMessageBox(buf, wxT("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow); return FALSE; } return TRUE; @@ -645,10 +645,10 @@ bool wxStringFormValidator::OnCheckValue(wxProperty *property, wxPropertyFormVie wxTextCtrl *text = (wxTextCtrl *)m_propertyWindow; if (!m_strings->Member(text->GetValue())) { - wxString s("Value "); - s += text->GetValue(); - s += " is not valid."; - wxMessageBox(s, "Property value error", wxOK | wxICON_EXCLAMATION, parentWindow); + wxString str( wxT("Value ") ); + str += text->GetValue(); + str += wxT(" is not valid."); + wxMessageBox(str, wxT("Property value error"), wxOK | wxICON_EXCLAMATION, parentWindow); return FALSE; } } @@ -716,12 +716,12 @@ bool wxStringFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormV if (lbox->GetCount() == 0 && m_strings) { // Try to initialize the listbox from 'strings' - wxNode *node = m_strings->First(); + wxStringList::Node *node = m_strings->GetFirst(); while (node) { - char *s = (char *)node->Data(); + wxChar *s = node->GetData(); lbox->Append(s); - node = node->Next(); + node = node->GetNext(); } } lbox->SetStringSelection(property->GetValue().StringValue()); @@ -736,20 +736,18 @@ bool wxStringFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormV else if (m_propertyWindow->IsKindOf(CLASSINFO(wxChoice))) { wxChoice *choice = (wxChoice *)m_propertyWindow; -#ifndef __XVIEW__ if (choice->GetCount() == 0 && m_strings) { // Try to initialize the choice item from 'strings' // XView doesn't allow this kind of thing. - wxNode *node = m_strings->First(); + wxStringList::Node *node = m_strings->GetFirst(); while (node) { - char *s = (char *)node->Data(); + wxChar *s = node->GetData(); choice->Append(s); - node = node->Next(); + node = node->GetNext(); } } -#endif choice->SetStringSelection(property->GetValue().StringValue()); } else