ruby-****@sourc*****
ruby-****@sourc*****
2012年 11月 29日 (木) 02:33:49 JST
------------------------- REMOTE_ADDR = 184.145.80.128 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-dnd-intro ------------------------- @@ -19,7 +19,7 @@ :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 there is no Gdk::Window.) + 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.) As we already mentioned another reason for a blurry view of what a drag-and-drop object is, is the fact that Gtk performs many tasks such as those defined in Gdk::DragContext#GdkDragAction behind the scene. This means that Gtk and not the programer is responsible for copying, moving and/or removing items you are dragging. However, this may may not be entirely true or not at all, depending whether you are dragging items between different widgets or within the widgets that supports dragging and dropping by design. An example of such a widget, which supports dnd by design is the Gtk::TreeView. You may also decide you want to bypass, Gtk default behaviour and implement your own drag-and-drop behaviour. In that case you will need to perform copying and removing dragging objects yourself. In that case you will need to obtain the true dragging object, such as a tree view row, or an icon residing in icon view, or perhaps a different image object all together for instance a large ima ge the icon represents. As you can see, in such situations you may need to have a true reference to the dragged object and Gtk's target abstraction may be rather useless. Fortunately these are special cases, and require a better understanding of these issues. You may find it necessary to consult the'Inter-Client Communications Conventions Manual' (ICCCM). Though, our intention here is to provide the basic coverage of the dnd in Ruby Gtk, we will look at some of the more advanced issues, enough to point you in the right direction, and perhaps to inspire developers to polish the rough edges in this areas of Gtk.