summaryrefslogtreecommitdiff
path: root/gtk/gtktextdisplay.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2000-11-20 23:51:51 +0000
committerHavoc Pennington <hp@src.gnome.org>2000-11-20 23:51:51 +0000
commit6f7dd53b801d21692744ac3c445307391225686d (patch)
tree2457a929ff4aa529ed84d55b5e61e316f042202c /gtk/gtktextdisplay.c
parent2999f465b4db274a9d2301c7d3653d134bd79adb (diff)
downloadgtk+-6f7dd53b801d21692744ac3c445307391225686d.tar.gz
Semi-finish widget embedding. Need guffaw scrolling to be implemented in
2000-11-20 Havoc Pennington <hp@redhat.com> * gtk/gtktextview.c, gtk/gtktextlayout.c, gtk/gtktextchild.c, gtk/testtext.c: Semi-finish widget embedding. Need guffaw scrolling to be implemented in GDK to finish. Also, right now we just size_allocate all children on every layout change, which is pretty lame. Test commented out of testtext.c, until it works better.
Diffstat (limited to 'gtk/gtktextdisplay.c')
-rw-r--r--gtk/gtktextdisplay.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/gtk/gtktextdisplay.c b/gtk/gtktextdisplay.c
index be82c677e1..46aa9d7936 100644
--- a/gtk/gtktextdisplay.c
+++ b/gtk/gtktextdisplay.c
@@ -365,21 +365,30 @@ render_layout_line (GdkDrawable *drawable,
gint width, height;
GdkRectangle draw_rect;
GtkWidget *widget;
-
- /* FIXME this doesn't work at all, and remember to use
- * risen_y
- */
widget = GTK_WIDGET (shaped);
width = widget->allocation.width;
height = widget->allocation.height;
+ printf ("widget allocation at %d,%d %d x %d\n",
+ widget->allocation.x,
+ widget->allocation.y,
+ widget->allocation.width,
+ widget->allocation.height);
+
if (GTK_WIDGET_DRAWABLE (widget) &&
- gtk_widget_intersect (widget,
- &render_state->clip_rect,
- &draw_rect))
+ gdk_rectangle_intersect (&widget->allocation,
+ &render_state->clip_rect,
+ &draw_rect))
+
{
+ printf ("drawing widget area %d,%d %d x %d\n",
+ draw_rect.x,
+ draw_rect.y,
+ draw_rect.width,
+ draw_rect.height);
+
gtk_widget_draw (widget, &draw_rect);
}