+bool wxItemContainerImmutable::SetStringSelection(const wxString& s)
+{
+ const int sel = FindString(s);
+ if ( sel == wxNOT_FOUND )
+ return false;
+
+ SetSelection(sel);
+
+ return true;
+}
+
+wxArrayString wxItemContainerImmutable::GetStrings() const
+{
+ wxArrayString result;
+
+ const unsigned int count = GetCount();
+ result.Alloc(count);
+ for ( unsigned int n = 0; n < count; n++ )
+ result.Add(GetString(n));
+
+ return result;
+}
+
+// ============================================================================
+// wxItemContainer implementation
+// ============================================================================
+
+wxItemContainer::~wxItemContainer()
+{
+ // this destructor is required for Darwin
+}
+
+// ----------------------------------------------------------------------------
+// deleting items
+// ----------------------------------------------------------------------------
+
+void wxItemContainer::Clear()
+{
+ if ( HasClientObjectData() )
+ {
+ const unsigned count = GetCount();
+ for ( unsigned i = 0; i < count; ++i )
+ ResetItemClientObject(i);
+ }
+
+ SetClientDataType(wxClientData_None);
+
+ DoClear();
+}
+
+void wxItemContainer::Delete(unsigned int pos)
+{
+ wxCHECK_RET( pos < GetCount(), _T("invalid index") );
+
+ if ( HasClientObjectData() )
+ ResetItemClientObject(pos);
+
+ DoDeleteOneItem(pos);
+
+ if ( IsEmpty() )
+ {
+ SetClientDataType(wxClientData_None);
+ }
+}
+
+// ----------------------------------------------------------------------------
+//
+// ----------------------------------------------------------------------------
+
+int wxItemContainer::DoInsertItemsInLoop(const wxArrayStringsAdapter& items,
+ unsigned int pos,
+ void **clientData,
+ wxClientDataType type)
+{
+ int n = wxNOT_FOUND;
+
+ const unsigned int count = items.GetCount();
+ for ( unsigned int i = 0; i < count; ++i )
+ {
+ n = DoInsertOneItem(items[i], pos++);
+ if ( n == wxNOT_FOUND )
+ break;
+
+ AssignNewItemClientData(n, clientData, i, type);
+ }
+
+ return n;
+}
+
+int
+wxItemContainer::DoInsertOneItem(const wxString& WXUNUSED(item),
+ unsigned int WXUNUSED(pos))
+{
+ wxFAIL_MSG( _T("Must be overridden if DoInsertItemsInLoop() is used") );
+
+ return wxNOT_FOUND;
+}
+
+