- child = children->data;
- children = children->next;
-
- if (GTK_WIDGET_VISIBLE (child->widget))
- {
- child_allocation.x = child->x + border_width;
- child_allocation.y = child->y + border_width;
- child_allocation.width = child->widget->requisition.width;
- child_allocation.height = child->widget->requisition.height;
- gtk_widget_size_allocate (child->widget, &child_allocation);
- }
+ /* GTK_MYSHADOW_IN == wxSUNKEN_BORDER */
+ /* GTK_MYSHADOW_OUT == wxRAISED_BORDER */
+ attributes.x += 2;
+ attributes.y += 2;
+ attributes.width -= 4;
+ attributes.height -= 4;
+ }
+#endif /* __WXUNIVERSAL__ */
+
+ /* minimal size */
+ if (attributes.width < 2) attributes.width = 2;
+ if (attributes.height < 2) attributes.height = 2;
+
+ attributes.wclass = GDK_INPUT_OUTPUT;
+ attributes.visual = gtk_widget_get_visual (widget);
+ attributes.colormap = gtk_widget_get_colormap (widget);
+ attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK;
+ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+
+ widget->window = gdk_window_new(gtk_widget_get_parent_window (widget),
+ &attributes, attributes_mask);
+ gdk_window_set_user_data (widget->window, widget);
+
+ attributes.x = 0;
+ attributes.y = 0;
+
+ attributes.event_mask = gtk_widget_get_events (widget);
+ attributes.event_mask |= GDK_EXPOSURE_MASK |
+ GDK_SCROLL_MASK |
+ GDK_POINTER_MOTION_MASK |
+ GDK_POINTER_MOTION_HINT_MASK |
+ GDK_BUTTON_MOTION_MASK |
+ GDK_BUTTON1_MOTION_MASK |
+ GDK_BUTTON2_MOTION_MASK |
+ GDK_BUTTON3_MOTION_MASK |
+ GDK_BUTTON_PRESS_MASK |
+ GDK_BUTTON_RELEASE_MASK |
+ GDK_KEY_PRESS_MASK |
+ GDK_KEY_RELEASE_MASK |
+ GDK_ENTER_NOTIFY_MASK |
+ GDK_LEAVE_NOTIFY_MASK |
+ GDK_FOCUS_CHANGE_MASK;
+
+ pizza->bin_window = gdk_window_new(widget->window,
+ &attributes, attributes_mask);
+ gdk_window_set_user_data (pizza->bin_window, widget);
+
+ widget->style = gtk_style_attach (widget->style, widget->window);
+ gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
+ gtk_style_set_background (widget->style, pizza->bin_window, GTK_STATE_NORMAL );
+
+/*
+ gdk_window_set_back_pixmap( widget->window, NULL, FALSE );
+ gdk_window_set_back_pixmap( pizza->bin_window, NULL, FALSE );
+*/
+
+ /* cannot be done before realisation */
+ children = pizza->children;
+ while (children)
+ {
+ child = children->data;
+ children = children->next;
+
+ gtk_widget_set_parent_window (child->widget, pizza->bin_window);