new function for GtkClist.



I sent this to gtk-devel-list but it never showed up or
bounced. Is that list still active?


I wanted to add the function below to Gtk_CList in gtk--. It
was suggested that this may be useful to have in gtk+.

The problem is solves is : "How do I get the coordinates
of the row in a clist where data was dropped?"

Maybe calibrate is the wrong word to describe what the function
does. Any new suggestion for a name would be great.

The y coordinate from the drop signal is given to the function
and the correct coordinate to use for getting the selection
info is returned.

Any comments?

thanks,
Todd.

gint 
gtk_clist_drop_calibrate ( GtkCList * clist_in, gint y_in )
{
  
  /* dnd coordinate conversion code */
  gint ty;

  gdk_window_get_position ( clist_in -> clist_window, 0, &ty );
  return y_in - ty - GTK_CONTAINER ( clist_in ) -> border_width;
}


-- 
   | Todd Dukes                      E-MAIL:  tdukes@ibmoto.com |
   | Motorola Somerset                  Phone:   (512) 424-8008 |
   | 6200 Bridgepoint Parkway Building #4 MS OE70               |
   | Austin, Texas 78730                                        |



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