[gedit-list] Plugins: How to get the boundaries of a view within a buffer?


I am trying to write a plugin with an idea I came up with. No need to
bore you with the details, but it's a thumbnailed view of the entire
file that gets displayed next to the TextView. I'll post it here if I
can get the thing working.

What I can't figure out is how to know which lines of the buffer are
being displayed in a view, or how to get a GtkTextIter pointing to the
boundaries of the view. Something like GtkTextBuffer.get_bounds() but
for a view instead of a buffer. Is there such a thing in
GtkSourceView? I haven't been able to find anything on the web. For

---------- view begins here
---------- view ends here

I need to get the line numbers for the beginning and end of the view,
and if possible keep this information updated when scrolling or
insertion/deletion occurs. I can bind to the corresponding signals for
this, I guess.

Links or hack suggestions to obtain these numbers are very much welcome.



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