3 WorkPlace::WorkPlace( BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml> &refGlade):Gtk::Fixed(cobject)
5 refGlade->get_widget_derived("viewport",viewport);
6 viewport->workplace = this;
9 WorkPlace::~WorkPlace()
13 bool WorkPlace::on_expose_event(GdkEventExpose *event)
16 for(x=0; x<get_width(); x+=32)
17 for (y=0; y<get_height();y+=32){
18 get_window()->draw_point (get_style()->get_black_gc(), x,y);
19 get_window()->draw_point (get_style()->get_black_gc(), x,y+1);
20 get_window()->draw_point (get_style()->get_black_gc(), x,y-1);
21 get_window()->draw_point (get_style()->get_black_gc(), x+1,y);
22 get_window()->draw_point (get_style()->get_black_gc(), x-1,y);
27 bool WorkPlace::on_button_press_event(GdkEventButton *event)
29 if ((event->type==GDK_BUTTON_RELEASE) && (event->button ==1)) {
30 get_pointer(viewport->temp.w, viewport->temp.z);
31 get_window()->draw_line (get_style()->get_black_gc(), viewport->temp.x,viewport->temp.y,viewport->temp.w,viewport->temp.z);
36 void WorkPlace::delete_item(int _id)
38 std::list<CItem*>::iterator i = listaItems->begin();
39 while ( i != listaItems->end() ){
41 if ( temp->get_id() == _id ){