+
+void Or::set_out_connected(bool _o)
+{
+ out_connected = _o;
+}
+
+bool Or::get_out_logic_connect()
+{
+ return out_connected;
+}
+
+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();
+}