gint y,
gint width,
gint height);
-static void gtk_default_draw_string (GtkStyle *style,
- GdkWindow *window,
- GtkStateType state_type,
- GdkRectangle *area,
- GtkWidget *widget,
- const gchar *detail,
- gint x,
- gint y,
- const gchar *string);
static void gtk_default_draw_box (GtkStyle *style,
GdkWindow *window,
GtkStateType state_type,
klass->draw_polygon = gtk_default_draw_polygon;
klass->draw_arrow = gtk_default_draw_arrow;
klass->draw_diamond = gtk_default_draw_diamond;
- klass->draw_string = gtk_default_draw_string;
klass->draw_box = gtk_default_draw_box;
klass->draw_flat_box = gtk_default_draw_flat_box;
klass->draw_check = gtk_default_draw_check;
}
}
-static void
-gtk_default_draw_string (GtkStyle *style,
- GdkWindow *window,
- GtkStateType state_type,
- GdkRectangle *area,
- GtkWidget *widget,
- const gchar *detail,
- gint x,
- gint y,
- const gchar *string)
-{
- if (area)
- {
- gdk_gc_set_clip_rectangle (style->white_gc, area);
- gdk_gc_set_clip_rectangle (style->fg_gc[state_type], area);
- }
-
- if (state_type == GTK_STATE_INSENSITIVE)
- gdk_draw_string (window,
- gtk_style_get_font_internal (style),
- style->white_gc, x + 1, y + 1, string);
-
- gdk_draw_string (window,
- gtk_style_get_font_internal (style),
- style->fg_gc[state_type], x, y, string);
-
- if (area)
- {
- gdk_gc_set_clip_rectangle (style->white_gc, NULL);
- gdk_gc_set_clip_rectangle (style->fg_gc[state_type], NULL);
- }
-}
-
static void
option_menu_get_props (GtkWidget *widget,
GtkRequisition *indicator_size,
x, y, width, height);
}
-static void
-draw_string (GtkStyle * style,
- GdkWindow * window,
- GtkStateType state,
- GdkRectangle * area,
- GtkWidget * widget,
- const gchar *detail,
- gint x,
- gint y,
- const gchar * string)
-{
- g_return_if_fail(style != NULL);
- g_return_if_fail(window != NULL);
-
- if (state == GTK_STATE_INSENSITIVE)
- {
- if (area)
- {
- gdk_gc_set_clip_rectangle(style->white_gc, area);
- gdk_gc_set_clip_rectangle(style->fg_gc[state], area);
- }
-
- gdk_draw_string(window, gtk_style_get_font (style), style->fg_gc[state], x, y, string);
-
- if (area)
- {
- gdk_gc_set_clip_rectangle(style->white_gc, NULL);
- gdk_gc_set_clip_rectangle(style->fg_gc[state], NULL);
- }
- }
- else
- {
- gdk_gc_set_clip_rectangle(style->fg_gc[state], area);
- gdk_draw_string(window, gtk_style_get_font (style), style->fg_gc[state], x, y, string);
- gdk_gc_set_clip_rectangle(style->fg_gc[state], NULL);
- }
-}
-
static void
draw_box (GtkStyle *style,
GdkWindow *window,
style_class->draw_shadow = draw_shadow;
style_class->draw_arrow = draw_arrow;
style_class->draw_diamond = draw_diamond;
- style_class->draw_string = draw_string;
style_class->draw_box = draw_box;
style_class->draw_flat_box = draw_flat_box;
style_class->draw_check = draw_check;