+ long count = m_dbImpl->MacGetCount() ;
+ for ( long line = item + 1 ; line < count; line++ )
+ {
+ DataBrowserItemID id = line + 1;
+ if ( !IsVirtual() )
+ id = (DataBrowserItemID)m_dbImpl->GetItemFromLine(line);
+
+ if ( (state == wxLIST_STATE_DONTCARE ) )
+ return line;
+
+ if ( (state & wxLIST_STATE_SELECTED) && IsDataBrowserItemSelected(m_dbImpl->GetControlRef(), id ) )
+ return line;
+ }
+ }
+
+ if ( geom == wxLIST_NEXT_ABOVE )
+ {
+ int item2 = item;
+ if ( item2 == -1 )
+ item2 = m_dbImpl->MacGetCount();
+
+ for ( long line = item2 - 1 ; line >= 0; line-- )
+ {
+ DataBrowserItemID id = line + 1;
+ if ( !IsVirtual() )
+ id = (DataBrowserItemID)m_dbImpl->GetItemFromLine(line);
+
+ if ( (state == wxLIST_STATE_DONTCARE ) )
+ return line;
+
+ if ( (state & wxLIST_STATE_SELECTED) && IsDataBrowserItemSelected(m_dbImpl->GetControlRef(), id ) )
+ return line;
+ }