6 ViewItem::ViewItem(Glib::ustring _name):Gtk::EventBox(),image()
9 set_events(Gdk::BUTTON_PRESS_MASK);
14 actual_flow = extra = 0;
16 image.signal_expose_event().connect( SigC::slot(*this, &ViewItem::on_image_expose_event) );
19 void ViewItem::on_realize()
21 Gtk::EventBox::on_realize();
22 Glib::RefPtr<Gdk::Window> window = get_window();
23 gc = Gdk::GC::create(window);
30 void ViewItem::set_position(int _x, int _y)
36 void ViewItem::set_name(Glib::ustring _name)
41 std::string ViewItem::get_actual_flow()
51 bool ViewItem::on_image_expose_event(GdkEventExpose *e)
53 Glib::RefPtr<Gdk::Colormap> colormap = image.get_colormap();
54 colormap->alloc_color(color);
55 gc->set_foreground(color);
56 gc->set_background(color);
57 image.get_window()->draw_rectangle(gc, 1, 0, 0, 10, 10);