4 WorkPlace::WorkPlace( BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml> &refGlade):Gtk::Fixed(cobject)
8 WorkPlace::~WorkPlace()
12 bool WorkPlace::on_expose_event(GdkEventExpose *event)
15 for(x=0; x<get_width(); x+=32)
16 for (y=0; y<get_height();y+=32){
17 get_window()->draw_point (get_style()->get_black_gc(), x,y);
18 get_window()->draw_point (get_style()->get_black_gc(), x,y+1);
19 get_window()->draw_point (get_style()->get_black_gc(), x,y-1);
20 get_window()->draw_point (get_style()->get_black_gc(), x+1,y);
21 get_window()->draw_point (get_style()->get_black_gc(), x-1,y);
25 Glib::RefPtr<Gdk::GC> gc = get_style()->get_black_gc();
27 color.set_rgb(255,0,0);
28 gc->set_rgb_bg_color(color);
29 get_style()->set_black(color);
30 std::list<t_line>::iterator i = lista_lineas.begin();
31 while ( i != lista_lineas.end() ) {
33 get_window()->draw_line (get_style()->get_black_gc(), temp.logic->get_position_x(),temp.logic->get_position_y(), temp.store->get_position_x(),temp.store->get_position_y());
39 void WorkPlace::delete_item(int _id)
41 std::list<CItem*>::iterator i = listaItems->begin();
42 while ( i != listaItems->end() ){
44 if ( temp->get_id() == _id ){
52 i = lista_logic_Items->begin();
53 while ( i != lista_logic_Items->end() ){
55 if ( temp->get_id() == _id ){
66 CItem* WorkPlace::get_logic_item(int _id)
68 std::list<CItem *>::iterator i = lista_logic_Items->begin();
69 while ( i != lista_logic_Items->end() ){
71 if ( temp->get_id() == _id )
78 void WorkPlace::delete_line(int _id)
80 std::list<t_line>::iterator i = lista_lineas.begin();
81 while ( i != lista_lineas.end() ){
82 if ( (*i).logic->get_id() == _id || (*i).store->get_id == _id)
83 lista_lineas.erase(i);