+
+void wxDataViewCtrl::EnsureVisible( int row, int column )
+{
+ if( row < 0 )
+ row = 0;
+ if( row > (int) m_clientArea->GetRowCount() )
+ row = m_clientArea->GetRowCount();
+
+ int first = m_clientArea->GetFirstVisibleRow();
+ int last = m_clientArea->GetLastVisibleRow();
+ if( row < first )
+ m_clientArea->ScrollTo( row, column );
+ else if( row > last )
+ m_clientArea->ScrollTo( row - last + first, column );
+ else
+ m_clientArea->ScrollTo( first, column );
+}
+
+void wxDataViewCtrl::EnsureVisible( const wxDataViewItem & item, const wxDataViewColumn * column )
+{
+ int row = m_clientArea->GetRowByItem(item);
+ if( row >= 0 )
+ {
+ if( column == NULL )
+ EnsureVisible(row, -1);
+ else
+ {
+ int col = 0;
+ int len = GetColumnCount();
+ for( int i = 0; i < len; i ++ )
+ if( GetColumn(i) == column )
+ {
+ col = i;
+ break;
+ }
+ EnsureVisible( row, col );
+ }
+ }
+
+}
+
+void wxDataViewCtrl::HitTest( const wxPoint & point, wxDataViewItem & item, wxDataViewColumn* &column ) const
+{
+ m_clientArea->HitTest(point, item, column);
+}
+
+wxRect wxDataViewCtrl::GetItemRect( const wxDataViewItem & item, const wxDataViewColumn* column ) const
+{
+ return m_clientArea->GetItemRect(item, column);
+}
+
+wxDataViewItem wxDataViewCtrl::GetItemByRow( unsigned int row ) const
+{
+ return m_clientArea->GetItemByRow( row );
+}
+
+int wxDataViewCtrl::GetRowByItem( const wxDataViewItem & item ) const
+{
+ return m_clientArea->GetRowByItem( item );
+}
+
+void wxDataViewCtrl::Expand( const wxDataViewItem & item )
+{
+ int row = m_clientArea->GetRowByItem( item );
+ if (row != -1)
+ m_clientArea->Expand(row);
+}
+
+void wxDataViewCtrl::Collapse( const wxDataViewItem & item )
+{
+ int row = m_clientArea->GetRowByItem( item );
+ if (row != -1)
+ m_clientArea->Collapse(row);
+}
+
+ #endif