+void wxMacDataItemBrowserControl::GetSelectionAnchor( wxMacDataItemPtr* first , wxMacDataItemPtr* last) const
+{
+ verify_noerr(wxMacDataBrowserControl::GetSelectionAnchor( (DataBrowserItemID*) first, (DataBrowserItemID*) last) );
+}
+
+wxClientDataType wxMacDataItemBrowserControl::GetClientDataType() const
+{
+ return m_clientDataItemsType;
+}
+void wxMacDataItemBrowserControl::SetClientDataType(wxClientDataType clientDataItemsType)
+{
+ m_clientDataItemsType = clientDataItemsType;
+}
+
+unsigned int wxMacDataItemBrowserControl::MacGetCount() const
+{
+ return GetItemCount(wxMacDataBrowserRootContainer,false,kDataBrowserItemAnyState);
+}
+
+void wxMacDataItemBrowserControl::MacDelete( unsigned int n )
+{
+ wxMacDataItem* item = (wxMacDataItem*)GetItemFromLine( n );
+ RemoveItem( wxMacDataBrowserRootContainer, item );
+}
+
+void wxMacDataItemBrowserControl::MacInsert( unsigned int n, const wxString& text, int column )
+{
+ wxMacDataItem* newItem = CreateItem();
+ newItem->SetLabel( text );
+ if ( column != -1 )
+ newItem->SetColumn( kMinColumnId + column );
+
+ if ( m_sortOrder == SortOrder_None )
+ {
+ // increase the order of the lines to be shifted
+ unsigned int lines = MacGetCount();
+ for ( unsigned int i = n; i < lines; ++i)
+ {
+ wxMacDataItem* iter = (wxMacDataItem*) GetItemFromLine(i);
+ iter->SetOrder( iter->GetOrder() + 1 );
+ }
+
+ SInt32 frontLineOrder = 0;
+ if ( n > 0 )
+ {
+ wxMacDataItem* iter = (wxMacDataItem*) GetItemFromLine(n-1);
+ frontLineOrder = iter->GetOrder();
+ }
+ newItem->SetOrder( frontLineOrder + 1 );
+ }
+
+ AddItem( wxMacDataBrowserRootContainer, newItem );
+}
+
+void wxMacDataItemBrowserControl::MacInsert( unsigned int n, const wxArrayString& items, int column )
+{
+ size_t itemsCount = items.GetCount();
+ if ( itemsCount == 0 )
+ return;
+
+ SInt32 frontLineOrder = 0;
+
+ if ( m_sortOrder == SortOrder_None )
+ {
+ // increase the order of the lines to be shifted
+ unsigned int lines = MacGetCount();
+ for ( unsigned int i = n; i < lines; ++i)
+ {
+ wxMacDataItem* iter = (wxMacDataItem*) GetItemFromLine(i);
+ iter->SetOrder( iter->GetOrder() + itemsCount );
+ }
+ if ( n > 0 )
+ {
+ wxMacDataItem* iter = (wxMacDataItem*) GetItemFromLine(n-1);
+ frontLineOrder = iter->GetOrder();
+ }
+ }
+
+ wxArrayMacDataItemPtr ids;
+ ids.SetCount( itemsCount );
+
+ for ( unsigned int i = 0; i < itemsCount; ++i )
+ {
+ wxMacDataItem* item = CreateItem();
+ item->SetLabel( items[i]);
+ if ( column != -1 )
+ item->SetColumn( kMinColumnId + column );
+
+ if ( m_sortOrder == SortOrder_None )
+ item->SetOrder( frontLineOrder + 1 + i );
+
+ ids[i] = item;
+ }
+
+ AddItems( wxMacDataBrowserRootContainer, ids );
+}
+
+int wxMacDataItemBrowserControl::MacAppend( const wxString& text)
+{
+ wxMacDataItem* item = CreateItem();
+ item->SetLabel( text );
+ if ( m_sortOrder == SortOrder_None )
+ {
+ unsigned int lines = MacGetCount();
+ if ( lines == 0 )
+ item->SetOrder( 1 );
+ else
+ {
+ wxMacDataItem* frontItem = (wxMacDataItem*) GetItemFromLine(lines-1);
+ item->SetOrder( frontItem->GetOrder() + 1 );
+ }
+ }
+ AddItem( wxMacDataBrowserRootContainer, item );
+
+ return GetLineFromItem(item);
+}
+
+void wxMacDataItemBrowserControl::MacClear()
+{
+ wxMacDataItemBrowserSelectionSuppressor suppressor(this);
+ RemoveAllItems(wxMacDataBrowserRootContainer);
+}
+
+void wxMacDataItemBrowserControl::MacDeselectAll()