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

Zurück zum Archiv-Index

ruby-****@sourc***** ruby-****@sourc*****
2012年 12月 6日 (木) 11:08:53 JST


-------------------------
REMOTE_ADDR = 70.49.50.17
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-dnd-intro
-------------------------
@@ -48,10 +48,18 @@
 
     We hope to look at all of these three situations.  
 
-To explain what 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 earlier above, 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.
+To explain what 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 called them earlier above, the 'target(s)'. 
 
+If you plan to use Gtk's dnd features for either the source or destination widget then during this registration of that particular widget 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.
+
+:Note:
+    You should be aware, that for the majority of Gtk widgets, Gtk has no clue how to handle them neither on the source nor on the destination side, and that for those widgets any of the predefined actions such as for Gdk::DragContext::ACTION_COPY, {_MOVE, _ASK, etc.}, are meaningless. Indeed, for such widgets you have to implement your own actions in appropriate drag-and-drop signal handlers. The simple 'button-to-label-dnd.rb' example, you will see shortly, falls into this category. 
+
+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.
+
+
+
 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:
-
 
 (#1)
  Gtk::Drag.source_set(source_widget,    start_button_mask, targets, actions)




ruby-gnome2-cvs メーリングリストの案内
Zurück zum Archiv-Index