| 2685 if (GTK_WIDGET_CLASS(parent_class)->unrealize) |
2685 if (GTK_WIDGET_CLASS(parent_class)->unrealize) |
| 2686 (*GTK_WIDGET_CLASS(parent_class)->unrealize) (widget); |
2686 (*GTK_WIDGET_CLASS(parent_class)->unrealize) (widget); |
| 2687 } |
2687 } |
| 2688 |
2688 |
| 2689 |
2689 |
| 2690 void gtk_html_add_pixmap(GtkHtml * html, GdkPixmap * pm, int fit) |
2690 void gtk_html_add_pixmap(GtkHtml * html, GdkPixmap * pm, int fit, int newline) |
| 2691 { |
2691 { |
| 2692 GtkHtmlBit *last_hb; |
2692 GtkHtmlBit *last_hb; |
| 2693 GtkHtmlBit *hb = g_new0(GtkHtmlBit, 1); |
2693 GtkHtmlBit *hb = g_new0(GtkHtmlBit, 1); |
| 2694 GdkWindowPrivate *private = (GdkWindowPrivate *) pm; |
2694 GdkWindowPrivate *private = (GdkWindowPrivate *) pm; |
| |
2695 int width, height; |
| 2695 |
2696 |
| 2696 last_hb = (GtkHtmlBit *) g_list_last(html->html_bits)->data; |
2697 last_hb = (GtkHtmlBit *) g_list_last(html->html_bits)->data; |
| 2697 |
2698 |
| 2698 /* make sure pixmaps drop down a line after a <BR> */ |
2699 /* make sure pixmaps drop down a line after a <BR> */ |
| 2699 if (last_hb->newline) |
2700 if (last_hb->newline) |
| 2700 html->current_y += private->height + 2; |
2701 html->current_y += private->height + 2; |
| |
2702 |
| |
2703 /* wrap pixmaps */ |
| |
2704 gdk_window_get_size(html->html_area, &width, &height); |
| |
2705 if ((html->current_x + private->width) >= width) { |
| |
2706 html->current_y += private->height + 2; |
| |
2707 html->current_x = 0; |
| |
2708 } |
| 2701 |
2709 |
| 2702 hb->fit = fit; |
2710 hb->fit = fit; |
| 2703 hb->x = html->current_x; |
2711 hb->x = html->current_x; |
| 2704 hb->y = html->current_y; |
2712 hb->y = html->current_y; |
| 2705 if (fit) |
2713 if (fit) |