[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: GtkTreeView - how to detect if a row is displayed on the screen?
- From: Benoit DUMONT <vertigo17 free fr>
- To: "David M. Cook" <dave davidcook org>,gtk-app-devel-list gnome org
- Subject: Re: GtkTreeView - how to detect if a row is displayed on the screen?
- Date: Mon, 17 Nov 2003 08:36:00 +0100
Le Samedi 15 Novembre 2003 23:12, David M. Cook a écrit :
> On Tue, Nov 11, 2003 at 06:27:34PM +0100, Benoit DUMONT wrote:
> > I don't know how to detect if a row is visible on the screen or not.
> > When using the deprecated CTree or CList widget, I could use:
> > gtk_ctree_node_is_visible but it is now deprecated and I can't find any
> > replacement.
> You could use TreeView.get_cell_area(). According to the API docs:
> http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeView.html#gtk-tree-view-g
>et-cell-area
> If path is NULL, or points to a path not currently displayed, the y and
> height fields of the rectangle will be filled with 0.
> In other words, if the cell area doesn't overlap the visible area of the
> TreeView, these dimensions are just zero.
It works except that even if path is not currently displayed, y and height
fields are not filled with 0 but with the relative position on the screen.
ie:
if y+height<0 --> It is not on the screen (before the current position)
if y>page-size of the scrolled window --> It is not on the screen (after the
current position)
Thanks very much for the help.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]