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

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2012年 12月 12日 (水) 12:40:14 JST


-------------------------
REMOTE_ADDR = 184.145.81.223
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-dnd-intro
-------------------------
@@ -843,7 +843,7 @@
 # (10.2.2.3.1)
 :'set_dnd_source_frame_widget(htbframe)' method
 
-    The 'set_dnd_source_frame_widget(htbframe)' method is straight forward, nevertheless it contains a few perks that deserve special attention. The first one is unsetting a possible earlier registration as the destination. Indeed this is a dummy (or unnecessary, void) call when called during the instantiation of DndTbWindow class (i.e. when called from the initialize method). It only serves its purpose on subsequent calls, at the time a drag occurs (i.e. when 'button-press-event' occurs). This brings us to the second nuance (perk) namely, to the next line, in which we register our source widget (frame) as a listener or the signal handler for 'button-press-event' signals (remember the frames normally do not respond to these signals), so we first have to add (register) this event/signal for the frame, and then register this frame's callback proc (or block) to respond to emissions of these signals. When and if the 'button-press-event' occurs, we make this signal handler to fin
 ally register the widget as the dnd source. The last perk is that we can not use the regular Gtk::Drag.source_set method to set up our source widget (frame), as we did in our 'button-to-label-dnd.rb' example.
+    The 'set_dnd_source_frame_widget(htbframe)' method is straight forward, nevertheless it contains a few perks that deserve special attention. The first one is unsetting a possible earlier registration as the destination. Indeed this is a dummy (or unnecessary, void) call when called during the instantiation of DndTbWindow class (i.e. when called from the initialize method). It only serves its purpose on subsequent calls, at the time a drag occurs (i.e. when 'button-press-event' occurs). This brings us to the second nuance (perk) namely, to the next line, in which we register our source widget (frame) as a listener or the signal handler for 'button-press-event' signals (remember the frames normally do not respond to signals), so we first have to add (register) event/signal for the frame, and then register this frame's callback proc (or block) to respond to emissions of these signals. When and if the 'button-press-event' occurs, we make this signal handler to finally regist
 er the widget as the dnd source. The last perk is that we can not use the regular Gtk::Drag.source_set method to set up our source widget (frame), as we did in our 'button-to-label-dnd.rb' example.
 
 
      widg.signal_connect('button-press-event') do |w, e|




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