+void wxItemContainer::AssignNewItemClientData(unsigned int pos,
+ void **clientData,
+ unsigned int n,
+ wxClientDataType type)
+{
+ switch ( type )
+ {
+ case wxClientData_Object:
+ SetClientObject
+ (
+ pos,
+ (reinterpret_cast<wxClientData **>(clientData))[n]
+ );
+ break;
+
+ case wxClientData_Void:
+ SetClientData(pos, clientData[n]);
+ break;
+
+ default:
+ wxFAIL_MSG( _T("unknown client data type") );
+ // fall through
+
+ case wxClientData_None:
+ // nothing to do
+ break;
+ }
+}
+
+void wxItemContainer::ResetItemClientObject(unsigned int n)
+{
+ wxClientData * const data = GetClientObject(n);
+ if ( data )
+ {
+ delete data;
+ DoSetItemClientData(n, NULL);
+ }
+}
+