[Gridflow-cvs] [svn] commit: r4485 - /trunk/base/flow_objects2.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Thu Oct 29 14:16:14 EDT 2009


Author: matju
Date: Thu Oct 29 14:16:13 2009
New Revision: 4485

Log:
[gf/lol]: add method 'wire_hide'

Modified:
    trunk/base/flow_objects2.c

Modified: trunk/base/flow_objects2.c
==============================================================================
--- trunk/base/flow_objects2.c (original)
+++ trunk/base/flow_objects2.c Thu Oct 29 14:16:13 2009
@@ -303,6 +303,7 @@
 	int n;
 	\constructor (int n) {this->n=n;}
 	\decl 0 wire_dotted (int r, int g, int b);
+	\decl 0 wire_hide ();
 };
 \def 0 wire_dotted (int r, int g, int b) {
 #ifndef DESIREDATA
@@ -311,7 +312,20 @@
 	if (!can) RAISE("no such canvas");
 	for (int i=0; i<n; i++) {ouch = ouch->next; if (!ouch) {RAISE("no such outlet");}}
 	for (t_outconnect *wire = ouch->connections; wire; wire=wire->next) {
-		sys_vgui(".x%lx.c itemconfigure l%lx -fill #%02x%02x%02x -dash {2 2 2 2}\n",long(can),long(wire),r,g,b);
+		sys_vgui(".x%lx.c itemconfigure l%lx -fill #%02x%02x%02x -dash {3 3 3 3}\n",long(can),long(wire),r,g,b);
+	}
+#else
+	post("doesn't work with DesireData");
+#endif
+}
+\def 0 wire_hide () {
+#ifndef DESIREDATA
+	t_outlet *ouch = ((t_object *)bself->mom)->te_outlet;
+	t_canvas *can = bself->mom->gl_owner;
+	if (!can) RAISE("no such canvas");
+	for (int i=0; i<n; i++) {ouch = ouch->next; if (!ouch) {RAISE("no such outlet");}}
+	for (t_outconnect *wire = ouch->connections; wire; wire=wire->next) {
+		sys_vgui(".x%lx.c delete l%lx\n",long(can),long(wire));
 	}
 #else
 	post("doesn't work with DesireData");



More information about the Gridflow-cvs mailing list