Re: Gtk 2.2.2 : DND!! No API??? help ;-(



On Sunday August 17 2003 14:34 CEST, Michael Torrie wrote:
    
Basically,
http://developer.gnome.org/doc/API/2.0/gtk/gtk-Drag-and-Drop.html
    
        ... have this document for offline browsing on HD...
    
You have to catch the drag-drop event on the target widget.
Then from there you call the data receive gtk call and that
then requests the data after which you'll the data received
callback will be called.
    
Yes! That's a great explanation! Have made some progress with
my source code. But i can't get the "drag-drop" signal. Is this
realy necessary?
    
I made one mistake:
    
        gtk_drag_dest_set(treeView->treeView,
                        GTK_DEST_DEFAULT_DROP,
                        &treeView->targetEntry, 1,
                        GDK_ACTION_COPY);
    
That i changed to:
    
        gtk_tree_view_enable_model_drag_dest(
                        GTK_TREE_VIEW(treeView->treeView),
                        &treeView->targetEntry, 1,
                        GDK_ACTION_COPY);
    
And i found a helpful macro for the GtkTargetEntry:
    
treeView->targetEntry.target="GTK_TREE_MODEL_ROW";
    
by watching the Gtk+ source code. But why this macro? Are there
any more macros for this? Need to know about, cause i have to
send a special data structure to target widget.
    
Now i can drag an entire gtk tree view row. I can get the
signal "drag-data-received" and "drag-end". But if i like to
drop to the destination widget the dragged object scrolls back
to source widget. I think i need to tell the source widget that
dropping was done sucessful. How can i realize this with Gtk+?
Do i need this "drag-drop" signal?
    
mathew
    
-- 
             ______________________________________________
                    get free software:  www.matman24.org
             ______________________________________________



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