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_in.begin();
34 while ( i != lista_lineas_in.end() ) {
36 temp.store->get_in_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);
40 i = lista_lineas_out.begin();
41 while ( i != lista_lineas_out.end() ) {
43 temp.store->get_out_logic_connect_position(w,z);
44 get_window()->draw_line (get_style()->get_black_gc(), temp.logic->get_position_x(),temp.logic->get_position_y(), w,z);
51 void WorkPlace::delete_item(int _id)
53 CItem::logic_connect = false;
54 std::list<CItem*>::iterator i = listaItems->begin();
55 while ( i != listaItems->end() ){
57 if ( temp->get_id() == _id ){
65 i = lista_logic_Items->begin();
66 while ( i != lista_logic_Items->end() ){
68 if ( temp->get_id() == _id ){
70 lista_logic_Items->erase(i);
79 CItem* WorkPlace::get_logic_item(int _id)
81 std::list<CItem *>::iterator i = lista_logic_Items->begin();
82 while ( i != lista_logic_Items->end() ){
84 if ( temp->get_id() == _id )
91 void WorkPlace::delete_line(int _id)
93 std::list<t_line>::iterator i = lista_lineas_in.begin();
94 while ( i != lista_lineas_in.end() ){
95 if ( (*i).store->get_id() == _id ) {
96 lista_lineas_in.erase(i);
97 i = lista_lineas_in.begin();
101 i = lista_lineas_in.begin();
102 while ( i != lista_lineas_in.end() ){
103 if ( (*i).logic->get_id() == _id ) {
104 lista_lineas_in.erase(i);
105 i = lista_lineas_in.begin();
111 void WorkPlace::update_logic_position()
113 std::list<CItem*>::iterator i = listaItems->begin();
114 while ( i != listaItems->end() ){
115 (*i)->update_logic_position();