2 #include "item_conduct.h"
4 ViewConduct::ViewConduct(Glib::ustring _name, int orientacion):ViewItem(_name)
7 case 0: // Caño vertical
8 image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/canio_n.png");
10 case 1: // Caño horizontal
11 image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/canio_s.png");
18 ViewConduct::~ViewConduct()
22 bool ViewConduct::on_image_expose_event(GdkEventExpose *e)
24 Glib::RefPtr<Gdk::Colormap> colormap = image.get_colormap();
25 Gdk::Color blanco = Gdk::Color("white");
26 colormap->alloc_color(blanco);
27 colormap->alloc_color(color);
28 gc->set_foreground(color);
29 gc->set_background(color);
31 w = image.get_width();
32 h = image.get_height();
35 image.get_window()->draw_rectangle(gc, 1, w/2-2, 0, 4, h);
36 gc->set_foreground(blanco);
37 image.get_window()->draw_rectangle(gc, 0, w/2-3, 0, 6, h);
40 image.get_window()->draw_rectangle(gc, 1, 0, h/2-2, h, 4);
41 gc->set_foreground(blanco);
42 image.get_window()->draw_rectangle(gc, 0, 0, h/2-3, h, 6);