/* Drawing Routines */
/* draw cell */
-static void gtk_sheet_cell_draw (GtkSheet *sheet,
- gint row, gint column);
+static void gtk_sheet_cell_draw (GtkSheet *sheet, gint row, gint column);
/* draw visible part of range. If range == NULL then draw the whole screen */
/* Sheet button gadgets */
-static void size_allocate_column_title_buttons (GtkSheet *sheet);
-static void size_allocate_row_title_buttons (GtkSheet *sheet);
+static void draw_column_title_buttons (GtkSheet *sheet);
+static void draw_row_title_buttons (GtkSheet *sheet);
static void size_allocate_global_button (GtkSheet *sheet);
sheet->hover_window = create_hover_window ();
- size_allocate_row_title_buttons (sheet);
- size_allocate_column_title_buttons (sheet);
+ draw_row_title_buttons (sheet);
+ draw_column_title_buttons (sheet);
gtk_sheet_update_primary_selection (sheet);
}
if (sheet->column_titles_visible)
{
- size_allocate_column_title_buttons (sheet);
+ draw_column_title_buttons (sheet);
gdk_window_show (sheet->column_title_window);
}
if (sheet->row_titles_visible)
{
- size_allocate_row_title_buttons (sheet);
+ draw_row_title_buttons (sheet);
gdk_window_show (sheet->row_title_window);
}
rectangle_from_range (sheet, &drawing_range, &area);
}
+
gdk_draw_rectangle (sheet->sheet_window,
GTK_WIDGET (sheet)->style->white_gc,
TRUE,
/* column button allocation */
- size_allocate_column_title_buttons (sheet);
+ draw_column_title_buttons (sheet);
/* position the window which holds the row title buttons */
sheet->row_title_area.x = 0;
/* row button allocation */
- size_allocate_row_title_buttons (sheet);
- size_allocate_column_title_buttons (sheet);
+ draw_row_title_buttons (sheet);
+ draw_column_title_buttons (sheet);
/* set the scrollbars adjustments */
adjust_scrollbars (sheet);
}
static void
-size_allocate_column_title_buttons (GtkSheet *sheet)
+draw_column_title_buttons (GtkSheet *sheet)
{
gint i;
gint x, width;
}
static void
-size_allocate_row_title_buttons (GtkSheet *sheet)
+draw_row_title_buttons (GtkSheet *sheet)
{
gint i;
gint y = 0;
vadjustment_value_changed (GtkAdjustment *adjustment,
gpointer data)
{
+ GdkRegion *region;
GtkSheet *sheet = GTK_SHEET (data);
g_return_if_fail (adjustment != NULL);
if ( ! GTK_WIDGET_REALIZED (sheet)) return;
+
gtk_widget_hide (sheet->entry_widget);
+
+ region =
+ gdk_drawable_get_visible_region (GDK_DRAWABLE (sheet->sheet_window));
+
+ gdk_window_begin_paint_region (sheet->sheet_window, region);
+
+
gtk_sheet_range_draw (sheet, NULL);
- size_allocate_row_title_buttons (sheet);
+ draw_row_title_buttons (sheet);
// size_allocate_global_button (sheet);
+
+ gdk_window_end_paint (sheet->sheet_window);
}
hadjustment_value_changed (GtkAdjustment *adjustment,
gpointer data)
{
+ GdkRegion *region;
GtkSheet *sheet = GTK_SHEET (data);
g_return_if_fail (adjustment != NULL);
if ( ! GTK_WIDGET_REALIZED (sheet)) return;
gtk_widget_hide (sheet->entry_widget);
+
+
+ region =
+ gdk_drawable_get_visible_region (GDK_DRAWABLE (sheet->sheet_window));
+
+ gdk_window_begin_paint_region (sheet->sheet_window, region);
+
gtk_sheet_range_draw (sheet, NULL);
- size_allocate_column_title_buttons (sheet);
+ draw_column_title_buttons (sheet);
// size_allocate_global_button (sheet);
+
+ gdk_window_end_paint (sheet->sheet_window);
}
g_sheet_column_set_width (sheet->column_geometry, column, width);
- size_allocate_column_title_buttons (sheet);
+ draw_column_title_buttons (sheet);
return width;
}
height = min_height;
g_sheet_row_set_height (sheet->row_geometry, row, height);
- size_allocate_row_title_buttons (sheet);
+ draw_row_title_buttons (sheet);
return height;
}
if (GTK_WIDGET_REALIZED (GTK_WIDGET (sheet)))
{
- size_allocate_column_title_buttons (sheet);
+ draw_column_title_buttons (sheet);
adjust_scrollbars (sheet);
gtk_sheet_size_allocate_entry (sheet);
gtk_sheet_range_draw (sheet, NULL);
if (GTK_WIDGET_REALIZED (GTK_WIDGET (sheet)) )
{
- size_allocate_row_title_buttons (sheet);
+ draw_row_title_buttons (sheet);
adjust_scrollbars (sheet);
gtk_sheet_size_allocate_entry (sheet);
gtk_sheet_range_draw (sheet, NULL);