2 #include "item_union.h"
5 ViewUnion::ViewUnion(Glib::ustring _name, int orientacion):ViewItem(_name)
9 image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/y_n.png");
12 image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/y_e.png");
15 image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/y_s.png");
18 image.set(PACKAGE_DATA_DIR"/plaqui-client/pixmaps/y_o.png");
25 ViewUnion::~ViewUnion()
29 bool ViewUnion::on_image_expose_event(GdkEventExpose *e)
31 Glib::RefPtr<Gdk::Colormap> colormap = Gtk::Widget::get_default_colormap();
32 if (!colormap->alloc_color(color, false, false)) {
33 std::cout << "ERROR ALOCANDO COLOR!" << std::endl;
35 gc->set_foreground(color);
36 gc->set_background(color);
39 w = image.get_width();
40 h = image.get_height();
41 if (actual_flow > 0) {
44 image.get_window()->draw_rectangle(gc, 1, w/2-3, 16, 6, h-16);
45 image.get_window()->draw_rectangle(gc, 1, 0, 13, w, 6);
48 image.get_window()->draw_rectangle(gc, 1, 0, h/2-3, 48, 6);
49 image.get_window()->draw_rectangle(gc, 1, 45, 0, 6, h);
52 image.get_window()->draw_rectangle(gc, 1, w/2-3, 0, 6, 48);
53 image.get_window()->draw_rectangle(gc, 1, 0, 45, w, 6);
56 image.get_window()->draw_rectangle(gc, 1, 16, h/2-3, 48, 6);
57 image.get_window()->draw_rectangle(gc, 1, 13, 0, 6, h);