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,
101 ThemeMatchData *match_data,
102 gboolean draw_center,
103 gboolean allow_setbg,
111 if ((width == -1) && (height == -1))
112 gdk_drawable_get_size(window, &width, &height);
113 else if (width == -1)
114 gdk_drawable_get_size(window, &width, NULL);
115 else if (height == -1)
116 gdk_drawable_get_size(window, NULL, &height);
118 if (!(match_data->flags & THEME_MATCH_ORIENTATION))
120 match_data->flags |= THEME_MATCH_ORIENTATION;
123 match_data->orientation = GTK_ORIENTATION_VERTICAL;
125 match_data->orientation = GTK_ORIENTATION_HORIZONTAL;
128 image = match_theme_image (style, match_data);
131 if (image->background)
133 theme_pixbuf_render (image->background,
135 draw_center ? COMPONENT_ALL : COMPONENT_ALL | COMPONENT_CENTER,
137 x, y, width, height);
140 if (image->overlay && draw_center)
141 theme_pixbuf_render (image->overlay,
142 window, area, COMPONENT_ALL,
144 x, y, width, height);
153 draw_gap_image(GtkStyle *style,
157 ThemeMatchData *match_data,
158 gboolean draw_center,
163 GtkPositionType gap_side,
169 if ((width == -1) && (height == -1))
170 gdk_drawable_get_size(window, &width, &height);
171 else if (width == -1)
172 gdk_drawable_get_size(window, &width, NULL);
173 else if (height == -1)
174 gdk_drawable_get_size(window, NULL, &height);
176 if (!(match_data->flags & THEME_MATCH_ORIENTATION))
178 match_data->flags |= THEME_MATCH_ORIENTATION;
181 match_data->orientation = GTK_ORIENTATION_VERTICAL;
183 match_data->orientation = GTK_ORIENTATION_HORIZONTAL;
186 match_data->flags |= THEME_MATCH_GAP_SIDE;
187 match_data->gap_side = gap_side;
189 image = match_theme_image (style, match_data);
193 GdkRectangle r1, r2, r3;
194 GdkPixbuf *pixbuf = NULL;
195 guint components = COMPONENT_ALL;
198 components |= COMPONENT_CENTER;
200 if (image->gap_start)
201 pixbuf = theme_pixbuf_get_pixbuf (image->gap_start);
207 thickness = gdk_pixbuf_get_height (pixbuf);
209 thickness = style->ythickness;
212 components |= COMPONENT_NORTH_WEST | COMPONENT_NORTH | COMPONENT_NORTH_EAST;
217 r1.height = thickness;
220 r2.width = gap_width;
221 r2.height = thickness;
222 r3.x = x + gap_x + gap_width;
224 r3.width = width - (gap_x + gap_width);
225 r3.height = thickness;
230 thickness = gdk_pixbuf_get_height (pixbuf);
232 thickness = style->ythickness;
235 components |= COMPONENT_SOUTH_WEST | COMPONENT_SOUTH | COMPONENT_SOUTH_EAST;
238 r1.y = y + height - thickness;
240 r1.height = thickness;
242 r2.y = y + height - thickness;
243 r2.width = gap_width;
244 r2.height = thickness;
245 r3.x = x + gap_x + gap_width;
246 r3.y = y + height - thickness;
247 r3.width = width - (gap_x + gap_width);
248 r3.height = thickness;
253 thickness = gdk_pixbuf_get_width (pixbuf);
255 thickness = style->xthickness;
258 components |= COMPONENT_NORTH_WEST | COMPONENT_WEST | COMPONENT_SOUTH_WEST;
262 r1.width = thickness;
266 r2.width = thickness;
267 r2.height = gap_width;
269 r3.y = y + gap_x + gap_width;
270 r3.width = thickness;
271 r3.height = height - (gap_x + gap_width);
276 thickness = gdk_pixbuf_get_width (pixbuf);
278 thickness = style->xthickness;
281 components |= COMPONENT_NORTH_EAST | COMPONENT_EAST | COMPONENT_SOUTH_EAST;
283 r1.x = x + width - thickness;
285 r1.width = thickness;
287 r2.x = x + width - thickness;
289 r2.width = thickness;
290 r2.height = gap_width;
291 r3.x = x + width - thickness;
292 r3.y = y + gap_x + gap_width;
293 r3.width = thickness;
294 r3.height = height - (gap_x + gap_width);
298 g_assert_not_reached ();
301 if (image->background)
302 theme_pixbuf_render (image->background,
303 window, area, components, FALSE,
304 x, y, width, height);
305 if (image->gap_start)
306 theme_pixbuf_render (image->gap_start,
307 window, area, COMPONENT_ALL, FALSE,
308 r1.x, r1.y, r1.width, r1.height);
310 theme_pixbuf_render (image->gap,
311 window, area, COMPONENT_ALL, FALSE,
312 r2.x, r2.y, r2.width, r2.height);
314 theme_pixbuf_render (image->gap_end,
315 window, area, COMPONENT_ALL, FALSE,
316 r3.x, r3.y, r3.width, r3.height);
325 draw_hline (GtkStyle *style,
336 ThemeMatchData match_data;
338 g_return_if_fail(style != NULL);
339 g_return_if_fail(window != NULL);
341 match_data.function = TOKEN_D_HLINE;
342 match_data.detail = (gchar *)detail;
343 match_data.flags = THEME_MATCH_ORIENTATION | THEME_MATCH_STATE;
344 match_data.state = state;
345 match_data.orientation = GTK_ORIENTATION_HORIZONTAL;
347 image = match_theme_image (style, &match_data);
350 if (image->background)
351 theme_pixbuf_render (image->background,
352 window, area, COMPONENT_ALL, FALSE,
353 x1, y, (x2 - x1) + 1, 2);
356 parent_class->draw_hline (style, window, state, area, widget, detail,
361 draw_vline (GtkStyle *style,
372 ThemeMatchData match_data;
374 g_return_if_fail (style != NULL);
375 g_return_if_fail (window != NULL);
377 match_data.function = TOKEN_D_VLINE;
378 match_data.detail = (gchar *)detail;
379 match_data.flags = THEME_MATCH_ORIENTATION | THEME_MATCH_STATE;
380 match_data.state = state;
381 match_data.orientation = GTK_ORIENTATION_VERTICAL;
383 image = match_theme_image (style, &match_data);
386 if (image->background)
387 theme_pixbuf_render (image->background,
388 window, area, COMPONENT_ALL, FALSE,
389 x, y1, 2, (y2 - y1) + 1);
392 parent_class->draw_vline (style, window, state, area, widget, detail,
397 draw_shadow(GtkStyle *style,
400 GtkShadowType shadow,
409 ThemeMatchData match_data;
411 g_return_if_fail(style != NULL);
412 g_return_if_fail(window != NULL);
414 match_data.function = TOKEN_D_SHADOW;
415 match_data.detail = (gchar *)detail;
416 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
417 match_data.shadow = shadow;
418 match_data.state = state;
420 if (!draw_simple_image (style, window, area, widget, &match_data, FALSE, FALSE,
421 x, y, width, height))
422 parent_class->draw_shadow (style, window, state, shadow, area, widget, detail,
423 x, y, width, height);
426 /* This function makes up for some brokeness in gtkrange.c
427 * where we never get the full arrow of the stepper button
428 * and the type of button in a single drawing function.
430 * It doesn't work correctly when the scrollbar is squished
431 * to the point we don't have room for full-sized steppers.
434 reverse_engineer_stepper_box (GtkWidget *range,
435 GtkArrowType arrow_type,
441 gint slider_width = 14, stepper_size = 14;
445 if (range && GTK_IS_RANGE (range))
447 gtk_widget_style_get (range,
448 "slider_width", &slider_width,
449 "stepper_size", &stepper_size,
453 if (arrow_type == GTK_ARROW_UP || arrow_type == GTK_ARROW_DOWN)
455 box_width = slider_width;
456 box_height = stepper_size;
460 box_width = stepper_size;
461 box_height = slider_width;
464 *x = *x - (box_width - *width) / 2;
465 *y = *y - (box_height - *height) / 2;
467 *height = box_height;
471 draw_arrow (GtkStyle *style,
474 GtkShadowType shadow,
478 GtkArrowType arrow_direction,
485 ThemeMatchData match_data;
487 g_return_if_fail(style != NULL);
488 g_return_if_fail(window != NULL);
491 (strcmp (detail, "hscrollbar") == 0 || strcmp (detail, "vscrollbar") == 0))
493 /* This is a hack to work around the fact that scrollbar steppers are drawn
494 * as a box + arrow, so we never have
496 * The full bounding box of the scrollbar
497 * The arrow direction
499 * At the same time. We simulate an extra paint function, "STEPPER", by doing
500 * nothing for the box, and then here, reverse engineering the box that
501 * was passed to draw box and using that
505 gint box_width = width;
506 gint box_height = height;
508 reverse_engineer_stepper_box (widget, arrow_direction,
509 &box_x, &box_y, &box_width, &box_height);
511 match_data.function = TOKEN_D_STEPPER;
512 match_data.detail = (gchar *)detail;
513 match_data.flags = (THEME_MATCH_SHADOW |
515 THEME_MATCH_ARROW_DIRECTION);
516 match_data.shadow = shadow;
517 match_data.state = state;
518 match_data.arrow_direction = arrow_direction;
520 if (draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
521 box_x, box_y, box_width, box_height))
523 /* The theme included stepper images, we're done */
527 /* Otherwise, draw the full box, and fall through to draw the arrow
529 match_data.function = TOKEN_D_BOX;
530 match_data.detail = (gchar *)detail;
531 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
532 match_data.shadow = shadow;
533 match_data.state = state;
535 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
536 box_x, box_y, box_width, box_height))
537 parent_class->draw_box (style, window, state, shadow, area, widget, detail,
538 box_x, box_y, box_width, box_height);
542 match_data.function = TOKEN_D_ARROW;
543 match_data.detail = (gchar *)detail;
544 match_data.flags = (THEME_MATCH_SHADOW |
546 THEME_MATCH_ARROW_DIRECTION);
547 match_data.shadow = shadow;
548 match_data.state = state;
549 match_data.arrow_direction = arrow_direction;
551 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
552 x, y, width, height))
553 parent_class->draw_arrow (style, window, state, shadow, area, widget, detail,
554 arrow_direction, fill, x, y, width, height);
558 draw_diamond (GtkStyle *style,
561 GtkShadowType shadow,
570 ThemeMatchData match_data;
572 g_return_if_fail(style != NULL);
573 g_return_if_fail(window != NULL);
575 match_data.function = TOKEN_D_DIAMOND;
576 match_data.detail = (gchar *)detail;
577 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
578 match_data.shadow = shadow;
579 match_data.state = state;
581 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
582 x, y, width, height))
583 parent_class->draw_diamond (style, window, state, shadow, area, widget, detail,
584 x, y, width, height);
588 draw_box (GtkStyle *style,
591 GtkShadowType shadow,
600 ThemeMatchData match_data;
602 g_return_if_fail(style != NULL);
603 g_return_if_fail(window != NULL);
606 (strcmp (detail, "hscrollbar") == 0 || strcmp (detail, "vscrollbar") == 0))
608 /* We handle this in draw_arrow */
612 match_data.function = TOKEN_D_BOX;
613 match_data.detail = (gchar *)detail;
614 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
615 match_data.shadow = shadow;
616 match_data.state = state;
618 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
619 x, y, width, height)) {
620 parent_class->draw_box (style, window, state, shadow, area, widget, detail,
621 x, y, width, height);
626 draw_flat_box (GtkStyle *style,
629 GtkShadowType shadow,
638 ThemeMatchData match_data;
640 g_return_if_fail(style != NULL);
641 g_return_if_fail(window != NULL);
643 match_data.function = TOKEN_D_FLAT_BOX;
644 match_data.detail = (gchar *)detail;
645 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
646 match_data.shadow = shadow;
647 match_data.state = state;
649 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
650 x, y, width, height))
651 parent_class->draw_flat_box (style, window, state, shadow, area, widget, detail,
652 x, y, width, height);
656 draw_check (GtkStyle *style,
659 GtkShadowType shadow,
668 ThemeMatchData match_data;
670 g_return_if_fail(style != NULL);
671 g_return_if_fail(window != NULL);
673 match_data.function = TOKEN_D_CHECK;
674 match_data.detail = (gchar *)detail;
675 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
676 match_data.shadow = shadow;
677 match_data.state = state;
679 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
680 x, y, width, height))
681 parent_class->draw_check (style, window, state, shadow, area, widget, detail,
682 x, y, width, height);
686 draw_option (GtkStyle *style,
689 GtkShadowType shadow,
698 ThemeMatchData match_data;
700 g_return_if_fail(style != NULL);
701 g_return_if_fail(window != NULL);
703 match_data.function = TOKEN_D_OPTION;
704 match_data.detail = (gchar *)detail;
705 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
706 match_data.shadow = shadow;
707 match_data.state = state;
709 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
710 x, y, width, height))
711 parent_class->draw_option (style, window, state, shadow, area, widget, detail,
712 x, y, width, height);
716 draw_tab (GtkStyle *style,
719 GtkShadowType shadow,
728 ThemeMatchData match_data;
730 g_return_if_fail(style != NULL);
731 g_return_if_fail(window != NULL);
733 match_data.function = TOKEN_D_TAB;
734 match_data.detail = (gchar *)detail;
735 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
736 match_data.shadow = shadow;
737 match_data.state = state;
739 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
740 x, y, width, height))
741 parent_class->draw_tab (style, window, state, shadow, area, widget, detail,
742 x, y, width, height);
746 draw_shadow_gap (GtkStyle *style,
749 GtkShadowType shadow,
757 GtkPositionType gap_side,
761 ThemeMatchData match_data;
763 match_data.function = TOKEN_D_SHADOW_GAP;
764 match_data.detail = (gchar *)detail;
765 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
766 match_data.flags = (THEME_MATCH_SHADOW |
768 THEME_MATCH_ORIENTATION);
769 match_data.shadow = shadow;
770 match_data.state = state;
772 if (!draw_gap_image (style, window, area, widget, &match_data, FALSE,
773 x, y, width, height, gap_side, gap_x, gap_width))
774 parent_class->draw_shadow_gap (style, window, state, shadow, area, widget, detail,
775 x, y, width, height, gap_side, gap_x, gap_width);
779 draw_box_gap (GtkStyle *style,
782 GtkShadowType shadow,
790 GtkPositionType gap_side,
794 ThemeMatchData match_data;
796 match_data.function = TOKEN_D_BOX_GAP;
797 match_data.detail = (gchar *)detail;
798 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE;
799 match_data.flags = (THEME_MATCH_SHADOW |
801 THEME_MATCH_ORIENTATION);
802 match_data.shadow = shadow;
803 match_data.state = state;
805 if (!draw_gap_image (style, window, area, widget, &match_data, TRUE,
806 x, y, width, height, gap_side, gap_x, gap_width))
807 parent_class->draw_box_gap (style, window, state, shadow, area, widget, detail,
808 x, y, width, height, gap_side, gap_x, gap_width);
812 draw_extension (GtkStyle *style,
815 GtkShadowType shadow,
823 GtkPositionType gap_side)
825 ThemeMatchData match_data;
827 g_return_if_fail (style != NULL);
828 g_return_if_fail (window != NULL);
830 match_data.function = TOKEN_D_EXTENSION;
831 match_data.detail = (gchar *)detail;
832 match_data.flags = THEME_MATCH_SHADOW | THEME_MATCH_STATE | THEME_MATCH_GAP_SIDE;
833 match_data.shadow = shadow;
834 match_data.state = state;
835 match_data.gap_side = gap_side;
837 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
838 x, y, width, height))
839 parent_class->draw_extension (style, window, state, shadow, area, widget, detail,
840 x, y, width, height, gap_side);
844 draw_focus (GtkStyle *style,
846 GtkStateType state_type,
855 ThemeMatchData match_data;
857 g_return_if_fail (style != NULL);
858 g_return_if_fail (window != NULL);
860 match_data.function = TOKEN_D_FOCUS;
861 match_data.detail = (gchar *)detail;
862 match_data.flags = 0;
864 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, FALSE,
865 x, y, width, height))
866 parent_class->draw_focus (style, window, state_type, area, widget, detail,
867 x, y, width, height);
871 draw_slider (GtkStyle *style,
874 GtkShadowType shadow,
882 GtkOrientation orientation)
884 ThemeMatchData match_data;
886 g_return_if_fail(style != NULL);
887 g_return_if_fail(window != NULL);
889 match_data.function = TOKEN_D_SLIDER;
890 match_data.detail = (gchar *)detail;
891 match_data.flags = (THEME_MATCH_SHADOW |
893 THEME_MATCH_ORIENTATION);
894 match_data.shadow = shadow;
895 match_data.state = state;
896 match_data.orientation = orientation;
898 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
899 x, y, width, height))
900 parent_class->draw_slider (style, window, state, shadow, area, widget, detail,
901 x, y, width, height, orientation);
906 draw_handle (GtkStyle *style,
909 GtkShadowType shadow,
917 GtkOrientation orientation)
919 ThemeMatchData match_data;
921 g_return_if_fail (style != NULL);
922 g_return_if_fail (window != NULL);
924 match_data.function = TOKEN_D_HANDLE;
925 match_data.detail = (gchar *)detail;
926 match_data.flags = (THEME_MATCH_SHADOW |
928 THEME_MATCH_ORIENTATION);
929 match_data.shadow = shadow;
930 match_data.state = state;
931 match_data.orientation = orientation;
933 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
934 x, y, width, height))
935 parent_class->draw_handle (style, window, state, shadow, area, widget, detail,
936 x, y, width, height, orientation);
940 draw_expander (GtkStyle *style,
948 GtkExpanderStyle expander_style)
950 #define DEFAULT_EXPANDER_SIZE 12
952 ThemeMatchData match_data;
956 g_return_if_fail (style != NULL);
957 g_return_if_fail (window != NULL);
960 gtk_widget_class_find_style_property (GTK_WIDGET_GET_CLASS (widget),
963 gtk_widget_style_get (widget,
964 "expander-size", &expander_size,
968 expander_size = DEFAULT_EXPANDER_SIZE;
970 radius = expander_size/2;
972 match_data.function = TOKEN_D_EXPANDER;
973 match_data.detail = (gchar *)detail;
974 match_data.flags = (THEME_MATCH_STATE |
975 THEME_MATCH_EXPANDER_STYLE);
976 match_data.state = state;
977 match_data.expander_style = expander_style;
979 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
980 x - radius, y - radius, expander_size, expander_size))
981 parent_class->draw_expander (style, window, state, area, widget, detail,
982 x, y, expander_style);
986 draw_resize_grip (GtkStyle *style,
998 ThemeMatchData match_data;
1000 g_return_if_fail (style != NULL);
1001 g_return_if_fail (window != NULL);
1003 match_data.function = TOKEN_D_RESIZE_GRIP;
1004 match_data.detail = (gchar *)detail;
1005 match_data.flags = (THEME_MATCH_STATE |
1006 THEME_MATCH_WINDOW_EDGE);
1007 match_data.state = state;
1008 match_data.window_edge = edge;
1010 if (!draw_simple_image (style, window, area, widget, &match_data, TRUE, TRUE,
1011 x, y, width, height))
1012 parent_class->draw_resize_grip (style, window, state, area, widget, detail,
1013 edge, x, y, width, height);
1016 GType pixbuf_type_style = 0;
1019 pixbuf_style_register_type (GTypeModule *module)
1021 const GTypeInfo object_info =
1023 sizeof (PixbufStyleClass),
1024 (GBaseInitFunc) NULL,
1025 (GBaseFinalizeFunc) NULL,
1026 (GClassInitFunc) pixbuf_style_class_init,
1027 NULL, /* class_finalize */
1028 NULL, /* class_data */
1029 sizeof (PixbufStyle),
1030 0, /* n_preallocs */
1031 (GInstanceInitFunc) pixbuf_style_init,
1034 pixbuf_type_style = g_type_module_register_type (module,
1041 pixbuf_style_init (PixbufStyle *style)
1046 pixbuf_style_class_init (PixbufStyleClass *klass)
1048 GtkStyleClass *style_class = GTK_STYLE_CLASS (klass);
1050 parent_class = g_type_class_peek_parent (klass);
1052 style_class->draw_hline = draw_hline;
1053 style_class->draw_vline = draw_vline;
1054 style_class->draw_shadow = draw_shadow;
1055 style_class->draw_arrow = draw_arrow;
1056 style_class->draw_diamond = draw_diamond;
1057 style_class->draw_box = draw_box;
1058 style_class->draw_flat_box = draw_flat_box;
1059 style_class->draw_check = draw_check;
1060 style_class->draw_option = draw_option;
1061 style_class->draw_tab = draw_tab;
1062 style_class->draw_shadow_gap = draw_shadow_gap;
1063 style_class->draw_box_gap = draw_box_gap;
1064 style_class->draw_extension = draw_extension;
1065 style_class->draw_focus = draw_focus;
1066 style_class->draw_slider = draw_slider;
1067 style_class->draw_handle = draw_handle;
1068 style_class->draw_expander = draw_expander;
1069 style_class->draw_resize_grip = draw_resize_grip;