#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 <ctype.h>
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)))
{
if (!formValidator->OnCheckValue(prop, this, m_propertyWindow))
return FALSE;
}
- node = node->Next();
+ node = node->GetNext();
}
return TRUE;
}
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;
}
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;
}
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;
}
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);
return;
}
}
- node = node->Next();
+ node = node->GetNext();
}
}
}
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);
return;
}
}
- node = node->Next();
+ node = node->GetNext();
}
}
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;
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;
}
}
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());
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