4 int WorkPlace::pointed = -1;
6 WorkPlace::WorkPlace( BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml> &refGlade):Gtk::Fixed(cobject)
10 WorkPlace::~WorkPlace()
14 bool WorkPlace::on_expose_event(GdkEventExpose *event)
17 for(x=0; x<get_width(); x+=32)
18 for (y=0; y<get_height();y+=32){
19 get_window()->draw_point (get_style()->get_black_gc(), x,y);
20 get_window()->draw_point (get_style()->get_black_gc(), x,y+1);
21 get_window()->draw_point (get_style()->get_black_gc(), x,y-1);
22 get_window()->draw_point (get_style()->get_black_gc(), x+1,y);
23 get_window()->draw_point (get_style()->get_black_gc(), x-1,y);
27 Glib::RefPtr<Gdk::GC> gc = get_style()->get_black_gc();
29 color.set_rgb(255,0,0);
30 gc->set_rgb_bg_color(color);
31 get_style()->set_black(color);
33 std::list<t_line>::iterator i = lista_lineas.begin();
34 while ( i != lista_lineas.end() ) {
36 temp.store->get_logic_connect_position(w,z);
37 get_window()->draw_line (get_style()->get_black_gc(), temp.logic->get_position_x(),temp.logic->get_position_y(), w,z);
43 void WorkPlace::delete_item(int _id)
45 CItem::logic_connect = false;
46 std::list<CItem*>::iterator i = listaItems->begin();
47 while ( i != listaItems->end() ){
49 if ( temp->get_id() == _id ){
57 i = lista_logic_Items->begin();
58 while ( i != lista_logic_Items->end() ){
60 if ( temp->get_id() == _id ){
62 lista_logic_Items->erase(i);
71 CItem* WorkPlace::get_logic_item(int _id)
73 std::list<CItem *>::iterator i = lista_logic_Items->begin();
74 while ( i != lista_logic_Items->end() ){
76 if ( temp->get_id() == _id )
83 void WorkPlace::delete_line(int _id)
85 std::list<t_line>::iterator i = lista_lineas.begin();
86 while ( i != lista_lineas.end() ){
87 if ( (*i).store->get_id() == _id ) {
88 lista_lineas.erase(i);
89 i = lista_lineas.begin();
93 i = lista_lineas.begin();
94 while ( i != lista_lineas.end() ){
95 if ( (*i).logic->get_id() == _id ) {
96 lista_lineas.erase(i);
97 i = lista_lineas.begin();