private void PaintCell(object item, int column_index, int row_index, Rectangle area, bool opaque, bool bold, StateType state, bool dragging) { ColumnCell cell = column_cache[column_index].Column.GetCell(0); cell.BindListItem(item); ColumnCellDataProvider(cell, item); ITextCell text_cell = cell as ITextCell; if (text_cell != null) { text_cell.FontWeight = bold ? Pango.Weight.Bold : Pango.Weight.Normal; } if (dragging) { Cairo.Color fill_color = Theme.Colors.GetWidgetColor(GtkColorClass.Base, StateType.Normal); fill_color.A = 0.5; cairo_context.Color = fill_color; cairo_context.Rectangle(area.X, area.Y, area.Width, area.Height); cairo_context.Fill(); } cairo_context.Save(); cairo_context.Translate(area.X, area.Y); cell_context.Area = area; cell_context.Opaque = opaque; cell.Render(cell_context, dragging ? StateType.Normal : state, area.Width, area.Height); cairo_context.Restore(); AccessibleCellRedrawn(column_index, row_index); }
#pragma warning disable 0169 private bool GetEventCell <G> (int x, int y, out G icell, out Column column, out int row_index) where G : class { icell = null; column = null; row_index = 0; if (Model == null) { return(false); } x -= list_interaction_alloc.X; y -= list_interaction_alloc.Y; row_index = GetRowAtY(y); if (row_index < 0 || row_index >= Model.Count) { return(false); } column = GetColumnAt(x); if (column == null) { return(false); } ColumnCell cell = column.GetCell(0); icell = cell as G; if (icell == null) { return(false); } // Bind the row to the cell cell.BindListItem(model[row_index]); return(true); }