]> git.saurik.com Git - wxWidgets.git/blob - src/gtk/win_gtk.c
Don't scroll the grid when starting a cell editor if it will already
[wxWidgets.git] / src / gtk / win_gtk.c
1 /* ///////////////////////////////////////////////////////////////////////////
2 // Name: src/gtk/win_gtk.c
3 // Purpose: Native GTK+ widget for wxWidgets, based on GtkLayout and
4 // GtkFixed. It makes use of the gravity window property and
5 // therefore does not work with GTK 1.0.
6 // Author: Robert Roebling
7 // Id: $Id$
8 // Copyright: (c) 1998 Robert Roebling
9 // Licence: wxWidgets licence
10 /////////////////////////////////////////////////////////////////////////// */
11
12 #ifdef VMS
13 #define XCheckIfEvent XCHECKIFEVENT
14 #endif
15
16 #include "wx/platform.h"
17 #include "wx/gtk/win_gtk.h"
18 #include "gtk/gtksignal.h"
19 #include "gtk/gtkprivate.h"
20 #include "gdk/gdkx.h"
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif /* __cplusplus */
25
26 typedef struct _GtkPizzaAdjData GtkPizzaAdjData;
27
28 struct _GtkPizzaAdjData
29 {
30 gint dx;
31 gint dy;
32 };
33
34 static void gtk_pizza_class_init (GtkPizzaClass *klass);
35 static void gtk_pizza_init (GtkPizza *pizza);
36
37 static void gtk_pizza_realize (GtkWidget *widget);
38 static void gtk_pizza_unrealize (GtkWidget *widget);
39
40 static void gtk_pizza_map (GtkWidget *widget);
41
42 static void gtk_pizza_size_request (GtkWidget *widget,
43 GtkRequisition *requisition);
44 static void gtk_pizza_size_allocate (GtkWidget *widget,
45 GtkAllocation *allocation);
46 static gint gtk_pizza_expose (GtkWidget *widget,
47 GdkEventExpose *event);
48 static void gtk_pizza_style_set (GtkWidget *widget,
49 GtkStyle *previous_style);
50 static void gtk_pizza_add (GtkContainer *container,
51 GtkWidget *widget);
52 static void gtk_pizza_remove (GtkContainer *container,
53 GtkWidget *widget);
54 static void gtk_pizza_forall (GtkContainer *container,
55 gboolean include_internals,
56 GtkCallback callback,
57 gpointer callback_data);
58
59 static void gtk_pizza_allocate_child (GtkPizza *pizza,
60 GtkPizzaChild *child);
61 static void gtk_pizza_adjust_allocations_recurse (GtkWidget *widget,
62 gpointer cb_data);
63
64 static GtkType gtk_pizza_child_type (GtkContainer *container);
65
66 static void gtk_pizza_scroll_set_adjustments (GtkPizza *pizza,
67 GtkAdjustment *hadj,
68 GtkAdjustment *vadj);
69
70 /* static */
71 GtkContainerClass *pizza_parent_class = NULL;
72
73 GtkType
74 gtk_pizza_get_type ()
75 {
76 static GtkType pizza_type = 0;
77
78 if (!pizza_type)
79 {
80 static const GTypeInfo pizza_info =
81 {
82 sizeof (GtkPizzaClass),
83 NULL, /* base_init */
84 NULL, /* base_finalize */
85 (GClassInitFunc) gtk_pizza_class_init,
86 NULL, /* class_finalize */
87 NULL, /* class_data */
88 sizeof (GtkPizza),
89 16, /* n_preallocs */
90 (GInstanceInitFunc) gtk_pizza_init,
91 };
92 pizza_type = g_type_register_static (GTK_TYPE_CONTAINER, "GtkPizza", &pizza_info, (GTypeFlags)0);
93 }
94
95 return pizza_type;
96 }
97
98 /* Marshaller needed for set_scroll_adjustments signal,
99 generated with GLib-2.4.6 glib-genmarshal */
100 #define g_marshal_value_peek_object(v) g_value_get_object (v)
101 static void
102 g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure *closure,
103 GValue *return_value,
104 guint n_param_values,
105 const GValue *param_values,
106 gpointer invocation_hint,
107 gpointer marshal_data)
108 {
109 typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT) (gpointer data1,
110 gpointer arg_1,
111 gpointer arg_2,
112 gpointer data2);
113 register GMarshalFunc_VOID__OBJECT_OBJECT callback;
114 register GCClosure *cc = (GCClosure*) closure;
115 register gpointer data1, data2;
116
117 g_return_if_fail (n_param_values == 3);
118
119 if (G_CCLOSURE_SWAP_DATA (closure))
120 {
121 data1 = closure->data;
122 data2 = g_value_peek_pointer (param_values + 0);
123 }
124 else
125 {
126 data1 = g_value_peek_pointer (param_values + 0);
127 data2 = closure->data;
128 }
129 callback = (GMarshalFunc_VOID__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback);
130
131 callback (data1,
132 g_marshal_value_peek_object (param_values + 1),
133 g_marshal_value_peek_object (param_values + 2),
134 data2);
135 }
136
137 static void
138 gtk_pizza_class_init (GtkPizzaClass *klass)
139 {
140 GtkObjectClass *object_class;
141 GtkWidgetClass *widget_class;
142 GtkContainerClass *container_class;
143
144 object_class = (GtkObjectClass*) klass;
145 widget_class = (GtkWidgetClass*) klass;
146 container_class = (GtkContainerClass*) klass;
147 pizza_parent_class = gtk_type_class (GTK_TYPE_CONTAINER);
148
149 widget_class->map = gtk_pizza_map;
150 widget_class->realize = gtk_pizza_realize;
151 widget_class->unrealize = gtk_pizza_unrealize;
152 widget_class->size_request = gtk_pizza_size_request;
153 widget_class->size_allocate = gtk_pizza_size_allocate;
154 widget_class->expose_event = gtk_pizza_expose;
155 widget_class->style_set = gtk_pizza_style_set;
156
157 container_class->add = gtk_pizza_add;
158 container_class->remove = gtk_pizza_remove;
159 container_class->forall = gtk_pizza_forall;
160
161 container_class->child_type = gtk_pizza_child_type;
162
163 klass->set_scroll_adjustments = gtk_pizza_scroll_set_adjustments;
164
165 widget_class->set_scroll_adjustments_signal =
166 g_signal_new(
167 "set_scroll_adjustments",
168 G_TYPE_FROM_CLASS(object_class),
169 G_SIGNAL_RUN_LAST,
170 G_STRUCT_OFFSET(GtkPizzaClass, set_scroll_adjustments),
171 NULL,
172 NULL,
173 g_cclosure_user_marshal_VOID__OBJECT_OBJECT,
174 G_TYPE_NONE,
175 2,
176 GTK_TYPE_ADJUSTMENT,
177 GTK_TYPE_ADJUSTMENT);
178 }
179
180 static GtkType
181 gtk_pizza_child_type (GtkContainer *container)
182 {
183 return GTK_TYPE_WIDGET;
184 }
185
186 static void
187 gtk_pizza_init (GtkPizza *pizza)
188 {
189 GTK_WIDGET_UNSET_FLAGS (pizza, GTK_NO_WINDOW);
190
191 pizza->shadow_type = GTK_MYSHADOW_NONE;
192
193 pizza->children = NULL;
194
195 pizza->width = 20;
196 pizza->height = 20;
197
198 pizza->bin_window = NULL;
199
200 pizza->xoffset = 0;
201 pizza->yoffset = 0;
202
203 pizza->scroll_x = 0;
204 pizza->scroll_y = 0;
205
206 pizza->external_expose = FALSE;
207 }
208
209 GtkWidget*
210 gtk_pizza_new ()
211 {
212 GtkPizza *pizza;
213
214 pizza = gtk_type_new (gtk_pizza_get_type ());
215
216 return GTK_WIDGET (pizza);
217 }
218
219 static void
220 gtk_pizza_scroll_set_adjustments (GtkPizza *pizza,
221 GtkAdjustment *hadj,
222 GtkAdjustment *vadj)
223 {
224 /* We handle scrolling in the wxScrolledWindow, not here. */
225 }
226
227 void
228 gtk_pizza_set_shadow_type (GtkPizza *pizza,
229 GtkMyShadowType type)
230 {
231 g_return_if_fail (pizza != NULL);
232 g_return_if_fail (GTK_IS_PIZZA (pizza));
233
234 if ((GtkMyShadowType) pizza->shadow_type != type)
235 {
236 pizza->shadow_type = type;
237
238 if (GTK_WIDGET_VISIBLE (pizza))
239 {
240 gtk_widget_size_allocate (GTK_WIDGET (pizza), &(GTK_WIDGET (pizza)->allocation));
241 gtk_widget_queue_draw (GTK_WIDGET (pizza));
242 }
243 }
244 }
245
246 void
247 gtk_pizza_set_external (GtkPizza *pizza,
248 gboolean expose)
249 {
250 g_return_if_fail (pizza != NULL);
251 g_return_if_fail (GTK_IS_PIZZA (pizza));
252
253 pizza->external_expose = expose;
254 }
255
256 void
257 gtk_pizza_put (GtkPizza *pizza,
258 GtkWidget *widget,
259 gint x,
260 gint y,
261 gint width,
262 gint height)
263 {
264 GtkPizzaChild *child_info;
265
266 g_return_if_fail (pizza != NULL);
267 g_return_if_fail (GTK_IS_PIZZA (pizza));
268 g_return_if_fail (widget != NULL);
269
270 child_info = g_new (GtkPizzaChild, 1);
271
272 child_info->widget = widget;
273 child_info->x = x;
274 child_info->y = y;
275 child_info->width = width;
276 child_info->height = height;
277
278 pizza->children = g_list_append (pizza->children, child_info);
279
280 if (GTK_WIDGET_REALIZED (pizza))
281 gtk_widget_set_parent_window (widget, pizza->bin_window);
282
283 gtk_widget_set_parent (widget, GTK_WIDGET (pizza));
284
285 gtk_widget_set_size_request (widget, width, height);
286 }
287
288 void
289 gtk_pizza_set_size (GtkPizza *pizza,
290 GtkWidget *widget,
291 gint x,
292 gint y,
293 gint width,
294 gint height)
295 {
296 GtkPizzaChild *child;
297 GList *children;
298
299 g_return_if_fail (pizza != NULL);
300 g_return_if_fail (GTK_IS_PIZZA (pizza));
301 g_return_if_fail (widget != NULL);
302
303 #ifndef WX_WARN_ILLEGAL_SETSIZE
304 /* this really shouldn't happen -- but it does, a lot, right now and we
305 can't pass negative values to gtk_widget_set_size_request() without getting
306 a warning printed out, so filter them out here */
307 if ( width < 0 )
308 width = 0;
309 if ( height < 0 )
310 height = 0;
311 #endif
312
313 children = pizza->children;
314 while (children)
315 {
316 child = children->data;
317 children = children->next;
318
319 if (child->widget == widget)
320 {
321 if ((child->x == x) &&
322 (child->y == y) &&
323 (child->width == width) &&
324 (child->height == height)) return;
325
326 child->x = x;
327 child->y = y;
328 child->width = width;
329 child->height = height;
330
331 gtk_widget_set_size_request (widget, width, height);
332
333 if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (pizza))
334 gtk_widget_queue_resize (widget);
335
336 return;
337 }
338 }
339 }
340
341 static void
342 gtk_pizza_map (GtkWidget *widget)
343 {
344 GtkPizza *pizza;
345 GtkPizzaChild *child;
346 GList *children;
347
348 g_return_if_fail (widget != NULL);
349 g_return_if_fail (GTK_IS_PIZZA (widget));
350
351 GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED);
352 pizza = GTK_PIZZA (widget);
353
354 children = pizza->children;
355 while (children)
356 {
357 child = children->data;
358 children = children->next;
359
360 if ( GTK_WIDGET_VISIBLE (child->widget) &&
361 !GTK_WIDGET_MAPPED (child->widget) &&
362 TRUE)
363 {
364 gtk_widget_map (child->widget);
365 }
366 }
367
368 gdk_window_show (widget->window);
369 gdk_window_show (pizza->bin_window);
370 }
371
372 static void
373 gtk_pizza_realize (GtkWidget *widget)
374 {
375 GtkPizza *pizza;
376 GdkWindowAttr attributes;
377 gint attributes_mask;
378 GtkPizzaChild *child;
379 GList *children;
380
381 g_return_if_fail (widget != NULL);
382 g_return_if_fail (GTK_IS_PIZZA (widget));
383
384 pizza = GTK_PIZZA (widget);
385 GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED);
386
387 attributes.window_type = GDK_WINDOW_CHILD;
388
389 attributes.x = widget->allocation.x;
390 attributes.y = widget->allocation.y;
391 attributes.width = widget->allocation.width;
392 attributes.height = widget->allocation.height;
393
394 #ifndef __WXUNIVERSAL__
395 if (pizza->shadow_type == GTK_MYSHADOW_NONE)
396 {
397 /* no border, no changes to sizes */
398 }
399 else if (pizza->shadow_type == GTK_MYSHADOW_THIN)
400 {
401 /* GTK_MYSHADOW_THIN == wxSIMPLE_BORDER */
402 attributes.x += 1;
403 attributes.y += 1;
404 attributes.width -= 2;
405 attributes.height -= 2;
406 }
407 else
408 {
409 /* GTK_MYSHADOW_IN == wxSUNKEN_BORDER */
410 /* GTK_MYSHADOW_OUT == wxRAISED_BORDER */
411 attributes.x += 2;
412 attributes.y += 2;
413 attributes.width -= 4;
414 attributes.height -= 4;
415 }
416 #endif /* __WXUNIVERSAL__ */
417
418 /* minimal size */
419 if (attributes.width < 2) attributes.width = 2;
420 if (attributes.height < 2) attributes.height = 2;
421
422 attributes.wclass = GDK_INPUT_OUTPUT;
423 attributes.visual = gtk_widget_get_visual (widget);
424 attributes.colormap = gtk_widget_get_colormap (widget);
425 attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK;
426 attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
427
428 widget->window = gdk_window_new(gtk_widget_get_parent_window (widget),
429 &attributes, attributes_mask);
430 gdk_window_set_user_data (widget->window, widget);
431
432 attributes.x = 0;
433 attributes.y = 0;
434
435 attributes.event_mask = gtk_widget_get_events (widget);
436 attributes.event_mask |= GDK_EXPOSURE_MASK |
437 GDK_SCROLL_MASK |
438 GDK_POINTER_MOTION_MASK |
439 GDK_POINTER_MOTION_HINT_MASK |
440 GDK_BUTTON_MOTION_MASK |
441 GDK_BUTTON1_MOTION_MASK |
442 GDK_BUTTON2_MOTION_MASK |
443 GDK_BUTTON3_MOTION_MASK |
444 GDK_BUTTON_PRESS_MASK |
445 GDK_BUTTON_RELEASE_MASK |
446 GDK_KEY_PRESS_MASK |
447 GDK_KEY_RELEASE_MASK |
448 GDK_ENTER_NOTIFY_MASK |
449 GDK_LEAVE_NOTIFY_MASK |
450 GDK_FOCUS_CHANGE_MASK;
451
452 pizza->bin_window = gdk_window_new(widget->window,
453 &attributes, attributes_mask);
454 gdk_window_set_user_data (pizza->bin_window, widget);
455
456 widget->style = gtk_style_attach (widget->style, widget->window);
457 gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
458 gtk_style_set_background (widget->style, pizza->bin_window, GTK_STATE_NORMAL );
459
460 /*
461 gdk_window_set_back_pixmap( widget->window, NULL, FALSE );
462 gdk_window_set_back_pixmap( pizza->bin_window, NULL, FALSE );
463 */
464
465 /* cannot be done before realisation */
466 children = pizza->children;
467 while (children)
468 {
469 child = children->data;
470 children = children->next;
471
472 gtk_widget_set_parent_window (child->widget, pizza->bin_window);
473 }
474 }
475
476 static void
477 gtk_pizza_unrealize (GtkWidget *widget)
478 {
479 GtkPizza *pizza;
480
481 g_return_if_fail (widget != NULL);
482 g_return_if_fail (GTK_IS_PIZZA (widget));
483
484 pizza = GTK_PIZZA (widget);
485
486 gdk_window_set_user_data (pizza->bin_window, NULL);
487 gdk_window_destroy (pizza->bin_window);
488 pizza->bin_window = NULL;
489
490 if (GTK_WIDGET_CLASS (pizza_parent_class)->unrealize)
491 (* GTK_WIDGET_CLASS (pizza_parent_class)->unrealize) (widget);
492 }
493
494 static void
495 gtk_pizza_size_request (GtkWidget *widget,
496 GtkRequisition *requisition)
497 {
498 GtkPizza *pizza;
499 GtkPizzaChild *child;
500 GList *children;
501 GtkRequisition child_requisition;
502
503 g_return_if_fail (widget != NULL);
504 g_return_if_fail (GTK_IS_PIZZA (widget));
505 g_return_if_fail (requisition != NULL);
506
507 pizza = GTK_PIZZA (widget);
508
509 children = pizza->children;
510 while (children)
511 {
512 child = children->data;
513 children = children->next;
514
515 if (GTK_WIDGET_VISIBLE (child->widget))
516 {
517 gtk_widget_size_request (child->widget, &child_requisition);
518 }
519 }
520
521 /* request very little, I'm not sure if requesting nothing
522 will always have positive effects on stability... */
523 requisition->width = 2;
524 requisition->height = 2;
525 }
526
527 static void
528 gtk_pizza_size_allocate (GtkWidget *widget,
529 GtkAllocation *allocation)
530 {
531 GtkPizza *pizza;
532 gint border;
533 gint x,y,w,h;
534 GtkPizzaChild *child;
535 GList *children;
536
537 g_return_if_fail (widget != NULL);
538 g_return_if_fail (GTK_IS_PIZZA(widget));
539 g_return_if_fail (allocation != NULL);
540
541 pizza = GTK_PIZZA (widget);
542
543 widget->allocation = *allocation;
544
545 if (pizza->shadow_type == GTK_MYSHADOW_NONE)
546 border = 0;
547 else
548 if (pizza->shadow_type == GTK_MYSHADOW_THIN)
549 border = 1;
550 else
551 border = 2;
552
553 x = allocation->x + border;
554 y = allocation->y + border;
555 w = allocation->width - border*2;
556 h = allocation->height - border*2;
557
558 if (GTK_WIDGET_REALIZED (widget))
559 {
560 gdk_window_move_resize( widget->window, x, y, w, h );
561 gdk_window_move_resize( pizza->bin_window, 0, 0, w, h );
562 }
563
564 children = pizza->children;
565 while (children)
566 {
567 child = children->data;
568 children = children->next;
569
570 gtk_pizza_allocate_child (pizza, child);
571 }
572 }
573
574 static gint
575 gtk_pizza_expose (GtkWidget *widget,
576 GdkEventExpose *event)
577 {
578 GtkPizza *pizza;
579
580 g_return_val_if_fail (widget != NULL, FALSE);
581 g_return_val_if_fail (GTK_IS_PIZZA (widget), FALSE);
582 g_return_val_if_fail (event != NULL, FALSE);
583
584 pizza = GTK_PIZZA (widget);
585
586 if (event->window != pizza->bin_window)
587 return FALSE;
588
589 /* We handle all expose events in window.cpp now. */
590 if (pizza->external_expose)
591 return FALSE;
592
593 (* GTK_WIDGET_CLASS (pizza_parent_class)->expose_event) (widget, event);
594
595 return FALSE;
596 }
597
598 static void
599 gtk_pizza_style_set(GtkWidget *widget, GtkStyle *previous_style)
600 {
601 if (GTK_WIDGET_REALIZED(widget))
602 {
603 gtk_style_set_background(widget->style, widget->window, GTK_STATE_NORMAL);
604 gtk_style_set_background(widget->style, GTK_PIZZA(widget)->bin_window, GTK_STATE_NORMAL );
605 }
606
607 (* GTK_WIDGET_CLASS (pizza_parent_class)->style_set) (widget, previous_style);
608 }
609
610 static void
611 gtk_pizza_add (GtkContainer *container,
612 GtkWidget *widget)
613 {
614 g_return_if_fail (container != NULL);
615 g_return_if_fail (GTK_IS_PIZZA (container));
616 g_return_if_fail (widget != NULL);
617
618 gtk_pizza_put (GTK_PIZZA (container), widget, 0, 0, 20, 20 );
619 }
620
621 static void
622 gtk_pizza_remove (GtkContainer *container,
623 GtkWidget *widget)
624 {
625 GtkPizza *pizza;
626 GtkPizzaChild *child;
627 GList *children;
628
629 g_return_if_fail (container != NULL);
630 g_return_if_fail (GTK_IS_PIZZA (container));
631 g_return_if_fail (widget != NULL);
632
633 pizza = GTK_PIZZA (container);
634
635 children = pizza->children;
636 while (children)
637 {
638 child = children->data;
639
640 if (child->widget == widget)
641 {
642 gtk_widget_unparent (widget);
643
644 /* security checks */
645 g_return_if_fail (GTK_IS_WIDGET (widget));
646
647 pizza->children = g_list_remove_link (pizza->children, children);
648 g_list_free (children);
649 g_free (child);
650
651 /* security checks */
652 g_return_if_fail (GTK_IS_WIDGET (widget));
653
654 break;
655 }
656
657 children = children->next;
658 }
659 }
660
661 static void
662 gtk_pizza_forall (GtkContainer *container,
663 gboolean include_internals,
664 GtkCallback callback,
665 gpointer callback_data)
666 {
667 GtkPizza *pizza;
668 GtkPizzaChild *child;
669 GList *children;
670
671 g_return_if_fail (container != NULL);
672 g_return_if_fail (GTK_IS_PIZZA (container));
673 g_return_if_fail (callback != (GtkCallback)NULL);
674
675 pizza = GTK_PIZZA (container);
676
677 children = pizza->children;
678 while (children)
679 {
680 child = children->data;
681 children = children->next;
682
683 (* callback) (child->widget, callback_data);
684 }
685 }
686
687 static void
688 gtk_pizza_allocate_child (GtkPizza *pizza,
689 GtkPizzaChild *child)
690 {
691 GtkAllocation allocation;
692 GtkRequisition requisition;
693
694 allocation.x = child->x - pizza->xoffset;
695 allocation.y = child->y - pizza->yoffset;
696 gtk_widget_get_child_requisition (child->widget, &requisition);
697 allocation.width = requisition.width;
698 allocation.height = requisition.height;
699
700 gtk_widget_size_allocate (child->widget, &allocation);
701 }
702
703 static void
704 gtk_pizza_adjust_allocations_recurse (GtkWidget *widget,
705 gpointer cb_data)
706 {
707 GtkPizzaAdjData *data = cb_data;
708
709 widget->allocation.x += data->dx;
710 widget->allocation.y += data->dy;
711
712 if (GTK_WIDGET_NO_WINDOW (widget) && GTK_IS_CONTAINER (widget))
713 {
714 gtk_container_forall (GTK_CONTAINER (widget),
715 gtk_pizza_adjust_allocations_recurse,
716 cb_data);
717 }
718 }
719
720 static void
721 gtk_pizza_adjust_allocations (GtkPizza *pizza,
722 gint dx,
723 gint dy)
724 {
725 GList *tmp_list;
726 GtkPizzaAdjData data;
727
728 data.dx = dx;
729 data.dy = dy;
730
731 tmp_list = pizza->children;
732 while (tmp_list)
733 {
734 GtkPizzaChild *child = tmp_list->data;
735 tmp_list = tmp_list->next;
736
737 child->widget->allocation.x += dx;
738 child->widget->allocation.y += dy;
739
740 if (GTK_WIDGET_NO_WINDOW (child->widget) &&
741 GTK_IS_CONTAINER (child->widget))
742 {
743 gtk_container_forall (GTK_CONTAINER (child->widget),
744 gtk_pizza_adjust_allocations_recurse,
745 &data);
746 }
747 }
748 }
749
750 void
751 gtk_pizza_scroll (GtkPizza *pizza, gint dx, gint dy)
752 {
753 pizza->xoffset += dx;
754 pizza->yoffset += dy;
755
756 gtk_pizza_adjust_allocations (pizza, -dx, -dy);
757
758 if (pizza->bin_window)
759 gdk_window_scroll( pizza->bin_window, -dx, -dy );
760 }
761
762 #ifdef __cplusplus
763 }
764 #endif /* __cplusplus */