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

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Fri Oct 23 17:28:13 EDT 2009


Author: matju
Date: Fri Oct 23 17:28:12 2009
New Revision: 4306

Log:
added [gf/canvas_edit_mode]

Modified:
    trunk/base/flow_objects2.c

Modified: trunk/base/flow_objects2.c
==============================================================================
--- trunk/base/flow_objects2.c (original)
+++ trunk/base/flow_objects2.c Fri Oct 23 17:28:12 2009
@@ -155,6 +155,27 @@
 }
 \end class {install("gf/canvas_setpos",1,0);}
 
+/*
+struct GFCanvasEditModeProxy {
+	t_pd x_pd;
+	GFCanvasEditMode *parent;
+};
+t_class *GFCanvasEditModeProxy_class;
+*/
+
+\class GFCanvasEditMode : FObject {
+	int n;
+	\constructor (int n) {this->n=n;}
+	\decl 0 bang ();
+};
+\def 0 bang () {
+	t_canvas *mom = bself->mom;
+	for (int i=0; i<n; i++) {mom = mom->gl_owner; if (!mom) RAISE("no such canvas");}
+	t_atom a[1]; SETFLOAT(a+0,0);
+	outlet_float(bself->outlets[0],mom->gl_edit);
+}
+\end class {install("gf/canvas_edit_mode",1,1);}
+
 \class GFSearchAndReplace : FObject {
 	t_symbol *from;
 	t_symbol *to;
@@ -173,7 +194,7 @@
 	}
 	outlet_symbol(bself->outlets[0],gensym(a.c_str()));
 }
-\end class {install("gf/string_replace",1,1); add_creator("truc");}
+\end class {install("gf/string_replace",1,1);}
 
 void startup_flow_objects2 () {
 	\startall



More information about the Gridflow-cvs mailing list