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

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2012年 11月 27日 (火) 03:25:06 JST


-------------------------
REMOTE_ADDR = 184.145.95.170
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-dnd-intro
-------------------------
@@ -40,7 +40,7 @@
  # Gtk::TreeView#enable_model_drag_source(start_button_mask, targets, actions)
  treeview.enable_model_drag_dest(TVDND_TARGETS, Gdk::DragContext::ACTION_ASK)
 
-The targets argument above identifies all the objects that dnd source and destination will accept. It is convenient to assemble all your targets in a constant since your source and destination widgets need to agree they both will operate with the same drag-and-drop objects (data). Namely, when your source and destination widgets are registered, they should be given the same set of targets as a parameter. The targets argument in either case above is an array of target entries, where each entry is, as mentioned above, the tuple in the form [target, flags, info]. Though you may get away by specifying an empty array ([]) for your targets argument, it is better to create constants to be used when registering your source and destination widgets. Here is a code snippet from our next example program:
+The targets argument above identifies all the objects that dnd source and destination will accept. It is convenient to assemble all your targets in a constant since your source and destination widgets need to agree they both will operate with the same drag-and-drop objects (data). Namely, when your source and destination widgets are registered, they should be given the same set of targets as a parameter. The targets argument in either case above is an array of target entries, where each entry is, as mentioned above, the tuple in the form [target, flags, info]. Though you may get away by specifying an empty array ([]) for your targets argument, it is better to create constants with, for your application, meaningful data to be used when registering your source and destination widgets. Here is a code snippet from our next example program:
 
  TVDND_FLAGS   = Gtk::Drag::TARGET_SAME_WIDGET   # TARGET_{SAME_APP, SAME_WIDGET, OTHER_APP, OTHER_WIDGET}
  TVDND_INFO    = 0




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