2 * Copyright (C) 1998-2000 Red Hat, Inc.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
19 * Written by Owen Taylor <otaylor@redhat.com>, based on code by
20 * Carsten Haitzler <raster@rasterman.com>
27 #include "pixbuf-rc-style.h"
28 #include "pixbuf-style.h"
30 static void pixbuf_style_init (PixbufStyle *style);
31 static void pixbuf_style_class_init (PixbufStyleClass *klass);
33 static GtkStyleClass *parent_class = NULL;
36 match_theme_image (GtkStyle *style,
37 ThemeMatchData *match_data)
41 tmp_list = PIXBUF_RC_STYLE (style->rc_style)->img_list;
46 ThemeImage *image = tmp_list->data;
47 tmp_list = tmp_list->next;
49 if (match_data->function != image->match_data.function)
52 flags = match_data->flags & image->match_data.flags;
54 if (flags != image->match_data.flags) /* Required components not present */
57 if ((flags & THEME_MATCH_STATE) &&
58 match_data->state != image->match_data.state)
61 if ((flags & THEME_MATCH_SHADOW) &&
62 match_data->shadow != image->match_data.shadow)
65 if ((flags & THEME_MATCH_ARROW_DIRECTION) &&
66 match_data->arrow_direction != image->match_data.arrow_direction)
69 if ((flags & THEME_MATCH_ORIENTATION) &&
70 match_data->orientation != image->match_data.orientation)
73 if ((flags & THEME_MATCH_GAP_SIDE) &&
74 match_data->gap_side != image->match_data.gap_side)
77 if ((flags & THEME_MATCH_EXPANDER_STYLE) &&
78 match_data->expander_style != image->match_data.expander_style)
81 if ((flags & THEME_MATCH_WINDOW_EDGE) &&
82 match_data->window_edge != image->match_data.window_edge)
85 if (image->match_data.detail &&
86 (!match_data->detail ||
87 strcmp (match_data->detail, image->match_data.detail) != 0))
97 draw_simple_image(GtkStyle *style,
100 ThemeMatchData *match_data,
101 gboolean draw_center,
102 gboolean allow_setbg,
111 if (!(match_data->flags & THEME_MATCH_ORIENTATION))
113 match_data->flags |= THEME_MATCH_ORIENTATION;
116 match_data->orientation = GTK_ORIENTATION_VERTICAL;
118 match_data->orientation = GTK_ORIENTATION_HORIZONTAL;
121 image = match_theme_image (style, match_data);
124 if (image->background)
126 theme_pixbuf_render (image->background, cr,
127 draw_center ? COMPONENT_ALL : COMPONENT_ALL | COMPONENT_CENTER,
129 x, y, width, height);
132 if (image->overlay && draw_center)
133 theme_pixbuf_render (image->overlay, cr, COMPONENT_ALL,
135 x, y, width, height);
144 draw_simple_image_no_cairo(GtkStyle *style,
148 ThemeMatchData *match_data,
149 gboolean draw_center,
150 gboolean allow_setbg,
159 if ((width == -1) && (height == -1))
160 gdk_drawable_get_size(window, &width, &height);
161 else if (width == -1)
162 gdk_drawable_get_size(window, &width, NULL);
163 else if (height == -1)
164 gdk_drawable_get_size(window, NULL, &height);
166 cr = gdk_cairo_create (window);
169 gdk_cairo_rectangle (cr, area);
173 result = draw_simple_image (style, cr, widget, match_data,
174 draw_center, allow_setbg,
175 x, y, width, height);
183 draw_gap_image(GtkStyle *style,
186 ThemeMatchData *match_data,
187 gboolean draw_center,
192 GtkPositionType gap_side,
198 if (!(match_data->flags & THEME_MATCH_ORIENTATION))
200 match_data->flags |= THEME_MATCH_ORIENTATION;
203 match_data->orientation = GTK_ORIENTATION_VERTICAL;
205 match_data->orientation = GTK_ORIENTATION_HORIZONTAL;
208 match_data->flags |= THEME_MATCH_GAP_SIDE;
209 match_data->gap_side = gap_side;
211 image = match_theme_image (style, match_data);
215 GdkRectangle r1, r2, r3;
216 GdkPixbuf *pixbuf = NULL;
217 guint components = COMPONENT_ALL;
220 components |= COMPONENT_CENTER;
222 if (image->gap_start)
223 pixbuf = theme_pixbuf_get_pixbuf (image->gap_start);
229 thickness = gdk_pixbuf_get_height (pixbuf);
231 thickness = style->ythickness;
234 components |= COMPONENT_NORTH_WEST | COMPONENT_NORTH | COMPONENT_NORTH_EAST;
239 r1.height = thickness;
242 r2.width = gap_width;
243 r2.height = thickness;
244 r3.x = x + gap_x + gap_width;
246 r3.width = width - (gap_x + gap_width);
247 r3.height = thickness;
252 thickness = gdk_pixbuf_get_height (pixbuf);
254 thickness = style->ythickness;
257 components |= COMPONENT_SOUTH_WEST | COMPONENT_SOUTH | COMPONENT_SOUTH_EAST;
260 r1.y = y + height - thickness;
262 r1.height = thickness;
264 r2.y = y + height - thickness;
265 r2.width = gap_width;
266 r2.height = thickness;
267 r3.x = x + gap_x + gap_width;
268 r3.y = y + height - thickness;
269 r3.width = width - (gap_x + gap_width);
270 r3.height = thickness;
275 thickness = gdk_pixbuf_get_width (pixbuf);
277 thickness = style->xthickness;
280 components |= COMPONENT_NORTH_WEST | COMPONENT_WEST | COMPONENT_SOUTH_WEST;
284 r1.width = thickness;
288 r2.width = thickness;
289 r2.height = gap_width;
291 r3.y = y + gap_x + gap_width;
292 r3.width = thickness;
293 r3.height = height - (gap_x + gap_width);
298 thickness = gdk_pixbuf_get_width (pixbuf);
300 thickness = style->xthickness;
303 components |= COMPONENT_NORTH_EAST | COMPONENT_EAST | COMPONENT_SOUTH_EAST;
305 r1.x = x + width - thickness;
307 r1.width = thickness;
309 r2.x = x + width - thickness;
311 r2.width = thickness;
312 r2.height = gap_width;
313 r3.x = x + width - thickness;
314 r3.y = y + gap_x + gap_width;
315 r3.width = thickness;
316 r3.height = height - (gap_x + gap_width);
320 g_assert_not_reached ();
323 if (image->background)
324 theme_pixbuf_render (image->background,
325 cr, components, FALSE,
326 x, y, width, height);
327 if (image->gap_start)
328 theme_pixbuf_render (image->gap_start,
329 cr, COMPONENT_ALL, FALSE,
330 r1.x, r1.y, r1.width, r1.height);
332 theme_pixbuf_render (image->gap,
333 cr, COMPONENT_ALL, FALSE,
334 r2.x, r2.y, r2.width, r2.height);
336 theme_pixbuf_render (image->gap_end,
337 cr, COMPONENT_ALL, FALSE,
338 r3.x, r3.y, r3.width, r3.height);
347 draw_gap_image_no_cairo(GtkStyle *style,
351 ThemeMatchData *match_data,
352 gboolean draw_center,
357 GtkPositionType gap_side,
364 if ((width == -1) && (height == -1))
365 gdk_drawable_get_size(window, &width, &height);
366 else if (width == -1)
367 gdk_drawable_get_size(window, &width, NULL);
368 else if (height == -1)
369 gdk_drawable_get_size(window, NULL, &height);
371 cr = gdk_cairo_create (window);
374 gdk_cairo_rectangle (cr, area);
378 result = draw_gap_image (style, cr, widget, match_data,
379 draw_center, x, y, width, height,
380 gap_side, gap_x, gap_width);
388 draw_hline (GtkStyle *style,
398 ThemeMatchData match_data;
400 match_data.function = TOKEN_D_HLINE;
401 match_data.detail = (gchar *)detail;
402 match_data.flags = THEME_MATCH_ORIENTATION | THEME_MATCH_STATE;
403 match_data.state = state;
404 match_data.orientation = GTK_ORIENTATION_HORIZONTAL;
406 image = match_theme_image (style, &match_data);
409 if (image->background)
410 theme_pixbuf_render (image->background,
411 cr, COMPONENT_ALL, FALSE,
412 x1, y, (x2 - x1) + 1, 2);
415 parent_class->draw_hline (style, cr, state, widget, detail,
420 draw_vline (GtkStyle *style,
430 ThemeMatchData match_data;
432 match_data.function = TOKEN_D_VLINE;
433 match_data.detail = (gchar *)detail;
434 match_data.flags = THEME_MATCH_ORIENTATION | THEME_MATCH_STATE;
435 match_data.state = state;
436 match_data.orientation = GTK_ORIENTATION_VERTICAL;
438 image = match_theme_image (style, &match_data);
441 if (image->background)
442 theme_pixbuf_render (image->background,
443 cr, COMPONENT_ALL, FALSE,
444 x, y1, 2, (y2 - y1) + 1);
447 parent_class->draw_vline (style, cr, state, widget, detail,
452 draw_shadow(GtkStyle *style,
455 GtkShadowType shadow,
463 ThemeMatchData match_data;
465 match_data.function = TOKEN_D_SHADOW;
466 match_data.detail = (gchar *)detail;
467 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
468 match_data.shadow = shadow;
469 match_data.state = state;
471 if (!draw_simple_image (style, cr, widget, &match_data, FALSE, FALSE,
472 x, y, width, height))
473 parent_class->draw_shadow (style, cr, state, shadow, widget, detail,
474 x, y, width, height);
477 /* This function makes up for some brokeness in gtkrange.c
478 * where we never get the full arrow of the stepper button
479 * and the type of button in a single drawing function.
481 * It doesn't work correctly when the scrollbar is squished
482 * to the point we don't have room for full-sized steppers.
485 reverse_engineer_stepper_box (GtkWidget *range,
486 GtkArrowType arrow_type,
492 gint slider_width = 14, stepper_size = 14;
496 if (range && GTK_IS_RANGE (range))
498 gtk_widget_style_get (range,
499 "slider_width", &slider_width,
500 "stepper_size", &stepper_size,
504 if (arrow_type == GTK_ARROW_UP || arrow_type == GTK_ARROW_DOWN)
506 box_width = slider_width;
507 box_height = stepper_size;
511 box_width = stepper_size;
512 box_height = slider_width;
515 *x = *x - (box_width - *width) / 2;
516 *y = *y - (box_height - *height) / 2;
518 *height = box_height;
522 draw_arrow (GtkStyle *style,
525 GtkShadowType shadow,
528 GtkArrowType arrow_direction,
535 ThemeMatchData match_data;
538 (strcmp (detail, "hscrollbar") == 0 || strcmp (detail, "vscrollbar") == 0))
540 /* This is a hack to work around the fact that scrollbar steppers are drawn
541 * as a box + arrow, so we never have
543 * The full bounding box of the scrollbar
544 * The arrow direction
546 * At the same time. We simulate an extra paint function, "STEPPER", by doing
547 * nothing for the box, and then here, reverse engineering the box that
548 * was passed to draw box and using that
552 gint box_width = width;
553 gint box_height = height;
555 reverse_engineer_stepper_box (widget, arrow_direction,
556 &box_x, &box_y, &box_width, &box_height);
558 match_data.function = TOKEN_D_STEPPER;
559 match_data.detail = (gchar *)detail;
560 match_data.flags = (THEME_MATCH_SHADOW |
562 THEME_MATCH_ARROW_DIRECTION);
563 match_data.shadow = shadow;
564 match_data.state = state;
565 match_data.arrow_direction = arrow_direction;
567 if (draw_simple_image (style, cr, widget, &match_data, TRUE, TRUE,
568 box_x, box_y, box_width, box_height))
570 /* The theme included stepper images, we're done */
574 /* Otherwise, draw the full box, and fall through to draw the arrow
576 match_data.function = TOKEN_D_BOX;
577 match_data.detail = (gchar *)detail;
578 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
579 match_data.shadow = shadow;
580 match_data.state = state;
582 if (!draw_simple_image (style, cr, widget, &match_data, TRUE, TRUE,
583 box_x, box_y, box_width, box_height))
584 parent_class->draw_box (style, cr, state, shadow, widget, detail,
585 box_x, box_y, box_width, box_height);
589 match_data.function = TOKEN_D_ARROW;
590 match_data.detail = (gchar *)detail;
591 match_data.flags = (THEME_MATCH_SHADOW |
593 THEME_MATCH_ARROW_DIRECTION);
594 match_data.shadow = shadow;
595 match_data.state = state;
596 match_data.arrow_direction = arrow_direction;
598 if (!draw_simple_image (style, cr, widget, &match_data, TRUE, TRUE,
599 x, y, width, height))
600 parent_class->draw_arrow (style, cr, state, shadow, widget, detail,
601 arrow_direction, fill, x, y, width, height);
605 draw_diamond (GtkStyle *style,
608 GtkShadowType shadow,
616 ThemeMatchData match_data;
618 match_data.function = TOKEN_D_DIAMOND;
619 match_data.detail = (gchar *)detail;
620 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
621 match_data.shadow = shadow;
622 match_data.state = state;
624 if (!draw_simple_image (style, cr, widget, &match_data, TRUE, TRUE,
625 x, y, width, height))
626 parent_class->draw_diamond (style, cr, state, shadow, widget, detail,
627 x, y, width, height);
631 draw_box (GtkStyle *style,
634 GtkShadowType shadow,
642 ThemeMatchData match_data;
645 (strcmp (detail, "hscrollbar") == 0 || strcmp (detail, "vscrollbar") == 0))
647 /* We handle this in draw_arrow */
651 match_data.function = TOKEN_D_BOX;
652 match_data.detail = (gchar *)detail;
653 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
654 match_data.shadow = shadow;
655 match_data.state = state;
657 if (!draw_simple_image (style, cr, widget, &match_data, TRUE, TRUE,
658 x, y, width, height)) {
659 parent_class->draw_box (style, cr, state, shadow, widget, detail,
660 x, y, width, height);
665 draw_flat_box (GtkStyle *style,
668 GtkShadowType shadow,
676 ThemeMatchData match_data;
678 match_data.function = TOKEN_D_FLAT_BOX;
679 match_data.detail = (gchar *)detail;
680 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
681 match_data.shadow = shadow;
682 match_data.state = state;
684 if (!draw_simple_image (style, cr, widget, &match_data, TRUE, TRUE,
685 x, y, width, height))
686 parent_class->draw_flat_box (style, cr, state, shadow, widget, detail,
687 x, y, width, height);
691 draw_check (GtkStyle *style,
694 GtkShadowType shadow,
702 ThemeMatchData match_data;
704 match_data.function = TOKEN_D_CHECK;
705 match_data.detail = (gchar *)detail;
706 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
707 match_data.shadow = shadow;
708 match_data.state = state;
710 if (!draw_simple_image (style, cr, widget, &match_data, TRUE, TRUE,
711 x, y, width, height))
712 parent_class->draw_check (style, cr, state, shadow, widget, detail,
713 x, y, width, height);
717 draw_option (GtkStyle *style,
720 GtkShadowType shadow,
729 ThemeMatchData match_data;
731 g_return_if_fail(style != NULL);
732 g_return_if_fail(window != NULL);
734 match_data.function = TOKEN_D_OPTION;
735 match_data.detail = (gchar *)detail;
736 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
737 match_data.shadow = shadow;
738 match_data.state = state;
740 if (!draw_simple_image_no_cairo (style, window, area, widget, &match_data, TRUE, TRUE,
741 x, y, width, height))
742 parent_class->draw_option (style, window, state, shadow, area, widget, detail,
743 x, y, width, height);
747 draw_tab (GtkStyle *style,
750 GtkShadowType shadow,
759 ThemeMatchData match_data;
761 g_return_if_fail(style != NULL);
762 g_return_if_fail(window != NULL);
764 match_data.function = TOKEN_D_TAB;
765 match_data.detail = (gchar *)detail;
766 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
767 match_data.shadow = shadow;
768 match_data.state = state;
770 if (!draw_simple_image_no_cairo (style, window, area, widget, &match_data, TRUE, TRUE,
771 x, y, width, height))
772 parent_class->draw_tab (style, window, state, shadow, area, widget, detail,
773 x, y, width, height);
777 draw_shadow_gap (GtkStyle *style,
780 GtkShadowType shadow,
788 GtkPositionType gap_side,
792 ThemeMatchData match_data;
794 match_data.function = TOKEN_D_SHADOW_GAP;
795 match_data.detail = (gchar *)detail;
796 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
797 match_data.flags = (THEME_MATCH_SHADOW |
799 THEME_MATCH_ORIENTATION);
800 match_data.shadow = shadow;
801 match_data.state = state;
803 if (!draw_gap_image_no_cairo (style, window, area, widget, &match_data, FALSE,
804 x, y, width, height, gap_side, gap_x, gap_width))
805 parent_class->draw_shadow_gap (style, window, state, shadow, area, widget, detail,
806 x, y, width, height, gap_side, gap_x, gap_width);
810 draw_box_gap (GtkStyle *style,
813 GtkShadowType shadow,
821 GtkPositionType gap_side,
825 ThemeMatchData match_data;
827 match_data.function = TOKEN_D_BOX_GAP;
828 match_data.detail = (gchar *)detail;
829 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
830 match_data.flags = (THEME_MATCH_SHADOW |
832 THEME_MATCH_ORIENTATION);
833 match_data.shadow = shadow;
834 match_data.state = state;
836 if (!draw_gap_image_no_cairo (style, window, area, widget, &match_data, TRUE,
837 x, y, width, height, gap_side, gap_x, gap_width))
838 parent_class->draw_box_gap (style, window, state, shadow, area, widget, detail,
839 x, y, width, height, gap_side, gap_x, gap_width);
843 draw_extension (GtkStyle *style,
846 GtkShadowType shadow,
854 GtkPositionType gap_side)
856 ThemeMatchData match_data;
858 g_return_if_fail (style != NULL);
859 g_return_if_fail (window != NULL);
861 match_data.function = TOKEN_D_EXTENSION;
862 match_data.detail = (gchar *)detail;
863 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE | THEME_MATCH_GAP_SIDE;
864 match_data.shadow = shadow;
865 match_data.state = state;
866 match_data.gap_side = gap_side;
868 if (!draw_simple_image_no_cairo (style, window, area, widget, &match_data, TRUE, TRUE,
869 x, y, width, height))
870 parent_class->draw_extension (style, window, state, shadow, area, widget, detail,
871 x, y, width, height, gap_side);
875 draw_focus (GtkStyle *style,
877 GtkStateType state_type,
886 ThemeMatchData match_data;
888 g_return_if_fail (style != NULL);
889 g_return_if_fail (window != NULL);
891 match_data.function = TOKEN_D_FOCUS;
892 match_data.detail = (gchar *)detail;
893 match_data.flags = 0;
895 if (!draw_simple_image_no_cairo (style, window, area, widget, &match_data, TRUE, FALSE,
896 x, y, width, height))
897 parent_class->draw_focus (style, window, state_type, area, widget, detail,
898 x, y, width, height);
902 draw_slider (GtkStyle *style,
905 GtkShadowType shadow,
913 GtkOrientation orientation)
915 ThemeMatchData match_data;
917 g_return_if_fail(style != NULL);
918 g_return_if_fail(window != NULL);
920 match_data.function = TOKEN_D_SLIDER;
921 match_data.detail = (gchar *)detail;
922 match_data.flags = (THEME_MATCH_SHADOW |
924 THEME_MATCH_ORIENTATION);
925 match_data.shadow = shadow;
926 match_data.state = state;
927 match_data.orientation = orientation;
929 if (!draw_simple_image_no_cairo (style, window, area, widget, &match_data, TRUE, TRUE,
930 x, y, width, height))
931 parent_class->draw_slider (style, window, state, shadow, area, widget, detail,
932 x, y, width, height, orientation);
937 draw_handle (GtkStyle *style,
940 GtkShadowType shadow,
948 GtkOrientation orientation)
950 ThemeMatchData match_data;
952 g_return_if_fail (style != NULL);
953 g_return_if_fail (window != NULL);
955 match_data.function = TOKEN_D_HANDLE;
956 match_data.detail = (gchar *)detail;
957 match_data.flags = (THEME_MATCH_SHADOW |
959 THEME_MATCH_ORIENTATION);
960 match_data.shadow = shadow;
961 match_data.state = state;
962 match_data.orientation = orientation;
964 if (!draw_simple_image_no_cairo (style, window, area, widget, &match_data, TRUE, TRUE,
965 x, y, width, height))
966 parent_class->draw_handle (style, window, state, shadow, area, widget, detail,
967 x, y, width, height, orientation);
971 draw_expander (GtkStyle *style,
979 GtkExpanderStyle expander_style)
981 #define DEFAULT_EXPANDER_SIZE 12
983 ThemeMatchData match_data;
987 g_return_if_fail (style != NULL);
988 g_return_if_fail (window != NULL);
991 gtk_widget_class_find_style_property (GTK_WIDGET_GET_CLASS (widget),
994 gtk_widget_style_get (widget,
995 "expander-size", &expander_size,
999 expander_size = DEFAULT_EXPANDER_SIZE;
1001 radius = expander_size/2;
1003 match_data.function = TOKEN_D_EXPANDER;
1004 match_data.detail = (gchar *)detail;
1005 match_data.flags = (THEME_MATCH_STATE |
1006 THEME_MATCH_EXPANDER_STYLE);
1007 match_data.state = state;
1008 match_data.expander_style = expander_style;
1010 if (!draw_simple_image_no_cairo (style, window, area, widget, &match_data, TRUE, TRUE,
1011 x - radius, y - radius, expander_size, expander_size))
1012 parent_class->draw_expander (style, window, state, area, widget, detail,
1013 x, y, expander_style);
1017 draw_resize_grip (GtkStyle *style,
1022 const gchar *detail,
1029 ThemeMatchData match_data;
1031 g_return_if_fail (style != NULL);
1032 g_return_if_fail (window != NULL);
1034 match_data.function = TOKEN_D_RESIZE_GRIP;
1035 match_data.detail = (gchar *)detail;
1036 match_data.flags = (THEME_MATCH_STATE |
1037 THEME_MATCH_WINDOW_EDGE);
1038 match_data.state = state;
1039 match_data.window_edge = edge;
1041 if (!draw_simple_image_no_cairo (style, window, area, widget, &match_data, TRUE, TRUE,
1042 x, y, width, height))
1043 parent_class->draw_resize_grip (style, window, state, area, widget, detail,
1044 edge, x, y, width, height);
1047 GType pixbuf_type_style = 0;
1050 pixbuf_style_register_type (GTypeModule *module)
1052 const GTypeInfo object_info =
1054 sizeof (PixbufStyleClass),
1055 (GBaseInitFunc) NULL,
1056 (GBaseFinalizeFunc) NULL,
1057 (GClassInitFunc) pixbuf_style_class_init,
1058 NULL, /* class_finalize */
1059 NULL, /* class_data */
1060 sizeof (PixbufStyle),
1061 0, /* n_preallocs */
1062 (GInstanceInitFunc) pixbuf_style_init,
1065 pixbuf_type_style = g_type_module_register_type (module,
1072 pixbuf_style_init (PixbufStyle *style)
1077 pixbuf_style_class_init (PixbufStyleClass *klass)
1079 GtkStyleClass *style_class = GTK_STYLE_CLASS (klass);
1081 parent_class = g_type_class_peek_parent (klass);
1083 style_class->draw_hline = draw_hline;
1084 style_class->draw_vline = draw_vline;
1085 style_class->draw_shadow = draw_shadow;
1086 style_class->draw_arrow = draw_arrow;
1087 style_class->draw_diamond = draw_diamond;
1088 style_class->draw_box = draw_box;
1089 style_class->draw_flat_box = draw_flat_box;
1090 style_class->draw_check = draw_check;
1091 style_class->draw_option = draw_option;
1092 style_class->draw_tab = draw_tab;
1093 style_class->draw_shadow_gap = draw_shadow_gap;
1094 style_class->draw_box_gap = draw_box_gap;
1095 style_class->draw_extension = draw_extension;
1096 style_class->draw_focus = draw_focus;
1097 style_class->draw_slider = draw_slider;
1098 style_class->draw_handle = draw_handle;
1099 style_class->draw_expander = draw_expander;
1100 style_class->draw_resize_grip = draw_resize_grip;