6 ViewItem::ViewItem(Glib::ustring _name):Gtk::EventBox(),image()
9 set_events(Gdk::BUTTON_PRESS_MASK);
13 image.signal_expose_event().connect( SigC::slot(*this, &ViewItem::on_image_expose_event) );
16 void ViewItem::on_realize()
18 Gtk::EventBox::on_realize();
19 Glib::RefPtr<Gdk::Window> window = get_window();
20 gc = Gdk::GC::create(window);
27 void ViewItem::set_position(int _x, int _y)
33 void ViewItem::set_name(Glib::ustring _name)
38 std::string ViewItem::get_actual_flow()
48 bool ViewItem::on_image_expose_event(GdkEventExpose *e)
50 Glib::RefPtr<Gdk::Colormap> colormap = image.get_colormap();
51 colormap->alloc_color(color);
52 gc->set_foreground(color);
53 gc->set_background(color);
54 image.get_window()->draw_rectangle(gc, 1, 0, 0, 10, 10);