553{
554 ObjectGridTable *table =
dynamic_cast<ObjectGridTable *
>(
grid.GetTable());
555 wxRect text_rect = rect;
556
557 if (table) {
558 ObjectGridTable::ObjectGridCol *grid_col = table->get_grid_col(col);
559 ObjectGridTable::ObjectGridRow *grid_row = table->get_grid_row(row - 1);
561
562 wxBitmap *bitmap = table->get_color_bitmap((cur_option.value >= 1) ? cur_option.value - 1 : cur_option.value);
563 int bitmap_width = bitmap->GetWidth();
564 int bitmap_height = bitmap->GetHeight();
567
568 dc.SetPen(*wxTRANSPARENT_PEN);
569 dc.SetBrush(wxBrush(attr.GetBackgroundColour()));
570 dc.DrawRectangle(rect);
571 dc.DrawBitmap(*bitmap, wxPoint(rect.x + offset_x, rect.y + offset_y));
574 }
575
576 wxGridCellChoiceRenderer::Draw(
grid, attr, dc, text_rect, row, col, isSelected);
577}
GridColType
Definition GUI_ObjectTable.hpp:294
static const int grid_cell_border_width
Definition GUI_ObjectTable.cpp:61
static const int grid_cell_border_height
Definition GUI_ObjectTable.cpp:62
std::vector< ArithmeticOnly< T > > grid(const T &start, const T &stop, const T &stride)
A set of equidistant values starting from 'start' (inclusive), ending in the closest multiple of 'str...
Definition MTUtils.hpp:127