CTree patch to add conditional drag reordering
- From: John Ellis <johne bellatlantic net>
- To: gtk-list redhat com
- Subject: CTree patch to add conditional drag reordering
- Date: Thu, 13 Aug 1998 06:01:45 -0400
Hello.
This is a patch to gtkctree.[ch] to add this function:
void       gtk_ctree_set_drag_compare_func  (GtkCTree     *ctree,
                                            GtkCTreeCompareDragFunc cmp_func);
It allows you to set a compare function to test if a node can be reordered
by dragging. The comparison is passed the node being dragged and the node's
possible new parent and sibling. The basic compare function looks like this:
gint default_drag_compare       (GtkCTree     *clist,
                                 GtkCTreeNode *source_node,
                                 GtkCTreeNode *new_parent,
                                 GtkCTreeNode *new_sibling)
{
       if [tests here]
         return TRUE;
       else
         return FALSE;
}
The only feature missing is changing the pointer as it passes over a new drop
target. If this patch is acceptable to be included in GTK, I can work on adding
the pointer change.
John
--
John Ellis <johne@bellatlantic.net>
http://www.geocities.com/SiliconValley/Haven/5235/
ctree_drag_comp.patch.gz
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]