rendered paste body<?php$window = new GtkWindow();$window->add($toolbar = new GtkToolbar());$toolbar->insert($button = GtkToolButton::new_from_stock(Gtk::STOCK_OPEN), -1);$button->set_use_drag_window(TRUE);$button->drag_source_set(Gdk::BUTTON1_MASK,array(array('text\plain', 0, 0)), Gdk::ACTION_COPY|Gdk::ACTION_MOVE);$button->connect('drag-begin', 'dragbegin');$button->connect('drag-data-get', 'dragget');$toolbar->insert($button = GtkToolButton::new_from_stock(Gtk::STOCK_OPEN), -1);$button->set_use_drag_window(TRUE);$button->drag_source_set(Gdk::BUTTON1_MASK,array(array('text\plain', 0, 0)), Gdk::ACTION_COPY|Gdk::ACTION_MOVE);$button->connect('drag-begin', 'dragbegin');$button->connect('drag-data-get', 'dragget');$toolbar->drag_dest_set(Gtk::DEST_DEFAULT_ALL,array( array( 'text/plain', 0, 0)), Gdk::ACTION_COPY|Gdk::ACTION_MOVE);$toolbar->connect('drag-data-received', 'dragreceived');function dragbegin($widget){ global $window; $pixbuf = $window->render_icon($widget->get_property('stock-id'), Gtk::ICON_SIZE_DND); $widget->drag_source_set_icon_pixbuf($pixbuf); return;}function dragget($widget, $context, $data, $info, $time){ echo 'drag get'; return;}function dragreceived($widget, $context, $data, $info, $time){ echo 'drag received'; return;}$window->show_all();Gtk::main();?>