// Created: 04/01/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma hdrstop
#endif
+#if wxUSE_PROPSHEET
+
#ifndef WX_PRECOMP
-#include "wx/wx.h"
#endif
#include "wx/debug.h"
wxNode *node = the_list->First();
while (node)
{
- char *s = (char *)node->Data();
+ wxChar *s = (wxChar *)node->Data();
Append(new wxPropertyValue(s));
node = node->Next();
}
expr->WritePropertyType(stream);
expr = expr->m_next;
if (expr)
- stream.Append( wxT(", ") );
+ stream.Append( wxT(", ") );
}
stream.Append( wxT("]") );
}
}
else if (m_type == wxPropertyValueStringPtr)
{
- wxFAIL_MSG( "Shouldn't try to assign a wxString reference to a char* pointer.");
+ wxFAIL_MSG( wxT("Shouldn't try to assign a wxString reference to a char* pointer.") );
if (val)
*m_value.stringPtr = copystring(val);
else
if(node)
{
wxProperty *prop = (wxProperty *)node->Data();
- delete prop;
+ delete prop;
m_properties.DeleteNode(node);
}
-}
+}
bool wxPropertySheet::HasProperty(const wxString& name) const
{
- return (GetProperty(name)?TRUE:FALSE);
+ return (GetProperty(name)?TRUE:FALSE);
}
// Clear all properties
{}
bool wxPropertyValidator::StringToFloat (wxChar *s, float *number) {
- double num;
- bool ok = StringToDouble (s, &num);
- *number = (float) num;
- return ok;
+ double num;
+ bool ok = StringToDouble (s, &num);
+ *number = (float) num;
+ return ok;
}
bool wxPropertyValidator::StringToDouble (wxChar *s, double *number) {
wxChar *value_ptr;
*number = wxStrtod (s, &value_ptr);
if (value_ptr) {
- int len = wxStrlen (value_ptr);
- for (int i = 0; i < len; i++) {
- ok = (wxIsspace (value_ptr[i]) != 0);
- if (!ok) return FALSE;
- }
+ int len = wxStrlen (value_ptr);
+ for (int i = 0; i < len; i++) {
+ ok = (wxIsspace (value_ptr[i]) != 0);
+ if (!ok) return FALSE;
+ }
}
return ok;
}
bool wxPropertyValidator::StringToInt (wxChar *s, int *number) {
- long num;
- bool ok = StringToLong (s, &num);
- *number = (int) num;
- return ok;
+ long num;
+ bool ok = StringToLong (s, &num);
+ *number = (int) num;
+ return ok;
}
bool wxPropertyValidator::StringToLong (wxChar *s, long *number) {
wxChar *value_ptr;
*number = wxStrtol (s, &value_ptr, 10);
if (value_ptr) {
- int len = wxStrlen (value_ptr);
- for (int i = 0; i < len; i++) {
- ok = (wxIsspace (value_ptr[i]) != 0);
- if (!ok) return FALSE;
- }
+ int len = wxStrlen (value_ptr);
+ for (int i = 0; i < len; i++) {
+ ok = (wxIsspace (value_ptr[i]) != 0);
+ if (!ok) return FALSE;
+ }
}
return ok;
}
wxChar *wxPropertyValidator::FloatToString (float number) {
- static wxChar buf[20];
- wxSprintf (buf, wxT("%.6g"), number);
- return buf;
+ static wxChar buf[20];
+ wxSprintf (buf, wxT("%.6g"), number);
+ return buf;
}
wxChar *wxPropertyValidator::DoubleToString (double number) {
- static wxChar buf[20];
- wxSprintf (buf, wxT("%.6g"), number);
- return buf;
+ static wxChar buf[20];
+ wxSprintf (buf, wxT("%.6g"), number);
+ return buf;
}
wxChar *wxPropertyValidator::IntToString (int number) {
- return ::IntToString (number);
+ return ::IntToString (number);
}
wxChar *wxPropertyValidator::LongToString (long number) {
- return ::LongToString (number);
+ return ::LongToString (number);
}
+
+#endif // wxUSE_PROPSHEET