Re: gtk_text_view_get_visible_rect



If you have not scrolled the TextView the rectabgle should be (0, 0, width, 
height).

Does calling get_text_view_get_iter_at_location() on the start and end of the 
rctangle not work?

Padraig



On Mon, 2002-06-10 at 11:19, Olivier Sessink wrote:
On Mon, 10 Jun 2002 08:23:59 +0200 "Janus N. T" <j nus person dk> wrote:


It seems the only way to get the visible area of the textview is the
gtk_text_view_get_visible_rect function. I don't quite understand the
GdkRectangle it returns and since it is not documented would someone be
so kind to tell what the values returned means.

My goal is to get GtkTextIter's of the viewable area ... just as
gtk_text_buffer_get_bounds gives me GtkTextIter's of the whole buffer.

I'm not sure, but my wild guess is that it returns coordinates, and there
are also functions to get the buffer coordinates:

gtk_text_view_window_to_buffer_coords(GTK_TEXT_VIEW(view),
wintype,bevent->x, bevent->y,&xpos, &ypos);

Acc. to GTK2 docs it is always returning buffer coordinates -- but they
seem rather strange. So what I am looking for here, is an explanation of
the values returned. They do not seem logical at all to me.

Regards,
Janus

-- 
Janus Nørgaard Tøndering      
email: j nus person dk or u011014 daimi au dk

"Would you buy a car with the hood welded shut?"
-Phil Hughes, Linux Journal Magazine


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]