#include <string.h>
-#if wxUSE_XTI
+#if wxUSE_EXTENDED_RTTI
// ----------------------------------------------------------------------------
// Enum Support
wxString wxXmlGetContentFromNode( wxXmlNode *node )
{
- return node->GetChildren()->GetContent() ;
+ if ( node->GetChildren() )
+ return node->GetChildren()->GetContent() ;
+ else
+ return wxEmptyString ;
}
// streamer specializations
WX_CUSTOM_TYPE_INFO(wxPoint)
+void wxStringReadValue(const wxString &s , wxSize &data )
+{
+ wxSscanf(s, _T("%d,%d"), &data.x , &data.y ) ;
+}
+
+void wxStringWriteValue(wxString &s , const wxSize &data )
+{
+ s = wxString::Format("%d,%d", data.x , data.y ) ;
+}
+
+WX_CUSTOM_TYPE_INFO(wxSize)
+
// removing header dependancy on string tokenizer
void wxSetStringToArray( const wxString &s , wxArrayString &array )
const wxPropertyAccessor *wxClassInfo::FindAccessor(const char *PropertyName)
{
- const wxPropertyInfo* info = FindPropInfo( PropertyName ) ;
+ const wxPropertyInfo* info = FindPropertyInfo( PropertyName ) ;
if ( info )
return info->GetAccessor() ;
return NULL ;
}
-const wxPropertyInfo *wxClassInfo::FindPropInfo (const char *PropertyName) const
+const wxPropertyInfo *wxClassInfo::FindPropertyInfo (const char *PropertyName) const
{
const wxPropertyInfo* info = GetFirstProperty() ;
const wxClassInfo** parents = GetParents() ;
for ( int i = 0 ; parents[i] ; ++ i )
{
- if ( ( info = parents[i]->FindPropInfo( PropertyName ) ) != NULL )
+ if ( ( info = parents[i]->FindPropertyInfo( PropertyName ) ) != NULL )
return info ;
}
return 0;
}
+const wxHandlerInfo *wxClassInfo::FindHandlerInfo (const char *PropertyName) const
+{
+ const wxHandlerInfo* info = GetFirstHandler() ;
+
+ while( info )
+ {
+ if ( strcmp( info->GetName() , PropertyName ) == 0 )
+ return info ;
+ info = info->GetNext() ;
+ }
+
+ const wxClassInfo** parents = GetParents() ;
+ for ( int i = 0 ; parents[i] ; ++ i )
+ {
+ if ( ( info = parents[i]->FindHandlerInfo( PropertyName ) ) != NULL )
+ return info ;
+ }
+
+ return 0;
+}
+
+
void wxClassInfo::SetProperty(wxObject *object, const char *propertyName, const wxxVariant &value)
{
const wxPropertyAccessor *accessor;