+ size_t n = 0;
+
+ // NOTE: some wxDataObjectSimple objects may return a number greater than 1
+ // from GetFormatCount(): this is the case of e.g. wxTextDataObject
+ // under wxMac and wxGTK
+ wxSimpleDataObjectList::compatibility_iterator node;
+ for ( node = m_dataObjects.GetFirst(); node; node = node->GetNext() )
+ n += node->GetData()->GetFormatCount(dir);
+
+ return n;