detecting enter/leave events for a pixbuf in a GtkTreeView?



I have a GtkTreeView which contains thumbnails (gtk_list_store_new(5,
GDK_TYPE_PIXBUF, ..., with GtkCellRendererPixbuf).  What I really want to
have happen is to get a little 400x400 or so popup when the user hovers
over one of these thumbnails.  I don't think there is any hover signal for
cells at least, so I assume I need to get my hands on the GdkWindow that
GtkCellRendererPixbuf draws into, assuming it exists.  How do I do that?

The only other way I can see to do this is convoluted:

1. Track motion events in the Treeview

2. In the motion event handler, use gtk_tree_view_get_path_at_pos,
   gtk_tree_view_get_column, gtk_tree_view_get_cell_area, together with
   knowledge about where the thumbnail is packed in the cell, to find out
   if we are over the thumbnail.  If over thumbnail, start a timer and
   generate another motion event say 250 ms later.  If still over
   thumbnail at that point, popup new GdkWindow with higher res image.

Thanks for any advice on an easier way than this :)
Britton





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