From 019c0e56579fe7f94982434d8efcd7b00d8df0aa Mon Sep 17 00:00:00 2001 From: Miller Puckette Date: Fri, 28 Dec 2007 03:43:06 +0000 Subject: ... and again trying to check in 0.41-0 test 10 svn path=/trunk/; revision=9108 --- pd/src/g_toggle.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'pd/src/g_toggle.c') diff --git a/pd/src/g_toggle.c b/pd/src/g_toggle.c index e36be5fa..830e99cb 100644 --- a/pd/src/g_toggle.c +++ b/pd/src/g_toggle.c @@ -61,11 +61,12 @@ void toggle_draw_new(t_toggle *x, t_glist *glist) canvas, xx+w+1, yy + x->x_gui.x_h-w-1, xx + x->x_gui.x_w-w, yy+w, w, (x->x_on!=0.0)?x->x_gui.x_fcol:x->x_gui.x_bcol, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ - -font {%s %d bold} -fill #%6.6x -tags %lxLABEL\n", + -font {{%s} -%d %s} -fill #%6.6x -tags %lxLABEL\n", canvas, xx+x->x_gui.x_ldx, yy+x->x_gui.x_ldy, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"", - x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_lcol, x); + x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, + x->x_gui.x_lcol, x); if(!x->x_gui.x_fsf.x_snd_able) sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags %lxOUT%d\n", canvas, xx, yy + x->x_gui.x_h-1, xx + IOWIDTH, yy + x->x_gui.x_h, x, 0); @@ -120,8 +121,8 @@ void toggle_draw_config(t_toggle* x, t_glist* glist) { t_canvas *canvas=glist_getcanvas(glist); - sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {%s %d bold} -fill #%6.6x -text {%s} \n", - canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, + sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {{%s} -%d %s} -fill #%6.6x -text {%s} \n", + canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); sys_vgui(".x%lx.c itemconfigure %lxBASE -fill #%6.6x\n", canvas, x, @@ -225,7 +226,7 @@ static void toggle_properties(t_gobj *z, t_glist *owner) t_symbol *srl[3]; iemgui_properties(&x->x_gui, srl); - sprintf(buf, "pdtk_iemgui_dialog %%s TOGGLE \ + sprintf(buf, "pdtk_iemgui_dialog %%s |tgl| \ ----------dimensions(pix):----------- %d %d size: 0 0 empty \ -----------non-zero-value:----------- %g value: 0.0 empty %g \ -1 lin log %d %d empty %d \ @@ -256,7 +257,7 @@ static void toggle_dialog(t_toggle *x, t_symbol *s, int argc, t_atom *argv) { t_symbol *srl[3]; int a = (int)atom_getintarg(0, argc, argv); - float nonzero = (float)atom_getfloatarg(2, argc, argv); + t_float nonzero = (t_float)atom_getfloatarg(2, argc, argv); int sr_flags; if(nonzero == 0.0) @@ -313,7 +314,7 @@ static void toggle_fout(t_toggle *x, t_floatarg f) static void toggle_loadbang(t_toggle *x) { if(!sys_noloadbang && x->x_gui.x_isa.x_loadinit) - toggle_fout(x, (float)x->x_on); + toggle_fout(x, (t_float)x->x_on); } static void toggle_size(t_toggle *x, t_symbol *s, int ac, t_atom *av) @@ -365,7 +366,7 @@ static void *toggle_new(t_symbol *s, int argc, t_atom *argv) int a=IEM_GUI_DEFAULTSIZE, f=0; int ldx=17, ldy=7; int fs=10; - float on=0.0, nonzero=1.0; + t_float on=0.0, nonzero=1.0; char str[144]; iem_inttosymargs(&x->x_gui.x_isa, 0); @@ -390,11 +391,11 @@ static void *toggle_new(t_symbol *s, int argc, t_atom *argv) bflcol[0] = (int)atom_getintarg(9, argc, argv); bflcol[1] = (int)atom_getintarg(10, argc, argv); bflcol[2] = (int)atom_getintarg(11, argc, argv); - on = (float)atom_getfloatarg(12, argc, argv); + on = (t_float)atom_getfloatarg(12, argc, argv); } else iemgui_new_getnames(&x->x_gui, 2, 0); if((argc == 14)&&IS_A_FLOAT(argv,13)) - nonzero = (float)atom_getfloatarg(13, argc, argv); + nonzero = (t_float)atom_getfloatarg(13, argc, argv); x->x_gui.x_draw = (t_iemfunptr)toggle_draw; x->x_gui.x_fsf.x_snd_able = 1; @@ -407,7 +408,7 @@ static void *toggle_new(t_symbol *s, int argc, t_atom *argv) if(x->x_gui.x_fsf.x_font_style == 1) strcpy(x->x_gui.x_font, "helvetica"); else if(x->x_gui.x_fsf.x_font_style == 2) strcpy(x->x_gui.x_font, "times"); else { x->x_gui.x_fsf.x_font_style = 0; - strcpy(x->x_gui.x_font, "courier"); } + strcpy(x->x_gui.x_font, sys_font); } x->x_nonzero = (nonzero!=0.0)?nonzero:1.0; if(x->x_gui.x_isa.x_loadinit) x->x_on = (on!=0.0)?nonzero:0.0; -- cgit v1.2.1