]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/xti.cpp
Applied #13738: Make a wxRichTextImage's box display around the image (dghart)
[wxWidgets.git] / src / common / xti.cpp
index bd9fd18cca834411f7fc53c8b999de3109ccf82b..f207253ad7d48941d36496959c2ed31e108a5a8a 100644 (file)
@@ -341,30 +341,12 @@ wxTypeInfo *wxTypeInfo::FindType(const wxString& typeName)
 {
     wxTypeInfoMap::iterator iter = ms_typeTable->find(typeName);
 
-    //wxASSERT_MSG( iter != ms_typeTable->end(), 
-    // wxT("lookup for a non-existent type-info") );
-    // FM 3/6/2007 - disabled because otherwise 
-    //               wxPropertyInfo::GetCollectionElementTypeInfo
-    //               may easily crash
     if (iter == ms_typeTable->end())
         return NULL;
 
     return (wxTypeInfo *)iter->second;
 }
 
-#if wxUSE_UNICODE
-wxClassTypeInfo::wxClassTypeInfo( wxTypeKind kind, wxClassInfo* classInfo, 
-                                  wxVariant2StringFnc to, 
-                                  wxString2VariantFnc from, 
-                                  const char *name) :
-    wxTypeInfo( kind, to, from, name)
-{ 
-    wxASSERT_MSG( kind == wxT_OBJECT_PTR || 
-                  kind == wxT_OBJECT, 
-                  wxT("Illegal Kind for Enum Type")); m_classInfo = classInfo;
-}
-#endif
-
 wxClassTypeInfo::wxClassTypeInfo( wxTypeKind kind, wxClassInfo* classInfo, 
                                   wxVariant2StringFnc to, 
                                   wxString2VariantFnc from, 
@@ -732,6 +714,11 @@ wxAny wxClassInfo::ObjectPtrToAny( wxObject* obj) const
     return m_objectToVariantConverter(obj);
 }
 
+bool wxClassInfo::NeedsDirectConstruction() const 
+{ 
+    return wx_dynamic_cast(wxObjectAllocator*, m_constructor) != NULL; 
+}
+
 // ----------------------------------------------------------------------------
 // wxDynamicObject support
 // ----------------------------------------------------------------------------
@@ -944,14 +931,14 @@ void wxGenericPropertyAccessor::SetProperty(wxObject *object, const wxAny &value
 {
     wxDynamicObject* dynobj = wx_dynamic_cast(wxDynamicObject*, object);
     wxASSERT_MSG( dynobj, wxT("cannot call wxDynamicClassInfo::SetProperty on an object other than wxDynamicObject") );
-    dynobj->SetProperty(m_propertyName, value );
+    dynobj->SetProperty(m_propertyName.c_str(), value );
 }
 
 void wxGenericPropertyAccessor::GetProperty(const wxObject *object, wxAny& value) const
 {
     const wxDynamicObject* dynobj = wx_dynamic_cast( const wxDynamicObject * ,  object );
     wxASSERT_MSG( dynobj, wxT("cannot call wxDynamicClassInfo::SetProperty on an object other than wxDynamicObject") );
-    value = dynobj->GetProperty( m_propertyName );
+    value = dynobj->GetProperty( m_propertyName.c_str() );
 }
 
 // ----------------------------------------------------------------------------