5 imageE = Gdk::Pixbuf::create_from_file("tanque_e.png");
6 imageO = Gdk::Pixbuf::create_from_file("tanque_o.png");
7 null = Gdk::Pixbuf::create_from_file("tanque_null.png");
10 set_size_request(image->get_width(), image->get_height());
12 Glib::RefPtr<Gnome::Glade::Xml> ref;
14 ref = Gnome::Glade::Xml::create("constructor.glade", "cistern_pty_wnd");
16 catch(const Gnome::Glade::XmlError &ex) {
17 std::cerr << ex.what() << std::endl;
19 ref->get_widget_derived("cistern_pty_wnd",property_wnd);
26 bool Cistern::on_button_press_event(GdkEventButton *event)
28 if ((event->type == GDK_BUTTON_PRESS) && ( event->button ==2)){
30 image->render_to_drawable(get_window(),get_style()->get_black_gc(),0,0,0,0,image->get_width(),image->get_height(),Gdk::RGB_DITHER_NONE,0,0);
40 set_size_request(image->get_width(),image->get_height());
41 image->render_to_drawable(get_window(),get_style()->get_black_gc(),0,0,0,0,image->get_width(),image->get_height(),Gdk::RGB_DITHER_NONE,0,0);
44 if ((event->type == GDK_BUTTON_PRESS) && ( event->button == 3)){
45 menu_popup.popup(event->button, event->time);
46 return true; //It has been handled.
49 if ((event->type == GDK_2BUTTON_PRESS) && (event->button ==1)){
55 void Cistern::on_menu_popup_rotar()
58 event.type = GDK_BUTTON_PRESS;
60 Cistern::on_button_press_event(&event);
63 void Cistern::on_menu_popup_propiedades()
66 event.type = GDK_2BUTTON_PRESS;
68 Cistern::on_button_press_event(&event);