1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Propert sheet classes implementation
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "prop.h"
16 // For compilers that support precompilation, includes "wx/wx.h".
17 #include "wx/wxprec.h"
36 IMPLEMENT_DYNAMIC_CLASS(wxPropertyValue
, wxObject
)
38 wxPropertyValue::wxPropertyValue(void)
40 m_type
= wxPropertyValueNull
;
45 m_modifiedFlag
= FALSE
;
48 wxPropertyValue::wxPropertyValue(const wxPropertyValue
& copyFrom
)
50 m_modifiedFlag
= FALSE
;
51 Copy((wxPropertyValue
& )copyFrom
);
54 wxPropertyValue::wxPropertyValue(const wxChar
*val
)
56 m_modifiedFlag
= FALSE
;
57 m_type
= wxPropertyValueString
;
59 m_value
.string
= copystring(val
);
65 wxPropertyValue::wxPropertyValue(const wxString
& val
)
67 m_modifiedFlag
= FALSE
;
68 m_type
= wxPropertyValueString
;
70 m_value
.string
= copystring((const wxChar
*)val
);
76 wxPropertyValue::wxPropertyValue(long the_integer
)
78 m_modifiedFlag
= FALSE
;
79 m_type
= wxPropertyValueInteger
;
80 m_value
.integer
= the_integer
;
85 wxPropertyValue::wxPropertyValue(bool val
)
87 m_modifiedFlag
= FALSE
;
88 m_type
= wxPropertyValuebool
;
89 m_value
.integer
= val
;
94 wxPropertyValue::wxPropertyValue(float the_real
)
96 m_modifiedFlag
= FALSE
;
97 m_type
= wxPropertyValueReal
;
98 m_value
.real
= the_real
;
103 wxPropertyValue::wxPropertyValue(double the_real
)
105 m_modifiedFlag
= FALSE
;
106 m_type
= wxPropertyValueReal
;
107 m_value
.real
= (float)the_real
;
112 // Pointer versions: we have a pointer to the real C++ value.
113 wxPropertyValue::wxPropertyValue(wxChar
**val
)
115 m_modifiedFlag
= FALSE
;
116 m_type
= wxPropertyValueStringPtr
;
118 m_value
.stringPtr
= val
;
124 wxPropertyValue::wxPropertyValue(long *val
)
126 m_modifiedFlag
= FALSE
;
127 m_type
= wxPropertyValueIntegerPtr
;
128 m_value
.integerPtr
= val
;
133 wxPropertyValue::wxPropertyValue(bool *val
)
135 m_modifiedFlag
= FALSE
;
136 m_type
= wxPropertyValueboolPtr
;
137 m_value
.boolPtr
= val
;
142 wxPropertyValue::wxPropertyValue(float *val
)
144 m_modifiedFlag
= FALSE
;
145 m_type
= wxPropertyValueRealPtr
;
146 m_value
.realPtr
= val
;
151 wxPropertyValue::wxPropertyValue(wxList
*the_list
)
153 m_modifiedFlag
= FALSE
;
154 m_type
= wxPropertyValueList
;
157 m_value
.first
= NULL
;
159 wxNode
*node
= the_list
->First();
162 wxPropertyValue
*expr
= (wxPropertyValue
*)node
->Data();
170 wxPropertyValue::wxPropertyValue(wxStringList
*the_list
)
172 m_modifiedFlag
= FALSE
;
173 m_type
= wxPropertyValueList
;
176 m_value
.first
= NULL
;
178 wxNode
*node
= the_list
->First();
181 char *s
= (char *)node
->Data();
182 Append(new wxPropertyValue(s
));
188 wxPropertyValue::~wxPropertyValue(void)
192 case wxPropertyValueInteger
:
193 case wxPropertyValuebool
:
194 case wxPropertyValueReal
:
198 case wxPropertyValueString
:
200 delete[] m_value
.string
;
203 case wxPropertyValueList
:
205 wxPropertyValue
*expr
= m_value
.first
;
208 wxPropertyValue
*expr1
= expr
->m_next
;
216 case wxPropertyValueNull
: break;
220 void wxPropertyValue::Append(wxPropertyValue
*expr
)
222 m_modifiedFlag
= TRUE
;
224 m_value
.first
= expr
;
227 m_last
->m_next
= expr
;
231 void wxPropertyValue::Insert(wxPropertyValue
*expr
)
233 m_modifiedFlag
= TRUE
;
234 expr
->m_next
= m_value
.first
;
235 m_value
.first
= expr
;
242 void wxPropertyValue::Delete(wxPropertyValue
*node
)
244 wxPropertyValue
*expr
= GetFirst();
246 wxPropertyValue
*previous
= NULL
;
247 while (expr
&& (expr
!= node
))
250 expr
= expr
->GetNext();
256 previous
->m_next
= expr
->m_next
;
258 // If node was the first in the list,
259 // make the list point to the NEXT one.
260 if (GetFirst() == expr
)
262 m_value
.first
= expr
->m_next
;
265 // If node was the last in the list,
266 // make the list 'last' pointer point to the PREVIOUS one.
267 if (GetLast() == expr
)
274 m_modifiedFlag
= TRUE
;
280 void wxPropertyValue::ClearList(void)
282 wxPropertyValue
*val
= GetFirst();
284 m_modifiedFlag
= TRUE
;
288 wxPropertyValue
*next
= val
->GetNext();
292 m_value
.first
= NULL
;
296 wxPropertyValue
*wxPropertyValue::NewCopy(void) const
300 case wxPropertyValueInteger
:
301 return new wxPropertyValue(m_value
.integer
);
302 case wxPropertyValuebool
:
303 return new wxPropertyValue((bool) (m_value
.integer
!= 0));
304 case wxPropertyValueReal
:
305 return new wxPropertyValue(m_value
.real
);
306 case wxPropertyValueString
:
307 return new wxPropertyValue(m_value
.string
);
308 case wxPropertyValueList
:
310 wxPropertyValue
*expr
= m_value
.first
;
311 wxPropertyValue
*new_list
= new wxPropertyValue
;
312 new_list
->SetType(wxPropertyValueList
);
315 wxPropertyValue
*expr2
= expr
->NewCopy();
316 new_list
->Append(expr2
);
321 case wxPropertyValueIntegerPtr
:
322 return new wxPropertyValue(m_value
.integerPtr
);
323 case wxPropertyValueRealPtr
:
324 return new wxPropertyValue(m_value
.realPtr
);
325 case wxPropertyValueboolPtr
:
326 return new wxPropertyValue(m_value
.boolPtr
);
327 case wxPropertyValueStringPtr
:
328 return new wxPropertyValue(m_value
.stringPtr
);
330 case wxPropertyValueNull
:
332 cerr
<< "Should never get here!\n";
339 void wxPropertyValue::Copy(wxPropertyValue
& copyFrom
)
341 m_type
= copyFrom
.Type();
345 case wxPropertyValueInteger
:
346 (*this) = copyFrom
.IntegerValue();
349 case wxPropertyValueReal
:
350 (*this) = copyFrom
.RealValue();
353 case wxPropertyValueString
:
354 (*this) = wxString(copyFrom
.StringValue());
357 case wxPropertyValuebool
:
358 (*this) = copyFrom
.BoolValue();
362 case wxPropertyValueboolPtr
:
363 (*this) = copyFrom
.BoolValuePtr();
365 case wxPropertyValueRealPtr
:
366 (*this) = copyFrom
.RealValuePtr();
368 case wxPropertyValueIntegerPtr
:
369 (*this) = copyFrom
.IntegerValuePtr();
371 case wxPropertyValueStringPtr
:
373 wxChar
** s
= copyFrom
.StringValuePtr();
378 case wxPropertyValueList
:
380 m_value
.first
= NULL
;
383 wxPropertyValue
*expr
= copyFrom
.m_value
.first
;
386 wxPropertyValue
*expr2
= expr
->NewCopy();
392 case wxPropertyValueNull
:
394 cerr
<< "Should never get here!\n";
400 // Return nth argument of a clause (starting from 1)
401 wxPropertyValue
*wxPropertyValue::Arg(wxPropertyValueType type
, int arg
) const
403 wxPropertyValue
*expr
= m_value
.first
;
404 for (int i
= 1; i
< arg
; i
++)
408 if (expr
&& (expr
->m_type
== type
))
414 // Return nth argument of a list expression (starting from zero)
415 wxPropertyValue
*wxPropertyValue::Nth(int arg
) const
417 if (m_type
!= wxPropertyValueList
)
420 wxPropertyValue
*expr
= m_value
.first
;
421 for (int i
= 0; i
< arg
; i
++)
432 // Returns the number of elements in a list expression
433 int wxPropertyValue::Number(void) const
435 if (m_type
!= wxPropertyValueList
)
439 wxPropertyValue
*expr
= m_value
.first
;
448 void wxPropertyValue::WritePropertyClause(wxString
& stream
) // Write this expression as a top-level clause
450 if (m_type
!= wxPropertyValueList
)
453 wxPropertyValue
*node
= m_value
.first
;
456 node
->WritePropertyType(stream
);
457 stream
.Append( _T("(") );
463 stream
.Append( _T(" ") );
464 node
->WritePropertyType(stream
);
467 stream
.Append( _T(",\n" ) );
470 stream
.Append( _T(").\n\n") );
474 void wxPropertyValue::WritePropertyType(wxString
& stream
) // Write as any other subexpression
479 case wxPropertyValueInteger
:
481 tmp
.Printf( _T("%ld"), m_value
.integer
);
482 stream
.Append( tmp
);
485 case wxPropertyValueIntegerPtr
:
487 tmp
.Printf( _T("%ld"), *m_value
.integerPtr
);
488 stream
.Append( tmp
);
491 case wxPropertyValuebool
:
494 stream
.Append( _T("True") );
496 stream
.Append( _T("False") );
499 case wxPropertyValueboolPtr
:
501 if (*m_value
.integerPtr
)
502 stream
.Append( _T("True") );
504 stream
.Append( _T("False") );
507 case wxPropertyValueReal
:
509 double d
= m_value
.real
;
510 tmp
.Printf( _T("%.6g"), d
);
511 stream
.Append( tmp
);
514 case wxPropertyValueRealPtr
:
516 double d
= *m_value
.realPtr
;
517 tmp
.Printf( _T("%.6g"), d
);
518 stream
.Append( tmp
);
521 case wxPropertyValueString
:
523 stream
.Append( m_value
.string
);
526 case wxPropertyValueStringPtr
:
528 wxFAIL_MSG( _T("wxPropertyValue::WritePropertyType( wxPropertyValueStringPtr ) not implemented") );
531 int len = strlen(*(m_value.stringPtr));
532 for (i = 0; i < len; i++)
534 char ch = *(m_value.stringPtr)[i];
540 case wxPropertyValueList
:
543 stream
.Append( _T("[]") );
546 wxPropertyValue
*expr
= m_value
.first
;
548 stream
.Append( _T("[") );
551 expr
->WritePropertyType(stream
);
554 stream
.Append( _T(", ") );
556 stream
.Append( _T("]") );
560 case wxPropertyValueNull
: break;
564 wxString
wxPropertyValue::GetStringRepresentation(void)
567 WritePropertyType(str
);
571 void wxPropertyValue::operator=(const wxPropertyValue
& val
)
573 m_modifiedFlag
= TRUE
;
574 Copy((wxPropertyValue
&)val
);
577 // void wxPropertyValue::operator=(const char *val)
578 void wxPropertyValue::operator=(const wxString
& val1
)
580 const wxChar
*val
= (const wxChar
*)val1
;
582 m_modifiedFlag
= TRUE
;
583 if (m_type
== wxPropertyValueNull
)
584 m_type
= wxPropertyValueString
;
586 if (m_type
== wxPropertyValueString
)
589 m_value
.string
= copystring(val
);
591 m_value
.string
= NULL
;
593 else if (m_type
== wxPropertyValueStringPtr
)
595 if (*m_value
.stringPtr
)
596 delete[] *m_value
.stringPtr
;
598 *m_value
.stringPtr
= copystring(val
);
600 *m_value
.stringPtr
= NULL
;
609 void wxPropertyValue::operator=(const long val
)
611 m_modifiedFlag
= TRUE
;
612 if (m_type
== wxPropertyValueNull
)
613 m_type
= wxPropertyValueInteger
;
615 if (m_type
== wxPropertyValueInteger
)
616 m_value
.integer
= val
;
617 else if (m_type
== wxPropertyValueIntegerPtr
)
618 *m_value
.integerPtr
= val
;
619 else if (m_type
== wxPropertyValueReal
)
620 m_value
.real
= (float)val
;
621 else if (m_type
== wxPropertyValueRealPtr
)
622 *m_value
.realPtr
= (float)val
;
628 void wxPropertyValue::operator=(const bool val
)
630 m_modifiedFlag
= TRUE
;
631 if (m_type
== wxPropertyValueNull
)
632 m_type
= wxPropertyValuebool
;
634 if (m_type
== wxPropertyValuebool
)
635 m_value
.integer
= (long)val
;
636 else if (m_type
== wxPropertyValueboolPtr
)
637 *m_value
.boolPtr
= val
;
643 void wxPropertyValue::operator=(const float val
)
645 m_modifiedFlag
= TRUE
;
646 if (m_type
== wxPropertyValueNull
)
647 m_type
= wxPropertyValueReal
;
649 if (m_type
== wxPropertyValueInteger
)
650 m_value
.integer
= (long)val
;
651 else if (m_type
== wxPropertyValueIntegerPtr
)
652 *m_value
.integerPtr
= (long)val
;
653 else if (m_type
== wxPropertyValueReal
)
655 else if (m_type
== wxPropertyValueRealPtr
)
656 *m_value
.realPtr
= val
;
662 void wxPropertyValue::operator=(const wxChar
**val
)
664 m_modifiedFlag
= TRUE
;
665 m_type
= wxPropertyValueStringPtr
;
668 m_value
.stringPtr
= (wxChar
**)val
;
670 m_value
.stringPtr
= NULL
;
677 void wxPropertyValue::operator=(const long *val
)
679 m_modifiedFlag
= TRUE
;
680 m_type
= wxPropertyValueIntegerPtr
;
681 m_value
.integerPtr
= (long *)val
;
686 void wxPropertyValue::operator=(const bool *val
)
688 m_modifiedFlag
= TRUE
;
689 m_type
= wxPropertyValueboolPtr
;
690 m_value
.boolPtr
= (bool *)val
;
695 void wxPropertyValue::operator=(const float *val
)
697 m_modifiedFlag
= TRUE
;
698 m_type
= wxPropertyValueRealPtr
;
699 m_value
.realPtr
= (float *)val
;
704 long wxPropertyValue::IntegerValue(void) const
706 if (m_type
== wxPropertyValueInteger
)
707 return m_value
.integer
;
708 else if (m_type
== wxPropertyValueReal
)
709 return (long)m_value
.real
;
710 else if (m_type
== wxPropertyValueIntegerPtr
)
711 return *m_value
.integerPtr
;
712 else if (m_type
== wxPropertyValueRealPtr
)
713 return (long)(*m_value
.realPtr
);
717 long *wxPropertyValue::IntegerValuePtr(void) const
719 return m_value
.integerPtr
;
722 float wxPropertyValue::RealValue(void) const {
723 if (m_type
== wxPropertyValueReal
)
725 else if (m_type
== wxPropertyValueRealPtr
)
726 return *m_value
.realPtr
;
727 else if (m_type
== wxPropertyValueInteger
)
728 return (float)m_value
.integer
;
729 else if (m_type
== wxPropertyValueIntegerPtr
)
730 return (float)*(m_value
.integerPtr
);
734 float *wxPropertyValue::RealValuePtr(void) const
736 return m_value
.realPtr
;
739 bool wxPropertyValue::BoolValue(void) const {
740 if (m_type
== wxPropertyValueReal
)
741 return (m_value
.real
!= 0.0);
742 if (m_type
== wxPropertyValueRealPtr
)
743 return (*(m_value
.realPtr
) != 0.0);
744 else if (m_type
== wxPropertyValueInteger
)
745 return (m_value
.integer
!= 0);
746 else if (m_type
== wxPropertyValueIntegerPtr
)
747 return (*(m_value
.integerPtr
) != 0);
748 else if (m_type
== wxPropertyValuebool
)
749 return (m_value
.integer
!= 0);
750 else if (m_type
== wxPropertyValueboolPtr
)
751 return (*(m_value
.boolPtr
) != 0);
755 bool *wxPropertyValue::BoolValuePtr(void) const
757 return m_value
.boolPtr
;
760 wxChar
*wxPropertyValue::StringValue(void) const {
761 if (m_type
== wxPropertyValueString
)
762 return m_value
.string
;
763 else if (m_type
== wxPropertyValueStringPtr
)
764 return *(m_value
.stringPtr
);
768 wxChar
**wxPropertyValue::StringValuePtr(void) const
770 return m_value
.stringPtr
;
774 * A property (name plus value)
777 IMPLEMENT_DYNAMIC_CLASS(wxProperty
, wxObject
)
779 wxProperty::wxProperty(void)
781 m_propertyRole
= wxEmptyString
;
782 m_propertyValidator
= NULL
;
783 m_propertyWindow
= NULL
;
787 wxProperty::wxProperty(wxProperty
& copyFrom
)
789 m_value
= copyFrom
.GetValue();
790 m_name
= copyFrom
.GetName();
791 m_propertyRole
= copyFrom
.GetRole();
792 m_propertyValidator
= copyFrom
.GetValidator();
793 m_enabled
= copyFrom
.IsEnabled();
794 m_propertyWindow
= NULL
;
797 wxProperty::wxProperty(wxString nm
, wxString role
, wxPropertyValidator
*ed
):m_name(nm
), m_propertyRole(role
)
799 m_propertyValidator
= ed
;
800 m_propertyWindow
= NULL
;
804 wxProperty::wxProperty(wxString nm
, const wxPropertyValue
& val
, wxString role
, wxPropertyValidator
*ed
):
805 m_value(val
), m_name(nm
), m_propertyRole(role
)
807 m_propertyValidator
= ed
;
808 m_propertyWindow
= NULL
;
812 wxProperty::~wxProperty(void)
814 if (m_propertyValidator
)
815 delete m_propertyValidator
;
818 wxPropertyValue
& wxProperty::GetValue(void) const
820 return (wxPropertyValue
&) m_value
;
823 wxPropertyValidator
*wxProperty::GetValidator(void) const
825 return m_propertyValidator
;
828 wxString
& wxProperty::GetName(void) const
830 return (wxString
&) m_name
;
833 wxString
& wxProperty::GetRole(void) const
835 return (wxString
&) m_propertyRole
;
838 void wxProperty::SetValue(const wxPropertyValue
& val
)
843 void wxProperty::SetValidator(wxPropertyValidator
*ed
)
845 m_propertyValidator
= ed
;
848 void wxProperty::SetRole(wxString
& role
)
850 m_propertyRole
= role
;
853 void wxProperty::SetName(wxString
& nm
)
858 void wxProperty::operator=(const wxPropertyValue
& val
)
864 * Base property view class
867 IMPLEMENT_DYNAMIC_CLASS(wxPropertyView
, wxEvtHandler
)
869 wxPropertyView::wxPropertyView(long flags
)
871 m_buttonFlags
= flags
;
872 m_propertySheet
= NULL
;
873 m_currentValidator
= NULL
;
874 m_currentProperty
= NULL
;
877 wxPropertyView::~wxPropertyView(void)
881 void wxPropertyView::AddRegistry(wxPropertyValidatorRegistry
*registry
)
883 m_validatorRegistryList
.Append(registry
);
886 wxPropertyValidator
*wxPropertyView::FindPropertyValidator(wxProperty
*property
)
888 if (property
->GetValidator())
889 return property
->GetValidator();
891 wxNode
*node
= m_validatorRegistryList
.First();
894 wxPropertyValidatorRegistry
*registry
= (wxPropertyValidatorRegistry
*)node
->Data();
895 wxPropertyValidator
*validator
= registry
->GetValidator(property
->GetRole());
902 if (!wxDefaultPropertyValidator)
903 wxDefaultPropertyValidator = new wxPropertyListValidator;
904 return wxDefaultPropertyValidator;
912 IMPLEMENT_DYNAMIC_CLASS(wxPropertySheet
, wxObject
)
914 wxPropertySheet::wxPropertySheet(const wxString
& name
)
915 :m_properties(wxKEY_STRING
),m_name(name
)
919 wxPropertySheet::~wxPropertySheet(void)
924 void wxPropertySheet::UpdateAllViews( wxPropertyView
*WXUNUSED(thisView
) )
929 void wxPropertySheet::AddProperty(wxProperty
*property
)
931 m_properties
.Append((const wxChar
*) property
->GetName(), property
);
934 // Get property by name
935 wxProperty
*wxPropertySheet::GetProperty(const wxString
& name
) const
937 wxNode
*node
= m_properties
.Find((const wxChar
*) name
);
941 return (wxProperty
*)node
->Data();
944 bool wxPropertySheet::SetProperty(const wxString
& name
, const wxPropertyValue
& value
)
946 wxProperty
* prop
= GetProperty(name
);
948 prop
->SetValue(value
);
955 void wxPropertySheet::RemoveProperty(const wxString
& name
)
957 wxNode
*node
= m_properties
.Find(name
);
960 wxProperty
*prop
= (wxProperty
*)node
->Data();
962 m_properties
.DeleteNode(node
);
966 bool wxPropertySheet::HasProperty(const wxString
& name
) const
968 return (GetProperty(name
)?TRUE
:FALSE
);
971 // Clear all properties
972 void wxPropertySheet::Clear(void)
974 wxNode
*node
= m_properties
.First();
977 wxProperty
*prop
= (wxProperty
*)node
->Data();
978 wxNode
*next
= node
->Next();
985 // Sets/clears the modified flag for each property value
986 void wxPropertySheet::SetAllModified(bool flag
)
988 wxNode
*node
= m_properties
.First();
991 wxProperty
*prop
= (wxProperty
*)node
->Data();
992 prop
->GetValue().SetModified(flag
);
998 * Property validator registry
1002 IMPLEMENT_DYNAMIC_CLASS(wxPropertyValidatorRegistry
, wxHashTable
)
1004 wxPropertyValidatorRegistry::wxPropertyValidatorRegistry(void):wxHashTable(wxKEY_STRING
)
1008 wxPropertyValidatorRegistry::~wxPropertyValidatorRegistry(void)
1013 void wxPropertyValidatorRegistry::RegisterValidator(const wxString
& typeName
, wxPropertyValidator
*validator
)
1015 Put((const wxChar
*) typeName
, validator
);
1018 wxPropertyValidator
*wxPropertyValidatorRegistry::GetValidator(const wxString
& typeName
)
1020 return (wxPropertyValidator
*)Get((const wxChar
*) typeName
);
1023 void wxPropertyValidatorRegistry::ClearRegistry(void)
1027 while ((node
= Next()))
1029 delete (wxPropertyValidator
*)node
->Data();
1034 * Property validator
1038 IMPLEMENT_ABSTRACT_CLASS(wxPropertyValidator
, wxEvtHandler
)
1040 wxPropertyValidator::wxPropertyValidator(long flags
)
1042 m_validatorFlags
= flags
;
1043 m_validatorProperty
= NULL
;
1046 wxPropertyValidator::~wxPropertyValidator(void)
1049 bool wxPropertyValidator::StringToFloat (wxChar
*s
, float *number
) {
1051 bool ok
= StringToDouble (s
, &num
);
1052 *number
= (float) num
;
1056 bool wxPropertyValidator::StringToDouble (wxChar
*s
, double *number
) {
1059 *number
= wxStrtod (s
, &value_ptr
);
1061 int len
= wxStrlen (value_ptr
);
1062 for (int i
= 0; i
< len
; i
++) {
1063 ok
= (wxIsspace (value_ptr
[i
]) != 0);
1064 if (!ok
) return FALSE
;
1070 bool wxPropertyValidator::StringToInt (wxChar
*s
, int *number
) {
1072 bool ok
= StringToLong (s
, &num
);
1073 *number
= (int) num
;
1077 bool wxPropertyValidator::StringToLong (wxChar
*s
, long *number
) {
1080 *number
= wxStrtol (s
, &value_ptr
, 10);
1082 int len
= wxStrlen (value_ptr
);
1083 for (int i
= 0; i
< len
; i
++) {
1084 ok
= (wxIsspace (value_ptr
[i
]) != 0);
1085 if (!ok
) return FALSE
;
1091 wxChar
*wxPropertyValidator::FloatToString (float number
) {
1092 static wxChar buf
[20];
1093 wxSprintf (buf
, _T("%.6g"), number
);
1097 wxChar
*wxPropertyValidator::DoubleToString (double number
) {
1098 static wxChar buf
[20];
1099 wxSprintf (buf
, _T("%.6g"), number
);
1103 wxChar
*wxPropertyValidator::IntToString (int number
) {
1104 return ::IntToString (number
);
1107 wxChar
*wxPropertyValidator::LongToString (long number
) {
1108 return ::LongToString (number
);