Xwt.GtkBackend.TreeViewBackend.OnSetDragStatus C# (CSharp) Method

OnSetDragStatus() protected method

protected OnSetDragStatus ( Gdk context, int x, int y, uint time, Gdk action ) : void
context Gdk
x int
y int
time uint
action Gdk
return void
        protected override void OnSetDragStatus(Gdk.DragContext context, int x, int y, uint time, Gdk.DragAction action)
        {
            base.OnSetDragStatus (context, x, y, time, action);

            // We are overriding the TreeView methods for handling drag & drop, so we need
            // to manually highlight the selected row

            Gtk.TreeViewDropPosition tpos;
            Gtk.TreePath path;
            if (!Widget.GetDestRowAtPos (x, y, out path, out tpos))
                path = null;

            if (expandTimer == 0 || !object.Equals (autoExpandPath, path)) {
                if (expandTimer != 0)
                    GLib.Source.Remove (expandTimer);
                if (path != null) {
                    expandTimer = GLib.Timeout.Add (600, delegate {
                        Widget.ExpandRow (path, false);
                        return false;
                    });
                }
                autoExpandPath = path;
            }

            if (path != null && action != 0)
                Widget.SetDragDestRow (path, tpos);
            else
                Widget.SetDragDestRow (null, 0);
        }