[Gridflow-cvs] [svn] commit: r3519 - /trunk/base/flow_objects.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Tue Apr 15 15:44:38 EDT 2008


Author: matju
Date: Tue Apr 15 15:44:26 2008
New Revision: 3519

Log:
word wrap long text in [display]

Modified:
    trunk/base/flow_objects.c

Modified: trunk/base/flow_objects.c
==============================================================================
--- trunk/base/flow_objects.c (original)
+++ trunk/base/flow_objects.c Tue Apr 15 15:44:26 2008
@@ -2652,13 +2652,19 @@
 	string sel = string(rb_str_ptr(rb_funcall(argv[0],SI(to_s),0))+3);
 	text.str("");
 	if (sel != "float") {text << sel; if (argc>1) text << " ";}
+	long col = text.str().length();
 	t_atom at[argc];
 	ruby2pd(argc,argv,at);
 	char buf[MAXPDSTRING];
 	for (int i=1; i<argc; i++) {
 		atom_string(&at[i],buf,MAXPDSTRING);
 		text << buf;
-		if (i!=argc-1) text << " ";
+		col += strlen(buf);
+		if (i!=argc-1) {
+			text << " ";
+			col++;
+			if (col>56) {text << "\\\\\n"; col=0;}
+		}
 	}
 	clock_delay(clock,0);
 }



More information about the Gridflow-cvs mailing list