/* Memory allocation routines */
static void gtk_sheet_real_range_clear (GtkSheet *sheet,
- const GtkSheetRange *range,
- gboolean delete);
+ const GtkSheetRange *range);
+
static void gtk_sheet_real_cell_clear (GtkSheet *sheet,
gint row,
- gint column,
- gboolean delete);
+ gint column);
/* Container Functions */
sheet = GTK_SHEET (object);
- /* get rid of all the cells */
- gtk_sheet_range_clear (sheet, NULL);
- gtk_sheet_range_delete (sheet, NULL);
-
if (sheet->name)
{
g_free (sheet->name);
range.col0 = MIN_VISIBLE_COLUMN (sheet);
range.coli = MAX_VISIBLE_COLUMN (sheet);
- gtk_sheet_real_cell_clear (sheet, row, column, FALSE);
-
- if (!GTK_SHEET_IS_FROZEN (sheet))
- {
- gtk_sheet_range_draw (sheet, &range);
- }
-}
-
-void
-gtk_sheet_cell_delete (GtkSheet *sheet, gint row, gint column)
-{
- GtkSheetRange range;
-
- g_return_if_fail (sheet != NULL);
- g_return_if_fail (GTK_IS_SHEET (sheet));
- if (column >= xxx_column_count (sheet) || row >= yyy_row_count (sheet)) return;
- if (column < 0 || row < 0) return;
-
- range.row0 = row;
- range.rowi = row;
- range.col0 = MIN_VISIBLE_COLUMN (sheet);
- range.coli = MAX_VISIBLE_COLUMN (sheet);
-
- gtk_sheet_real_cell_clear (sheet, row, column, TRUE);
+ gtk_sheet_real_cell_clear (sheet, row, column);
if (!GTK_SHEET_IS_FROZEN (sheet))
{
}
static void
-gtk_sheet_real_cell_clear (GtkSheet *sheet, gint row, gint column, gboolean delete)
+gtk_sheet_real_cell_clear (GtkSheet *sheet, gint row, gint column)
{
GSheetModel *model = gtk_sheet_get_model (sheet);
g_return_if_fail (sheet != NULL);
g_return_if_fail (GTK_IS_SHEET (sheet));
- gtk_sheet_real_range_clear (sheet, range, FALSE);
+ gtk_sheet_real_range_clear (sheet, range);
}
-void
-gtk_sheet_range_delete (GtkSheet *sheet, const GtkSheetRange *range)
-{
- g_return_if_fail (sheet != NULL);
- g_return_if_fail (GTK_IS_SHEET (sheet));
-
- gtk_sheet_real_range_clear (sheet, range, TRUE);
-}
-
-
static void
-gtk_sheet_real_range_clear (GtkSheet *sheet, const GtkSheetRange *range,
- gboolean delete)
+gtk_sheet_real_range_clear (GtkSheet *sheet, const GtkSheetRange *range)
{
gint i, j;
GtkSheetRange clear;
for (i = clear.row0; i <= clear.rowi; i++)
for (j = clear.col0; j <= clear.coli; j++)
{
- gtk_sheet_real_cell_clear (sheet, i, j, delete);
+ gtk_sheet_real_cell_clear (sheet, i, j);
}
gtk_sheet_range_draw (sheet, NULL);
/* clear cell contents */
void
gtk_sheet_cell_clear (GtkSheet *sheet, gint row, gint col);
-/* clear cell contents and remove links */
-void
-gtk_sheet_cell_delete (GtkSheet *sheet, gint row, gint col);
/* clear range contents. If range==NULL the whole sheet will be cleared */
void
gtk_sheet_range_clear (GtkSheet *sheet,
const GtkSheetRange *range);
-/* clear range contents and remove links */
-void
-gtk_sheet_range_delete (GtkSheet *sheet,
- const GtkSheetRange *range);
/* get cell state: GTK_STATE_NORMAL, GTK_STATE_SELECTED */
GtkStateType