X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/89c33c4831a62c628ebdbba02c2c05ec6b9169c0..1a289c624bca8583cd7f2cd6bfc22a70fc1a41db:/src/osx/carbon/utils.cpp diff --git a/src/osx/carbon/utils.cpp b/src/osx/carbon/utils.cpp index 860f667d22..c16c5ddb29 100644 --- a/src/osx/carbon/utils.cpp +++ b/src/osx/carbon/utils.cpp @@ -624,6 +624,11 @@ OSStatus wxMacDataBrowserControl::SetDisclosureColumn( DataBrowserPropertyID pro return SetDataBrowserListViewDisclosureColumn( m_controlRef, property, expandableRows); } +OSStatus wxMacDataBrowserControl::GetItemPartBounds( DataBrowserItemID item, DataBrowserPropertyID property, DataBrowserPropertyPart part, Rect * bounds ) +{ + return GetDataBrowserItemPartBounds( m_controlRef, item, property, part, bounds); +} + // ============================================================================ // Higher-level Databrowser // ============================================================================ @@ -756,13 +761,7 @@ Boolean wxMacDataItemBrowserControl::CompareItems(DataBrowserItemID itemOneID, { wxMacDataItem* itemOne = (wxMacDataItem*) itemOneID; wxMacDataItem* itemTwo = (wxMacDataItem*) itemTwoID; - return CompareItems( itemOne , itemTwo , sortProperty ); -} -Boolean wxMacDataItemBrowserControl::CompareItems(const wxMacDataItem* itemOne, - const wxMacDataItem* itemTwo, - DataBrowserPropertyID sortProperty) -{ Boolean retval = false; if ( itemOne != NULL ) retval = itemOne->IsLessThan( this , itemTwo , sortProperty); @@ -776,15 +775,6 @@ OSStatus wxMacDataItemBrowserControl::GetSetItemData( Boolean changeValue ) { wxMacDataItem* item = (wxMacDataItem*) itemID; - return GetSetItemData(item, property, itemData , changeValue ); -} - -OSStatus wxMacDataItemBrowserControl::GetSetItemData( - wxMacDataItem* item, - DataBrowserPropertyID property, - DataBrowserItemDataRef itemData, - Boolean changeValue ) -{ OSStatus err = errDataBrowserPropertyNotSupported; switch( property ) { @@ -810,14 +800,6 @@ void wxMacDataItemBrowserControl::ItemNotification( DataBrowserItemDataRef itemData) { wxMacDataItem* item = (wxMacDataItem*) itemID; - ItemNotification( item , message, itemData); -} - -void wxMacDataItemBrowserControl::ItemNotification( - const wxMacDataItem* item, - DataBrowserItemNotification message, - DataBrowserItemDataRef itemData) -{ if (item != NULL) item->Notification( this, message, itemData); } @@ -994,6 +976,7 @@ void wxMacDataItemBrowserControl::RemoveItems(wxMacDataItem *container, wxArrayM void wxMacDataItemBrowserControl::RemoveAllItems(wxMacDataItem *container) { + SetScrollPosition(0, 0); OSStatus err = wxMacDataBrowserControl::RemoveItems( (DataBrowserItemID)container, 0 , NULL , kDataBrowserItemNoProperty ); verify_noerr( err ); } @@ -1053,7 +1036,7 @@ void wxMacDataItemBrowserControl::MacInsert( unsigned int n, wxMacDataItem* item { 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) @@ -1061,7 +1044,7 @@ void wxMacDataItemBrowserControl::MacInsert( unsigned int n, wxMacDataItem* item wxMacDataItem* iter = (wxMacDataItem*) GetItemFromLine(i); iter->SetOrder( iter->GetOrder() + 1 ); } - + #if 0 // I don't understand what this code is supposed to do, RR. SInt32 frontLineOrder = 0; @@ -1070,7 +1053,7 @@ void wxMacDataItemBrowserControl::MacInsert( unsigned int n, wxMacDataItem* item wxMacDataItem* iter = (wxMacDataItem*) GetItemFromLine(n-1); frontLineOrder = iter->GetOrder()+1; } -#else +#else item->SetOrder( n ); #endif }