Re:Ctree drag and drop

From: Date: Wed, 28 Nov 2001 08:11:10 +0000
Subject: Re:Ctree drag and drop
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-728@lists.php.net to get a copy of this message
I'm trying to get drag and drop working for a ctree = dragging from a clist to a ctree. now I can get all the events to occur, but I need to figure out what node of the ctree the drop happened with.. looking at the gtk source, the widget should export x and y, the clist (which is what ctree extends) should export row_height if I apply the patch below... it could be done something like $y (comes from drop event) $row =($y - $ctree->y )/ $ctree->row_height; $ctree->node_nth($row); Any better ideas? regards alan ps. -- just realized that widget->x & widget->y are not in gtk2, ctree is also depreciated :) Index: gtk.defs =================================================================== RCS file: /repository/php-gtk/ext/gtk+/gtk.defs,v retrieving revision 1.13 diff -u -r1.13 gtk.defs
--- gtk.defs    13 Nov 2001 09:17:33 -0000      1.13
+++ gtk.defs    28 Nov 2001 07:58:36 -0000
@@ -40,6 +40,10 @@ (in-module Gtk) (parent Object (Gtk)) (c-name GtkWidget) + (field (type-and-name gint x)) + (field (type-and-name gint y)) + (field (type-and-name gint width)) + (field (type-and-name gint height)) (field (type-and-name GtkStyle* style)) (field (type-and-name GdkWindow* window)) (field (type-and-name GtkAllocation allocation)) @@ -554,6 +558,7 @@ (field (type-and-name GList* selection)) (field (type-and-name GtkSelectionMode selection_mode)) (field (type-and-name GList* row_list)) + (field (type-and-name gint row_height)) ) (object CTree

« previous php.gtk.general (#728) next »