Re: FW: [gtkmm] drag and drop with multiple targets
- From: Callum Prentice <lists callum com>
- To: gtkmm-list gnome org
- Subject: Re: FW: [gtkmm] drag and drop with multiple targets
- Date: Thu, 5 Feb 2004 15:54:01 -0800 (PST)
okay - understood up to this point thanks to your clear description.
> 3) the source widget's signal_drag_data_get() signal is now triggered,
> so the event handler put the actual data to be transferred into the
> GtkSelectionData structure
in the example i have, the data is set in the event handler method using
gtk_selection_data_set () but all widgets trigger the same method and (as far as i can tell)
there is nothing passed in that allows me to differentiate between widgets.
if i could for instance, get the address of the source widget and store that instead of a
piece of text, i could get it back in my signal_drag_data_received() handler method.
> 4) the destination widget's signal_drag_data_received() is called with
> the GtkSelectionData structure the source widget populated (it should
> process and free this data)
i am able to retrieve the source widget here by virtue of Gtk::Widget::drag_get_source_widget
() method but there is no drag_get_dest_widget () or similar - i really need to know which
widget was dropped onto so the rest of my logic can decide how to proceed.
i can see how to do it with a different handler method for each widget but since there will be
lots - perhaps hundreds - of them, that really isn't an option.
once i have the source and destination widgets, my code will rearrange the widgets visually
(it's for a "face" based address book that allows you to shuffle the entries manually).
callum.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]