- virtual wxDataViewItem GetNextSibling( const wxDataViewItem &item ) const
- {
- MyMusicModelNode *node = (MyMusicModelNode*) item.GetID();
-
- // "MyMusic" has no siblings in our model
- if (node == m_root)
- return wxDataViewItem(0);
-
- MyMusicModelNode *parent = node->GetParent();
- int pos = parent->GetChildren().Index( node );
-
- // Something went wrong
- if (pos == wxNOT_FOUND)
- return wxDataViewItem(0);
-
- // No more children
- if (pos == parent->GetChildCount()-1)
- return wxDataViewItem(0);
-
- node = parent->GetChildren().Item( pos+1 );
- return wxDataViewItem( (void*) node );
- }
-