From 9062f6571522ababba146e483a4b48b71162c484 Mon Sep 17 00:00:00 2001 From: Guenter Geiger Date: Mon, 21 Jul 2003 15:50:49 +0000 Subject: fixed pd0.37 build svn path=/trunk/externals/ggee/; revision=789 --- gui/button.c | 19 ++++++------------- gui/fatom.h | 4 +--- gui/ticker.c | 4 +--- gui/toddle.c | 3 +-- 4 files changed, 9 insertions(+), 21 deletions(-) diff --git a/gui/button.c b/gui/button.c index c658fcd..debea9f 100644 --- a/gui/button.c +++ b/gui/button.c @@ -4,7 +4,6 @@ #include -t_rtext *rtext_new_without_senditup(t_glist *glist, t_text *who, t_rtext *next); #ifdef NT #pragma warning( disable : 4244 ) @@ -106,11 +105,7 @@ static void create_widget(t_button *x, t_glist *glist) text[i] = ' '; } - sys_vgui("button .x%x.c.s%x \ - -height %d \ - -font - -text \"%s\" \ - -command button_cb%x\n",canvas,x, + sys_vgui("button .x%x.c.s%x -height %d -text \"%s\" -command button_cb%x\n",canvas,x, x->x_height,text, x); } @@ -140,7 +135,7 @@ static void button_drawme(t_button *x, t_glist *glist, int firsttime) text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist)); } draw_inlets(x, glist, firsttime, 1,1); - draw_handle(x, glist, firsttime); + // draw_handle(x, glist, firsttime); } @@ -241,7 +236,7 @@ static void button_vis(t_gobj *z, t_glist *glist, int vis) t_rtext *y; DEBUG(post("vis: %d",vis);) if (vis) { - y = (t_rtext *) rtext_new_without_senditup(glist, (t_text *)z, glist->gl_editor->e_rtext); + y = (t_rtext *) rtext_new(glist, (t_text *)z); button_drawme(s, glist, 1); } else { @@ -315,7 +310,7 @@ static void *button_new(t_symbol* text) x->x_glist = (t_glist*)NULL; - x->x_width = 20; + x->x_width = 30; x->x_height = 1; if (text == &s_) x->x_text = gensym("OK"); @@ -323,7 +318,7 @@ static void *button_new(t_symbol* text) x->x_text = text; /* TODO .. ask the button for its width */ - x->x_width += strlen(x->x_text->s_name)*5.7; + x->x_width += strlen(x->x_text->s_name)*5.2; sprintf(buf,"button%p",x); x->x_sym = gensym(buf); @@ -331,9 +326,7 @@ static void *button_new(t_symbol* text) /* pipe startup code to tk */ - sys_vgui("proc button_cb%x {} {\n - pd [concat button%p b \\;]\n - }\n",x,x); + sys_vgui("proc button_cb%x {} {\n pd [concat button%p b \\;]\n }\n",x,x); outlet_new(&x->x_obj, &s_float); return (x); diff --git a/gui/fatom.h b/gui/fatom.h index 43874a7..5aed2dc 100644 --- a/gui/fatom.h +++ b/gui/fatom.h @@ -389,9 +389,7 @@ static void *fatom_new(t_fatom* x,t_floatarg max, t_floatarg min, t_floatarg h) /* pipe startup code to slitk */ - sys_vgui("proc fatom_cb%x {val} {\n - pd [concat fatom%x f $val \\;]\n - }\n",x,x); + sys_vgui("proc fatom_cb%x {val} {\n pd [concat fatom%x f $val \\;]\n }\n",x,x); outlet_new(&x->x_obj, &s_float); return (x); diff --git a/gui/ticker.c b/gui/ticker.c index f3ed4e9..abb55b2 100755 --- a/gui/ticker.c +++ b/gui/ticker.c @@ -54,9 +54,7 @@ static void *ticker_new() /* pipe startup code to slitk */ - sys_vgui("proc fatom_cb%x {val} {\n - pd [concat ticker%x f $val \\;]\n - }\n",x,x); + sys_vgui("proc fatom_cb%x {val} {\n pd [concat ticker%x f $val \\;]\n }\n",x,x); outlet_new(&x->x_obj, &s_float); return (x); diff --git a/gui/toddle.c b/gui/toddle.c index e7541a6..32d7e3b 100755 --- a/gui/toddle.c +++ b/gui/toddle.c @@ -43,8 +43,7 @@ void toddle_drawbang(t_toddle *x,t_glist *glist,int on) { if (glist_isvisible(glist)) { if (on) - sys_vgui(".x%x.c create oval \ -%d %d %d %d -fill %s -tags %xB\n",glist_getcanvas(glist), + sys_vgui(".x%x.c create oval %d %d %d %d -fill %s -tags %xB\n",glist_getcanvas(glist), x->x_obj.te_xpos+1,x->x_obj.te_ypos+1, x->x_obj.te_xpos + x->x_width -1, x->x_obj.te_ypos + x->x_height -1,x->x_color->s_name,x); -- cgit v1.2.1