+void wxPizza::put(GtkWidget* widget, int x, int y, int width, int height)
+{
+ gtk_fixed_put(GTK_FIXED(this), widget, 0, 0);
+
+ wxPizzaChild* child = new wxPizzaChild;
+ child->widget = widget;
+ child->x = x;
+ child->y = y;
+ child->width = width;
+ child->height = height;
+ m_children = g_list_append(m_children, child);
+}
+
+struct AdjustData {
+ GdkWindow* window;
+ int dx, dy;
+};
+
+// Adjust allocations for all widgets using the GdkWindow which was just scrolled
+extern "C" {
+static void scroll_adjust(GtkWidget* widget, void* data)
+{
+ const AdjustData* p = static_cast<AdjustData*>(data);
+ GtkAllocation a;
+ gtk_widget_get_allocation(widget, &a);
+ a.x += p->dx;
+ a.y += p->dy;
+ gtk_widget_set_allocation(widget, &a);
+
+ if (gtk_widget_get_window(widget) == p->window)
+ {
+ // GtkFrame requires a queue_resize, otherwise parts of
+ // the frame newly exposed by the scroll are not drawn.
+ // To be safe, do it for all widgets.
+ gtk_widget_queue_resize_no_redraw(widget);
+ if (GTK_IS_CONTAINER(widget))
+ gtk_container_forall(GTK_CONTAINER(widget), scroll_adjust, data);
+ }
+}
+}
+