[ruby-gnome2-doc-cvs] [Ruby-GNOME2 Project Website] update - tut-gtk2-dnd-intro

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2012年 12月 6日 (木) 09:39:24 JST


-------------------------
REMOTE_ADDR = 70.49.50.122
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-dnd-intro
-------------------------
@@ -48,7 +48,7 @@
 
     We hope to look at all of these three situations.  
 
-To explain what are the source and destination drag-and-drop widgets and related issues are, it is best to study how to set these up for widgets without the native dnd support. When setting up such a widget without the native dnd support as source or destination widget, you have to identify the drag-object(s), or as we mentioned in previous paragraph, the 'target(s)'. During this registration you also need to specify the((*action*))the dnd system is to take for the item being dragged. This action is defined as a constant in Gdk::DragContext#GdkDragAction and conveys to the Gtk system whether the item is to be copied, moved, removed from the source, and how to react at the destination at the time the drop occurs. Following are few API examples to show different methods used to register source and destination widgets, and the kind of arguments you may be required to supply when registering these widgets.
+The basic principles behind setting up drag-and-drop source and destination objects are simple, however, some widgets support dnd by design, while most of the Gtk widgets do not. Naturally, sometimes you need to mix the two kinds of (the dnd and the non-dnd) widgets. This complicates both the teaching and the learning of the Gtk's dnd metaphor a bit. This perhaps is one of the reasons in most of the currently available Gtk  drag-and-drop tutorials you find rather incomplete or useless examples, such as dragging a button to a label, which in itself is a nonsense proposition, since a label can never contain a button on the first place. Nevertheless, as we will see shortly using a button and a label for a source and destination after all makes sense, when the students understand that in this case the source and destination objects themselves are being also dragged and/or manipulated by the dnd.
 
 You use Gtk::Drag.source_set and Gtk::Drag.dest_set module methods, when source and destination widgets are arbitrary Gtk objects with their own Gdk::Window:
 




ruby-gnome2-cvs メーリングリストの案内
Back to archive index