[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日 (木) 12:04:22 JST


-------------------------
REMOTE_ADDR = 70.49.50.17
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-dnd-intro
-------------------------
@@ -26,7 +26,9 @@
 The source locations and/or widgets are those in which the objects to be dragged originally reside, and the destinations are places, widgets or object onto which you wish to drop the dragged objects. These widgets or objects may be different, for instance you may plan to drag an icon from an icon view onto some other viewing area, perhaps a canvas or a text widget. Or they can be one and the same widget and indeed the same object, as is the case when you are reordering rows in a tree view, or items in the text view. In the previous chapter 9, (section: 9.6.2.2), we have already seen our toolbar 'dnd-toolbox.rb' example in which the source and destination are of the same type namely Gtk::Frame, but they are two different objects.
 
 :Note:
-    All widgets which have their own Gdk::Window can be set as source or destination widgets. A widget that contains its own Gdk::Window must not have Gtk::Widget::NO_WINDOW flag set. You can check for this flag with the Gtk::Widget#no_window? method. (Note that this method returns true if the widget (the receiver object) does not contain the Gdk::Window.)
+    The Gtk API tells us that all the widgets which have their own Gdk::Window can be set as source or destination widgets. A widget that contains its own Gdk::Window must not have Gtk::Widget::NO_WINDOW flag set. You can check for this flag with the Gtk::Widget#no_window? method. (Note that this method returns true if the widget (the receiver object) does not contain the Gdk::Window.)
+
+    The above statement is not completely accurate, because it suggests that Gtk widgets without their own Gdk::Window can not be set as source and destination drag-and-drop widgets. Later we will develop a simple example (button-to-label-dnd.rb) program with button as the dnd source and a label as a the dnd destination widget. Neither Gtk button nor label have their own Gdk::Window, and yet they can be set up as source and destination widgets. What is true with respect to drag-and-drop restrictions for widgets with no Gdk::Window of their own is that, such widgets do not respond to very important dnd((*'drag-data-get'*)) and((*'drag-data-received'*)) signals. 
 
 
 




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