Have support for both char* and wchar_t* in wxPGPropArg. Moved wxPGPropArgCls member function to propgridiface.cpp which is more logical location since class is in propgridiface.h. Added char* test cases.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2008-09-14 16:48:20 +00:00
parent 8f18b25245
commit f379342915
4 changed files with 76 additions and 48 deletions

View File

@@ -200,6 +200,29 @@ bool wxPGVariantToDouble( const wxVariant& variant, double* pResult )
return false;
}
// -----------------------------------------------------------------------
// wxPGPropArgCls
// -----------------------------------------------------------------------
wxPGProperty* wxPGPropArgCls::GetPtr( wxPropertyGridInterface* iface ) const
{
if ( m_flags == IsProperty )
{
wxASSERT_MSG( m_ptr.property, wxT("invalid property ptr") );
return m_ptr.property;
}
else if ( m_flags & IsWxString )
return iface->GetPropertyByNameA(*m_ptr.stringName);
else if ( m_flags & IsCharPtr )
return iface->GetPropertyByNameA(m_ptr.charName);
#if wxUSE_WCHAR_T
else if ( m_flags & IsWCharPtr )
return iface->GetPropertyByNameA(m_ptr.wcharName);
#endif
return NULL;
}
// -----------------------------------------------------------------------
// Choice related methods
// -----------------------------------------------------------------------