m_ordered = false;
wxDataViewItem item( m_hash[row] );
- /* wxDataViewModel:: */ ItemDeleted( wxDataViewItem(0), item );
m_hash.RemoveAt( row );
+ /* wxDataViewModel:: */ ItemDeleted( wxDataViewItem(0), item );
}
void wxDataViewIndexListModel::RowsDeleted( const wxArrayInt &rows )
{
- wxArrayInt sorted = rows;
- sorted.Sort( my_sort );
-
m_ordered = false;
wxDataViewItemArray array;
wxDataViewItem item( m_hash[rows[i]] );
array.Add( item );
}
- /* wxDataViewModel:: */ ItemsDeleted( wxDataViewItem(0), array );
+ wxArrayInt sorted = rows;
+ sorted.Sort( my_sort );
for (i = 0; i < sorted.GetCount(); i++)
m_hash.RemoveAt( sorted[i] );
+
+ /* wxDataViewModel:: */ ItemsDeleted( wxDataViewItem(0), array );
}
void wxDataViewIndexListModel::RowChanged( unsigned int row )
wxDataViewRendererBase::~wxDataViewRendererBase()
{
+ if ( m_editorCtrl )
+ DestroyEditControl();
}
wxDataViewCtrl* wxDataViewRendererBase::GetView() const
return Activate(cell, model, item, col);
}
+void wxDataViewCustomRendererBase::RenderBackground(wxDC* dc, const wxRect& rect)
+{
+ if ( !m_attr.HasBackgroundColour() )
+ return;
+
+ const wxColour& colour = m_attr.GetBackgroundColour();
+ wxDCPenChanger changePen(*dc, colour);
+ wxDCBrushChanger changeBrush(*dc, colour);
+
+ dc->DrawRectangle(rect);
+}
+
void
wxDataViewCustomRendererBase::WXCallRender(wxRect rectCell, wxDC *dc, int state)
{
return true;
}
+void wxDataViewCtrlBase::StartEditor(const wxDataViewItem& item, unsigned int column)
+{
+ EditItem(item, GetColumn(column));
+}
+
// ---------------------------------------------------------
// wxDataViewEvent
// ---------------------------------------------------------