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

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Mon Oct 26 17:31:45 EDT 2009


Author: matju
Date: Mon Oct 26 17:31:45 2009
New Revision: 4418

Log:
added [gf/canvas_hohoho]

Modified:
    trunk/base/flow_objects2.c

Modified: trunk/base/flow_objects2.c
==============================================================================
--- trunk/base/flow_objects2.c (original)
+++ trunk/base/flow_objects2.c Mon Oct 26 17:31:45 2009
@@ -228,6 +228,24 @@
 }
 \end class {install("gf/canvas_hehehe",1,1);}
 
+\class GFCanvasHoHoHo : FObject {
+	int n;
+	t_canvas *last;
+	\constructor (int n) {this->n=n; last=0;}
+	void hide () {if (last) sys_vgui(".x%lx.c delete %lxRECT\n",long(last),bself);}
+	~GFCanvasHoHoHo () {hide();}
+	\decl 0 list (int x1, int y1, int x2, int y2);
+};
+\def 0 list (int x1, int y1, int x2, int y2) {
+	hide();
+	t_canvas *mom = bself->mom;
+	for (int i=0; i<n; i++) {mom = mom->gl_owner; if (!mom) RAISE("no such canvas");}
+	last = mom;
+	sys_vgui(".x%lx.c create rectangle %d %d %d %d -outline #00aa66 -dash {3 5 3 5} -tags %lxRECT\n",
+		long(last),x1,y1,x2,y2,bself);
+}
+\end class {install("gf/canvas_hohoho",1,0);}
+
 \class GFSearchAndReplace : FObject {
 	t_symbol *from;
 	t_symbol *to;



More information about the Gridflow-cvs mailing list