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

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2012年 12月 11日 (火) 06:09:14 JST


-------------------------
REMOTE_ADDR = 184.145.81.223
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-dnd-intro
-------------------------
@@ -819,6 +819,6 @@
   TBDND_ACTIONS = actions=Gdk::DragContext::ACTION_ASK  # _ASK,_COPY,_LINK,_MOVE,_DEFAULT,_PRIVATE
   TBDND_TARGETS = [["toolbar", Gtk::Drag::TARGET_SAME_APP, 100]]
 
-The first element in the tuple (the tuple being the first element in the array of arrays packed here into the into the TBDND_TARGETS constant), 'target', is an arbitrary string, here "toolbar". Its value could be anything you like. The second tuple element, 'flags' declares that the object to be dragged we are specifying, can be dragged only within its original application. And the last element is an arbitrary identification integer (we chose 100). We are defining a single target (draggable) object, so there is only one (single) tuple present in the array of targets, stored in 'TBDND_TARGETS' constant which, and this is important, should be used for both source and destination widgets registration.
+The first element in the tuple (the tuple being the first element in the array of arrays packed here into the into the TBDND_TARGETS constant), 'target', is an arbitrary string, here "toolbar". Its value could be anything you like. The second tuple element, 'flags' declares that the object to be dragged we are specifying, can be dragged only within its original application. And the last tuple's element, 'info', is an arbitrary identification integer (we chose 100). We are defining a single target (draggable) object, so there is only one (single) tuple present in the array of targets, stored in 'TBDND_TARGETS' constant which, and this is important, should be used for both source and destination widgets registration.
 
 Just like we have observed in our previous (button-to-label-dnd.rb) example, the '*_ACTIONS' constant is not part of the tuple, or 'targets' definition, it is usually different for source widget registration, than for registration of the destination, however not for or our button and label nor toolbar's frame source and destination widgets! Just like before, also here, we define the same action for both source and destination sides namely, the Gdk::DragContext::ACTION_ASK. (This constant is defined in Gdk::DragContext#GdkDragAction).




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