static void gtk_sheet_row_title_button_draw (GtkSheet *sheet, gint row);
+static void gtk_sheet_set_row_height (GtkSheet * sheet,
+ gint row,
+ guint height);
static gboolean gtk_sheet_cell_empty (const GtkSheet *, gint, gint);
static void destroy_hover_window (GtkSheetHoverTitle *);
static GtkSheetHoverTitle *create_hover_window (void);
+static GtkStateType gtk_sheet_cell_get_state (GtkSheet *sheet, gint row, gint col);
+
+
static inline void
dispose_string (const GtkSheet *sheet, gchar *text)
{
}
}
-static
-guint DEFAULT_FONT_ASCENT (GtkWidget *widget)
-{
- if (!widget->style->font_desc) return 12;
- else
- {
- PangoContext *context = gtk_widget_get_pango_context (widget);
- PangoFontMetrics *metrics =
- pango_context_get_metrics (context,
- widget->style->font_desc,
- pango_context_get_language (context));
- guint val = pango_font_metrics_get_ascent (metrics);
- pango_font_metrics_unref (metrics);
- return PANGO_PIXELS (val);
- }
-}
-
static
guint STRING_WIDTH (GtkWidget *widget,
const PangoFontDescription *font, const gchar *text)
return PANGO_PIXELS (rect.width);
}
-static
-guint DEFAULT_FONT_DESCENT (GtkWidget *widget)
-{
- if (!widget->style->font_desc) return 12;
- else
- {
- PangoContext *context = gtk_widget_get_pango_context (widget);
- PangoFontMetrics *metrics =
- pango_context_get_metrics (context,
- widget->style->font_desc,
- pango_context_get_language (context));
- guint val = pango_font_metrics_get_descent (metrics);
- pango_font_metrics_unref (metrics);
- return PANGO_PIXELS (val);
- }
-}
-
-
/* Return the row containing pixel Y */
static gint
yyy_row_ypixel_to_row (const GtkSheet *sheet, gint y)
static inline glong
min_visible_row (const GtkSheet *sheet)
{
- glong row =
- yyy_row_ypixel_to_row (sheet, sheet->vadjustment->value);
-
- return row;
+ return yyy_row_ypixel_to_row (sheet, sheet->vadjustment->value);
}
static inline glong
max_visible_row (const GtkSheet *sheet)
{
- glong row =
- yyy_row_ypixel_to_row (sheet,
+ return yyy_row_ypixel_to_row (sheet,
sheet->vadjustment->value +
sheet->vadjustment->page_size);
-
- return row;
}
}
-GtkStateType
+static GtkStateType
gtk_sheet_cell_get_state (GtkSheet *sheet, gint row, gint col)
{
gint state;
-void
+static void
gtk_sheet_set_row_height (GtkSheet * sheet,
gint row,
guint height)