X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..94311eef78b66304c9a2f78bcbdd396c798f19a6:/src/generic/propform.cpp diff --git a/src/generic/propform.cpp b/src/generic/propform.cpp index b8469214eb..5fc2aa91e0 100644 --- a/src/generic/propform.cpp +++ b/src/generic/propform.cpp @@ -23,9 +23,12 @@ #if wxUSE_PROPSHEET #ifndef WX_PRECOMP + #include "wx/choice.h" + #include "wx/checkbox.h" + #include "wx/slider.h" + #include "wx/msgdlg.h" #endif -#include "wx/wx.h" #include "wx/propform.h" #include @@ -87,10 +90,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 +101,7 @@ bool wxPropertyFormView::Check(void) if (!formValidator->OnCheckValue(prop, this, m_propertyWindow)) return FALSE; } - node = node->Next(); + node = node->GetNext(); } return TRUE; } @@ -108,17 +111,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 +131,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 +151,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 +232,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 +246,7 @@ void wxPropertyFormView::OnCommand(wxWindow& win, wxCommandEvent& event) return; } } - node = node->Next(); + node = node->GetNext(); } } } @@ -268,10 +271,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 +285,7 @@ void wxPropertyFormView::OnDoubleClick(wxControl *item) return; } } - node = node->Next(); + node = node->GetNext(); } } @@ -716,12 +719,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) { - wxChar *s = (wxChar *)node->Data(); + wxChar *s = node->GetData(); lbox->Append(s); - node = node->Next(); + node = node->GetNext(); } } lbox->SetStringSelection(property->GetValue().StringValue()); @@ -740,12 +743,12 @@ bool wxStringFormValidator::OnDisplayValue(wxProperty *property, wxPropertyFormV { // 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) { - wxChar *s = (wxChar *)node->Data(); + wxChar *s = node->GetData(); choice->Append(s); - node = node->Next(); + node = node->GetNext(); } } choice->SetStringSelection(property->GetValue().StringValue());