aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-11-05 06:53:53 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-11-05 06:53:53 +0000
commiteb12ad0235502b68adf9c2a0f8c4d63441dfca0c (patch)
tree6e601821a2fe1a66a65620cdbac5bc112ae684b7
parente0eb6df937525b40191a231ad72a74fb55518c75 (diff)
turned off debug messages and added color changing example
svn path=/trunk/externals/hcs/; revision=8938
-rw-r--r--sys_gui-help.pd67
-rw-r--r--sys_gui.c6
2 files changed, 58 insertions, 15 deletions
diff --git a/sys_gui-help.pd b/sys_gui-help.pd
index 2c732e7..baf920f 100644
--- a/sys_gui-help.pd
+++ b/sys_gui-help.pd
@@ -1,18 +1,59 @@
-#N canvas 653 47 435 295 10;
-#X obj 78 232 sys_gui;
-#X msg 78 58 menu_doc_browser;
-#X text 187 56 open the help browser;
-#X msg 102 100 set text_color #f0f;
-#X text 231 100 set variables;
-#X msg 132 147 bang;
-#X obj 255 172 colorpanel;
-#X obj 254 147 bng 17 250 50 0 empty empty empty 17 7 0 10 -262144
+#N canvas 975 22 489 372 10;
+#X obj 69 304 sys_gui;
+#X msg 69 72 menu_doc_browser;
+#X text 178 70 open the help browser;
+#X msg 93 114 set text_color #f0f;
+#X text 222 114 set variables;
+#X msg 123 161 bang;
+#X obj 246 186 colorpanel;
+#X obj 245 161 bng 17 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
-#X msg 255 196 set box_fill \$2;
-#X text 284 146 choose a color;
+#X text 275 160 choose a color;
+#X text 143 304 DANGER! You can mess up Pd big time with this!! :D
+;
+#X text 18 28 This objects give you the ability to send raw Tcl directly
+to the Pd GUI process just like C objects do.;
+#N canvas 0 22 454 304 generate 0;
+#X obj 101 15 inlet;
+#X obj 103 275 outlet;
+#X obj 103 58 unpack float float float;
+#X obj 103 82 * 255;
+#X obj 103 105 int;
+#X obj 103 128 makefilename %x;
+#X obj 203 82 * 255;
+#X obj 203 105 int;
+#X obj 203 128 makefilename %x;
+#X obj 303 82 * 255;
+#X obj 303 105 int;
+#X obj 303 128 makefilename %x;
+#X obj 103 163 pack symbol symbol symbol;
+#X obj 103 187 zexy/makesymbol #%s%s%s;
+#X msg 103 212 set set obj_box_fill \$1;
+#X obj 103 238 trigger bang anything;
+#X connect 0 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 6 0;
+#X connect 2 2 9 0;
+#X connect 3 0 4 0;
+#X connect 4 0 5 0;
+#X connect 5 0 12 0;
+#X connect 6 0 7 0;
+#X connect 7 0 8 0;
+#X connect 8 0 12 1;
+#X connect 9 0 10 0;
+#X connect 10 0 11 0;
+#X connect 11 0 12 2;
+#X connect 12 0 13 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 1 0;
+#X connect 15 1 1 0;
+#X restore 246 212 pd generate web color;
+#X msg 245 236 set obj_box_fill #a3cfb5;
#X connect 1 0 0 0;
#X connect 3 0 0 0;
#X connect 5 0 0 0;
-#X connect 6 0 8 0;
+#X connect 6 0 11 0;
#X connect 7 0 6 0;
-#X connect 8 0 0 0;
+#X connect 11 0 12 0;
+#X connect 12 0 0 0;
diff --git a/sys_gui.c b/sys_gui.c
index 1b6cd9b..eb96ff1 100644
--- a/sys_gui.c
+++ b/sys_gui.c
@@ -3,6 +3,8 @@
#include <m_pd.h>
#include <g_canvas.h>
+#define DEBUG(x)
+
static t_class *sys_gui_class;
typedef struct _sys_gui
@@ -18,7 +20,7 @@ static void sys_gui_bang(t_sys_gui *x)
static void sys_gui_anything(t_sys_gui *x, t_symbol *s, int argc, t_atom *argv)
{
- post("sys_gui_anything");
+ DEBUG(post("sys_gui_anything"););
int i = 0;
char buf[MAXPDSTRING];
@@ -35,7 +37,7 @@ static void sys_gui_anything(t_sys_gui *x, t_symbol *s, int argc, t_atom *argv)
static void sys_gui_list(t_sys_gui *x, t_symbol *s, int argc, t_atom *argv)
{
- post("sys_gui_list");
+ DEBUG(post("sys_gui_list"););
int i = 0;
char buf[MAXPDSTRING];