4 CItem::CItem(const char *filename):Gtk::DrawingArea()
6 image = Gdk::Pixbuf::create_from_file(filename);
7 set_size_request(image->get_width(), image->get_height());
12 menu_image_propiedades.set(Gtk::Stock::PREFERENCES, Gtk::ICON_SIZE_MENU);
13 menu_image_delete.set(Gtk::Stock::CANCEL, Gtk::ICON_SIZE_MENU);
14 menu_image_rotar.set(Gtk::Stock::REFRESH, Gtk::ICON_SIZE_MENU);
15 Gtk::Menu::MenuList& menulist = menu_popup.items();
16 menulist.push_back( Gtk::Menu_Helpers::ImageMenuElem("Propiedades",menu_image_propiedades, SigC::slot(*this, &CItem::on_menu_popup_propiedades) ) );
17 menulist.push_back( Gtk::Menu_Helpers::ImageMenuElem("Rotar", menu_image_rotar ,SigC::slot(*this, &CItem::on_menu_popup_rotar) ) );
18 menulist.push_back( Gtk::Menu_Helpers::ImageMenuElem("Eliminar", menu_image_delete,SigC::slot(*this, &CItem::on_menu_popup_eliminar) ) ) ;
19 menu_popup.accelerate(*this);
26 bool CItem::on_expose_event(GdkEventExpose* event)
28 image->render_to_drawable ( get_window(), get_style()->get_black_gc(), 0, 0, 0, 0, image->get_width() ,image->get_height() ,
29 Gdk::RGB_DITHER_NONE, 0, 0);
31 // XXX Esto no deberia ser necesario! en todo caso devolves false en
32 // vez de true para que siga llamando a los otros handlers :)
33 //Gtk::DrawingArea::on_expose_event(event);
37 void CItem::on_menu_popup_propiedades()
41 void CItem::on_menu_popup_rotar()
45 void CItem::on_menu_popup_eliminar()