]> git.llucax.com Git - z.facultad/75.42/plaqui.git/commitdiff
Se arreglan las compuertas un poco mas.
authorNicolás Dimov <ndimov@gmail.com>
Sat, 29 Nov 2003 00:33:29 +0000 (00:33 +0000)
committerNicolás Dimov <ndimov@gmail.com>
Sat, 29 Nov 2003 00:33:29 +0000 (00:33 +0000)
15 files changed:
Constructor/include/and.h
Constructor/include/cistern.h
Constructor/include/item.h
Constructor/include/not.h
Constructor/include/or.h
Constructor/include/workplace.h
Constructor/src/and.cpp
Constructor/src/cistern.cpp
Constructor/src/constructor.cpp
Constructor/src/exclusa.cpp
Constructor/src/item.cpp
Constructor/src/not.cpp
Constructor/src/or.cpp
Constructor/src/pump.cpp
Constructor/src/workplace.cpp

index f523fd6248356064056c5bfd79e622834dbf6932..56be2e92031d0f9c6f7877d241bb1dc564bdc568 100644 (file)
@@ -16,6 +16,7 @@ class And : public CItem {
                virtual void get_in_logic_connect_position(int& _a, int& _b);
                virtual void get_out_logic_connect_position(int& _a, int& _b);  
                virtual void set_out_connected(bool _o);
+               virtual void draw_connectors();
        private:
                int in_x, in_y, out_x, out_y;
                bool out_connected;
index 6ef50a3cd5ecd886d02012be105d4a53e53535c0..b2a4baf43ce95c182581428b6b4d99ef2db72914 100644 (file)
@@ -56,6 +56,9 @@ class Cistern : public CItem {
                /**Detecta si el click fue en el area de entrada o salida logica, devuelve UNDEF si no fue ninguna de las dos
                */
                ConnectorType detect_click_position(int _a, int _b);
+               /**Dibuja los conectores logicos, que seran ambos azules pues son salidas.
+               */
+               virtual void draw_connectors();
        protected:
                /**Atributos que definen su comportamiento
                */
index 845bd64e6df0548f107c23b981f99d10e4218edd..140629b03009dc9325ac86e07c524f7e9617721e 100644 (file)
@@ -126,7 +126,7 @@ public:
        virtual void set_out_connected(bool _o);
        virtual void set_in_connected(bool _o);
        
-       /**Dibuja los conectores logicos del Item, AZUL == ENTRADA, ROJO == SALIDA.
+       /**Dibuja los conectores logicos del Item, AZUL == SALIDA, ROJO == ENTRADA.
        */
        virtual void draw_connectors();
        
index 9fdde6fcfb1e7550f0186f895402c93d84938349..02b2bb4bbbccbf91f484bdbfc8b66e969d01a75f 100644 (file)
@@ -17,6 +17,8 @@ class Not : public CItem {
                virtual void get_out_logic_connect_position(int& _a, int& _b);  
                virtual void set_out_connected(bool _o);
                virtual void set_in_connected(bool _o);
+               virtual bool get_out_logic_connect();
+               virtual void draw_connectors();
        private:
                int in_x, in_y, out_x, out_y;
                bool in_connected, out_connected;
index 9a22b3ec6927d48c5b99fdd912f688606457dd16..177f69988a9d57d5363ee403c44c5f88722f7d2b 100644 (file)
@@ -16,6 +16,7 @@ class Or : public CItem {
                virtual void get_in_logic_connect_position(int& _a, int& _b);
                virtual void get_out_logic_connect_position(int& _a, int& _b);  
                virtual void set_out_connected(bool _o);
+               virtual void draw_connectors();
        private:
                int in_x, in_y, out_x, out_y;
                bool out_connected;
index 960e04677ef4bb7acaf33a75e911193086710e76..f226ee76348c608e0da540ec1a1912388910958c 100644 (file)
@@ -53,10 +53,13 @@ class WorkPlace:public Gtk::Fixed {
                std::list<CItem *> *listaItems, *lista_logic_Items;
                
                /** Listas de lineas que van de una compuerta a la entrada de un item y de la salida de un item a una compuerta
-                         lista_lineas_in = (salida) compuerta --> (entrada) item
-                         lista_lineas_out= (entrada) compuerta --> (salida) item
+                  * lista_lineas_in = (salida) compuerta --> (entrada) item
+                  * lista_lineas_out= (entrada) compuerta --> (salida) item
+                  * lista_lineas_logic = (salida) compuerta --> (entrada) compuerta.
+                  * Esta ultima lista contiene las lineas que van desde la compuerta seleccionada que se guarda en gate_id hasta
+                  * la compuerta clickeada en segundo termino.
                */
-               std::list<t_line> lista_lineas_in, lista_lineas_out;
+               std::list<t_line> lista_lineas_in, lista_lineas_out, lista_lineas_logic;
                
                /**Variable global que identifica cual item logico fue apuntado para
                  *conectarlo mediante una linea a un item de transporte
index 0ef3bbd058f046236bf36b99a9894fd1861595a4..3e5287695cbfc2d7f243d50b45d2f443b128157c 100644 (file)
@@ -52,16 +52,26 @@ And::~And()
 bool And::on_button_press_event(GdkEventButton *event)
 {
        if ((event->type == GDK_BUTTON_PRESS) && ( event->button == 1)) {
-               if ( CItem::logic_connect ) {
-                       if ( detect_click_position((int)event->x, (int)event->y ) == OUT && !out_connected) {
+               WorkPlace::pointed = ID;
+               t_line tmp_line;
+               std::cout << CItem::gate_id << std::endl;
+               if (CItem::logic_connect) {
+                       if (CItem::gate_id != -1 ) {
+                               if ( detect_click_position((int)event->x, (int)event->y ) == IN && CItem::gate_id != ID ) {
+                                       tmp_line.logic_id =  CItem::gate_id;
+                                       workplace->get_logic_item(CItem::gate_id)->set_out_connected(true);
+                                       tmp_line.store_id = ID;
+                                       workplace->lista_lineas_logic.push_back(tmp_line);
+                                       workplace->queue_draw();
+                                       CItem::gate_id = -1;
+                               }
+                       } else {
                                CItem::gate_id = ID;
-                               WorkPlace::pointed = ID;
                        }
-                       if ( detect_click_position((int)event->x, (int)event->y ) == IN ) {
-                               CItem::gate_id = ID;
-                               WorkPlace::pointed = ID;
-                       }
-               }                       
+               }
+               if ( CItem::logic_connect && detect_click_position((int)event->x, (int)event->y ) == OUT && !out_connected) {
+                       CItem::gate_id = ID;
+               }
                list_pointed->push_back(name);
                combo_entry->set_popdown_strings(*list_pointed);
                combo_entry->get_entry()->set_text (name);
@@ -252,3 +262,41 @@ void And::set_out_connected(bool _o)
 {
        out_connected = _o;
 }
+
+void And::draw_connectors()
+{
+       Glib::RefPtr<Gdk::Window> window = get_window();
+       int a,b,c,d;
+       switch (imgActual) {
+               case 0: 
+                       a = in_x-x; 
+                       b = in_y-y-5;
+                       c = out_x-x-10;
+                       d = out_y-y-5;
+               break;
+               case 1: 
+                       a = in_x-x-5;
+                       b = in_y-y;
+                       c = out_x-x-5;
+                       d = out_y-y-10;
+               break;
+               case 2:
+                       a = in_x-x-10;
+                       b = in_y-y-5;
+                       c = out_x-x;
+                       d = out_y-y-5;
+               break;
+               case 3:
+                       a = in_x-x-5;
+                       b = in_y-y-10;
+                       c = out_x-x-5;
+                       d = out_y-y;
+       }
+       gc->set_foreground(red);
+       gc->set_background(red);
+       window->draw_rectangle(gc, 1, a, b, 10, 10);
+       gc->set_foreground(blue);
+       gc->set_background(blue);
+       window->draw_rectangle(gc, 1, c, d, 10, 10);
+       queue_draw();
+}
index e7e104d139dc32ee72ac4f8344747dad2b8d9c0a..628d69fa78529190d4263e72be50a606e8f1cb35 100644 (file)
@@ -1,5 +1,6 @@
 #include "cistern.h"
 #include "cisternptywnd.h"
+#include "not.h"
 
 Cistern::Cistern(int orientacion)
 {
@@ -34,7 +35,7 @@ Cistern::Cistern(int orientacion)
        temp.type = IN;
        connect_vec.push_back(temp); // entrada arriba
        temp.type = OUT;
-       connect_vec.push_back(temp); // salida abajo
+       connect_vec.push_back(temp); // entrada abajo
 }
 
 Cistern::~Cistern()
@@ -46,24 +47,32 @@ bool Cistern::on_button_press_event(GdkEventButton *event)
        GdkEventExpose e;
        t_line tmp_line;
        if ((event->type == GDK_BUTTON_PRESS) && ( event->button == 1)) {
+               WorkPlace::pointed = ID;
                list_pointed->push_back(name);
                combo_entry->set_popdown_strings(*list_pointed);
                combo_entry->get_entry()->set_text (name);
-               WorkPlace::pointed = ID;
                if (CItem::logic_connect && CItem::gate_id != -1) {
                        if ( detect_click_position((int)event->x, (int)event->y) == IN ){
                                tmp_line.logic_id =  workplace->get_logic_item(CItem::gate_id)->get_id();
                                workplace->get_logic_item(CItem::gate_id)->set_out_connected(true);
                                tmp_line.store_id = ID;
-                               workplace->lista_lineas_in.push_back(tmp_line);
-                               workplace->queue_draw();
-                       } else if (detect_click_position((int)event->x, (int)event->y) == OUT) { 
-//                             if (dynamic_cast<Not *>(get_item(temp.logic_id))) 
-       //                              get_logic_item(temp.logic_id)->set_in_connected(true);
-                               tmp_line.logic_id =  workplace->get_logic_item(CItem::gate_id)->get_id();
-                               tmp_line.store_id = ID;
                                workplace->lista_lineas_out.push_back(tmp_line);
                                workplace->queue_draw();
+                       } else if (detect_click_position((int)event->x, (int)event->y) == OUT )  { 
+                               if (dynamic_cast<Not *>(workplace->get_logic_item(CItem::gate_id))) {
+                                       if ( !dynamic_cast<Not *>(workplace->get_logic_item(CItem::gate_id))->get_out_logic_connect()) {
+                                               workplace->get_logic_item(CItem::gate_id)->set_in_connected(true);
+                                               tmp_line.logic_id =  CItem::gate_id;
+                                               tmp_line.store_id = ID;
+                                               workplace->lista_lineas_out.push_back(tmp_line);
+                                               workplace->queue_draw();
+                                       }
+                               } else {
+                                       tmp_line.logic_id =  CItem::gate_id;
+                                       tmp_line.store_id = ID;
+                                       workplace->lista_lineas_out.push_back(tmp_line);
+                                       workplace->queue_draw();
+                               }                                       
                        }
                        CItem::gate_id = -1;
                }
@@ -254,7 +263,6 @@ void Cistern::get_out_logic_connect_position(int& _a, int& _b)
        
 ConnectorType Cistern::detect_click_position(int _a, int _b)
 {
-       //VER DONDE CAEN LOS CLICKS!!!!!!!!!!!!!! SI ES CON RESPECTO AL WORKPLACE O AL ITEM!!!
        switch(imgActual) {
                case 0:
                        if ( (_a<=32) &&(_a>=0)&&(_b<=32)&&(_b>=0) )
@@ -287,3 +295,14 @@ void Cistern::update_logic_position()
                        out_y = y + image->get_height();
        }
 }
+
+void Cistern::draw_connectors()
+{
+       if ( in_x != -1 ) {
+               Glib::RefPtr<Gdk::Window> window = get_window();
+               gc->set_foreground(blue);
+               window->draw_rectangle(gc, 1, in_x-5-x, in_y-y, 10, 10);
+               window->draw_rectangle(gc, 1, out_x-5-x, out_y-y-10, 10, 10);
+               queue_draw();
+       }
+}
index e8654c143bbdb63608de369c16b93449acbda45d..4ab81de4b7ed4ccdb6d9abbf9c7e09612acadb18 100644 (file)
@@ -319,7 +319,7 @@ void Constructor::on_load_from_xml()
        }
        std::cout << "CARGA COMPLETA" << std::endl;
        file_open_selection->hide();
-       id = listaItems.size()+lista_logic_Items.size()+1;
+       id = listaItems.size()+lista_logic_Items.size()+2;
 }
 
 void Constructor::on_btn_file_ok_clicked()
index a7c4583c6806b1fb02e8b8ec4cf65dad8c6c8d49..048dd6c4c8376a0a1078ca5ea91798a556c874f6 100644 (file)
@@ -1,5 +1,6 @@
 #include "exclusa.h"
 #include "exclusaptywnd.h"
+#include "not.h"
 
 Exclusa::Exclusa(int orientacion)
 {
@@ -41,10 +42,10 @@ bool Exclusa::on_button_press_event(GdkEventButton *event)
 {
        t_line tmp_line;
        if ((event->type == GDK_BUTTON_PRESS) && ( event->button == 1)) {
+               WorkPlace::pointed = ID;
                list_pointed->push_back(name);
                combo_entry->set_popdown_strings(*list_pointed);
                combo_entry->get_entry()->set_text (name);
-               WorkPlace::pointed = ID;
                if (CItem::logic_connect && CItem::gate_id != -1) {
                        if ( detect_click_position((int)event->x, (int)event->y) == IN) {
                                tmp_line.logic_id =  workplace->get_logic_item(CItem::gate_id)->get_id();
@@ -52,11 +53,21 @@ bool Exclusa::on_button_press_event(GdkEventButton *event)
                                tmp_line.store_id = ID;
                                workplace->lista_lineas_in.push_back(tmp_line);
                                workplace->queue_draw();        
-                       } else if (detect_click_position((int)event->x, (int)event->y) == OUT) {        
-                               tmp_line.logic_id =  workplace->get_logic_item(CItem::gate_id)->get_id();
-                               tmp_line.store_id = ID;
-                               workplace->lista_lineas_out.push_back(tmp_line);
-                               workplace->queue_draw();
+                       } else if (detect_click_position((int)event->x, (int)event->y) == OUT )  { 
+                               if (dynamic_cast<Not *>(workplace->get_logic_item(CItem::gate_id))) {
+                                       if (!dynamic_cast<Not *>(workplace->get_logic_item(CItem::gate_id))->get_out_logic_connect()) {
+                                               workplace->get_logic_item(CItem::gate_id)->set_in_connected(true);
+                                               tmp_line.logic_id =  CItem::gate_id;
+                                               tmp_line.store_id = ID;
+                                               workplace->lista_lineas_out.push_back(tmp_line);
+                                               workplace->queue_draw();
+                                       }
+                               } else {
+                                       tmp_line.logic_id =  CItem::gate_id;
+                                       tmp_line.store_id = ID;
+                                       workplace->lista_lineas_out.push_back(tmp_line);
+                                       workplace->queue_draw();
+                               }                                       
                        }
                        CItem::gate_id = -1;
                }
index d3624db421aae00c19f2ebdbe741790a62b6b508..e5027e00ed790e78ef8d8fa1f3dcff92af2996ff 100644 (file)
@@ -61,7 +61,7 @@ bool CItem::on_expose_event(GdkEventExpose* event)
        // XXX Esto no deberia ser necesario! en todo caso devolves false en
        // vez de true para que siga llamando a los otros handlers :)
        //Gtk::DrawingArea::on_expose_event(event);
-       if (logic_connect && !is_logic) {
+       if (CItem::logic_connect) {
                draw_connectors();
        }
        return true;
index 2fc63e2ba60f4d9abb0446d6081e0cdbc5b8986f..8a33e1cf113d423272b5e762afb044b99e2b9c59 100644 (file)
@@ -53,14 +53,28 @@ bool Not::on_button_press_event(GdkEventButton *event)
 {
 
        if ((event->type == GDK_BUTTON_PRESS) && ( event->button == 1)) {
+               WorkPlace::pointed = ID;
+               t_line tmp_line;
+               if (CItem::logic_connect) {
+                       if (CItem::gate_id != -1) {
+                               if ( detect_click_position((int)event->x, (int)event->y) == IN && !in_connected) {
+                                       tmp_line.logic_id =  CItem::gate_id;
+                                       workplace->get_logic_item(CItem::gate_id)->set_out_connected(true);
+                                       set_in_connected(true);
+                                       tmp_line.store_id = ID;
+                                       workplace->lista_lineas_logic.push_back(tmp_line);
+                                       workplace->queue_draw();
+                                       CItem::gate_id = -1;
+                               }
+                       } else
+                               CItem::gate_id = ID;
+               }               
                if ( CItem::logic_connect ) {
                        if ( detect_click_position((int)event->x, (int)event->y ) == OUT && !out_connected )  {
                                CItem::gate_id = ID;
-                               WorkPlace::pointed = ID;
                        }
                        if ( detect_click_position((int)event->x, (int)event->y ) == IN && !in_connected) {
                                CItem::gate_id = ID;
-                               WorkPlace::pointed = ID;
                        }
                }
                list_pointed->push_back(name);
@@ -258,3 +272,46 @@ void Not::set_in_connected(bool _o)
 {
        in_connected = _o;
 }
+
+bool Not::get_out_logic_connect()
+{
+       return out_connected;
+}
+
+void Not::draw_connectors()
+{
+       Glib::RefPtr<Gdk::Window> window = get_window();
+       int a,b,c,d;
+       switch (imgActual) {
+               case 0: 
+                       a = in_x-x; 
+                       b = in_y-y-5;
+                       c = out_x-x-10;
+                       d = out_y-y-5;
+               break;
+               case 1: 
+                       a = in_x-x-5;
+                       b = in_y-y;
+                       c = out_x-x-5;
+                       d = out_y-y-10;
+               break;
+               case 2:
+                       a = in_x-x-10;
+                       b = in_y-y-5;
+                       c = out_x-x;
+                       d = out_y-y-5;
+               break;
+               case 3:
+                       a = in_x-x-5;
+                       b = in_y-y-10;
+                       c = out_x-x-5;
+                       d = out_y-y;
+       }
+       gc->set_foreground(red);
+       gc->set_background(red);
+       window->draw_rectangle(gc, 1, a, b, 10, 10);
+       gc->set_foreground(blue);
+       gc->set_background(blue);
+       window->draw_rectangle(gc, 1, c, d, 10, 10);
+       queue_draw();
+}
index 4cbd5352a6d6ebd6c4192974bf0883e6add1accd..50ad73fa1adc955025a72943a863ba614006c890 100644 (file)
@@ -52,15 +52,24 @@ Or::~Or()
 bool Or::on_button_press_event(GdkEventButton *event)
 {
        if ((event->type == GDK_BUTTON_PRESS) && ( event->button == 1)) {
+               WorkPlace::pointed = ID;
+               t_line tmp_line;
+               if (CItem::logic_connect) {
+                       if (CItem::gate_id != -1) {
+                               if ( detect_click_position((int)event->x, (int)event->y) == IN) {
+                                       tmp_line.logic_id =  CItem::gate_id;
+                                       workplace->get_logic_item(CItem::gate_id)->set_out_connected(true);
+                                       tmp_line.store_id = ID;
+                                       workplace->lista_lineas_logic.push_back(tmp_line);
+                                       workplace->queue_draw();
+                               }
+                       } else 
+                               CItem::gate_id = ID;
+               }
                if ( CItem::logic_connect ) {
                        if ( detect_click_position((int)event->x, (int)event->y ) == OUT && !out_connected) {
                                CItem::gate_id = ID;
-                               WorkPlace::pointed = ID;
                        } 
-                       if ( detect_click_position((int)event->x, (int)event->y ) == IN ) {
-                               CItem::gate_id = ID;
-                               WorkPlace::pointed = ID;
-                       }
                }
                list_pointed->push_back(name);
                combo_entry->set_popdown_strings(*list_pointed);
@@ -254,3 +263,41 @@ void Or::set_out_connected(bool _o)
 {
        out_connected = _o;
 }
+
+void Or::draw_connectors()
+{
+       Glib::RefPtr<Gdk::Window> window = get_window();
+       int a,b,c,d;
+       switch (imgActual) {
+               case 0: 
+                       a = in_x-x; 
+                       b = in_y-y-5;
+                       c = out_x-x-10;
+                       d = out_y-y-5;
+               break;
+               case 1: 
+                       a = in_x-x-5;
+                       b = in_y-y;
+                       c = out_x-x-5;
+                       d = out_y-y-10;
+               break;
+               case 2:
+                       a = in_x-x-10;
+                       b = in_y-y-5;
+                       c = out_x-x;
+                       d = out_y-y-5;
+               break;
+               case 3:
+                       a = in_x-x-5;
+                       b = in_y-y-10;
+                       c = out_x-x-5;
+                       d = out_y-y;
+       }
+       gc->set_foreground(red);
+       gc->set_background(red);
+       window->draw_rectangle(gc, 1, a, b, 10, 10);
+       gc->set_foreground(blue);
+       gc->set_background(blue);
+       window->draw_rectangle(gc, 1, c, d, 10, 10);
+       queue_draw();
+}
index 897ca5039a4aaf99c0c0f4bbf715ceef8f64a256..47cf1b96bba57bc74615a7a8c33682ce06029737 100644 (file)
@@ -1,5 +1,6 @@
 #include "pump.h"
 #include "pumpptywnd.h"
+#include "not.h"
 
 Pump::Pump(int orientacion)
 {
@@ -46,18 +47,29 @@ bool Pump::on_button_press_event(GdkEventButton *event)
                combo_entry->set_popdown_strings(*list_pointed);
                combo_entry->get_entry()->set_text (name);
                WorkPlace::pointed = ID;
+               std::cout<< "CItem::gate_id = "<<CItem::gate_id<<std::endl;
                if (CItem::logic_connect && CItem::gate_id != -1) {
                        if ( detect_click_position((int)event->x, (int)event->y) == IN) {
-                               tmp_line.logic_id =  workplace->get_logic_item(CItem::gate_id)->get_id();
+                               tmp_line.logic_id =  CItem::gate_id;
                                workplace->get_logic_item(CItem::gate_id)->set_out_connected(true);
                                tmp_line.store_id = ID;
                                workplace->lista_lineas_in.push_back(tmp_line);
                                workplace->queue_draw();
-                       } else if (detect_click_position((int)event->x, (int)event->y) == OUT) {
-                               tmp_line.logic_id =  workplace->get_logic_item(CItem::gate_id)->get_id();
-                               tmp_line.store_id = ID;
-                               workplace->lista_lineas_out.push_back(tmp_line);
-                               workplace->queue_draw();
+                       } else if (detect_click_position((int)event->x, (int)event->y) == OUT )  { 
+                               if (dynamic_cast<Not *>(workplace->get_logic_item(CItem::gate_id))) {
+                                       if ( !dynamic_cast<Not *>(workplace->get_logic_item(CItem::gate_id))->get_out_logic_connect()) {
+                                               workplace->get_logic_item(CItem::gate_id)->set_in_connected(true);
+                                               tmp_line.logic_id =  CItem::gate_id;
+                                               tmp_line.store_id = ID;
+                                               workplace->lista_lineas_out.push_back(tmp_line);
+                                               workplace->queue_draw();
+                                       }
+                               } else {
+                                       tmp_line.logic_id =  CItem::gate_id;
+                                       tmp_line.store_id = ID;
+                                       workplace->lista_lineas_out.push_back(tmp_line);
+                                       workplace->queue_draw();
+                               }                                       
                        }
                        CItem::gate_id = -1;
                }
index 847aa17930769248e8480b28a7bf0c272d93bf06..206bca3e81c6e0df32c871289c97ed39ece4a087 100644 (file)
@@ -86,7 +86,6 @@ bool WorkPlace::on_expose_event(GdkEventExpose *event)
                                        y_offset = -15;
                        }
                        get_logic_item(temp.logic_id)->get_out_logic_connect_position(a, b);
-                       get_logic_item(temp.logic_id)->set_out_connected(true);
                        get_item(temp.store_id)->get_in_logic_connect_position(w,z);
                        draw_line(a+x_offset, b+y_offset, w+item_x_offset, z+item_y_offset, color_in);
                        get_window()->draw_line(gc, a, b, a+x_offset, b+y_offset);
@@ -115,14 +114,23 @@ bool WorkPlace::on_expose_event(GdkEventExpose *event)
                                        y_offset = 15;
                        }
                        get_item(temp.store_id)->get_out_logic_connect_position(w,z);
-                       if (dynamic_cast<Not *>(get_logic_item(temp.logic_id))) 
-                               get_logic_item(temp.logic_id)->set_in_connected(true);
                        get_logic_item(temp.logic_id)->get_in_logic_connect_position(a, b);
                        draw_line(w+item_y_offset, z+item_y_offset, a+x_offset, b+y_offset,color_out);
                        get_window()->draw_line(gc, a, b, a+x_offset, b+y_offset);
                }
                i++;
        }
+       
+       i = lista_lineas_logic.begin();
+       while ( i != lista_lineas_logic.end() ) {
+               t_line temp = *i;
+               if ( get_logic_item(temp.store_id) != NULL && get_logic_item(temp.logic_id) != NULL ) {
+                       get_logic_item(temp.logic_id)->get_out_logic_connect_position(w,z);
+                       get_logic_item(temp.store_id)->get_in_logic_connect_position(a, b);
+                       get_window()->draw_line(gc, a, b, w,z);
+               }
+               i++;
+       }
        return true;
 }