Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17255
Modified Files:
Tag: impd_0_37
g_all_guis.c g_all_guis.h g_bang.c g_hdial.c g_hslider.c
g_mycanvas.c g_numbox.c g_toggle.c g_vdial.c g_vslider.c
g_vumeter.c
Log Message:
adding pd_scanargs() to simplify construction of gui objects that
have 11 or 14 or 17 (!) args to typecheck & convert
Index: g_all_guis.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_all_guis.c,v
retrieving revision 1.1.1.4.2.4.2.2
retrieving revision 1.1.1.4.2.4.2.3
diff -C2 -d -r1.1.1.4.2.4.2.2 -r1.1.1.4.2.4.2.3
*** g_all_guis.c 6 Mar 2004 22:19:41 -0000 1.1.1.4.2.4.2.2
--- g_all_guis.c 7 Mar 2004 19:38:13 -0000 1.1.1.4.2.4.2.3
***************
*** 643,644 ****
--- 643,695 ----
return ((fstylep->x_font_style << 0) & 63);
}
+
+ int pd_scanargs(int argc, t_atom *argv, char *fmt, ...) {
+ int i=0;
+ va_list val;
+ va_start(val,fmt);
+ int optional=0;
+ for (i=0; i<argc; i++) {
+ switch (fmt[i]) {
+ case 0: goto err; /* too many args */
+ case '*': goto break1; /* rest is any type */
+ case 'F': case 'f': case 'i': if (!IS_A_FLOAT(argv,i)) goto err;
+ break;
+ case 'S': case 's': if (!IS_A_SYMBOL(argv,i)) goto err;
+ break;
+ case '?': break; /* skip */
+ case ';': optional=1; break;
+ default: post("WARNING: bug using pd_scanargs()"); goto err; /* WHAT? */
+ }
+ }
+ if (fmt[i]!=0 && !optional) return 0; /* not enough args */
+ break1:
+ for (i=0; i<argc; i++) {
+ //fprintf(stderr,"i=%d fmt[i]=%c\n",i,fmt[i]);
+ switch (fmt[i]) {
+ case '*': case ';': goto break2;
+ case '?': case 'F': case 'S': break; /* skip */
+ case 'f': {
+ float *p = va_arg(val,float*);
+ //fprintf(stderr," getting float*=0x%08x\n",p);
+ *p = atom_getfloatarg(i,argc,argv);
+ } break;
+ case 'i': {
+ int *p = va_arg(val, int*);
+ //fprintf(stderr," getting int*=0x%08x\n",p);
+ *p = atom_getintarg(i,argc,argv);
+ } break;
+ case 's': {
+ t_symbol **p = va_arg(val,t_symbol**);
+ //fprintf(stderr," getting t_symbol**=0x%08x\n",p);
+ *p = atom_getsymbolarg(i,argc,argv);
+ } break;
+ default: post("WARNING: bug using pd_scanargs()"); goto err; /* WHAT? */
+ }
+ }
+ break2:
+ va_end(val);
+ return 1;
+ err:
+ post("WARNING: pd_scanargs failed; fmt=%s, i=%d",fmt,i);
+ return 0;
+ }
Index: g_all_guis.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_all_guis.h,v
retrieving revision 1.1.1.4.2.2.2.1
retrieving revision 1.1.1.4.2.2.2.2
diff -C2 -d -r1.1.1.4.2.2.2.1 -r1.1.1.4.2.2.2.2
*** g_all_guis.h 5 Mar 2004 19:27:51 -0000 1.1.1.4.2.2.2.1
--- g_all_guis.h 7 Mar 2004 19:38:13 -0000 1.1.1.4.2.2.2.2
***************
*** 330,331 ****
--- 330,333 ----
EXTERN void iem_inttofstyle(t_iem_fstyle_flags *fstylep, int n);
EXTERN int iem_fstyletoint(t_iem_fstyle_flags *fstylep);
+
+ EXTERN int pd_scanargs(int argc, t_atom *argv, char *format, ...);
Index: g_bang.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_bang.c,v
retrieving revision 1.1.1.3.2.2.2.2
retrieving revision 1.1.1.3.2.2.2.3
diff -C2 -d -r1.1.1.3.2.2.2.2 -r1.1.1.3.2.2.2.3
*** g_bang.c 6 Mar 2004 22:19:41 -0000 1.1.1.3.2.2.2.2
--- g_bang.c 7 Mar 2004 19:38:13 -0000 1.1.1.3.2.2.2.3
***************
*** 121,125 ****
void bng_draw(t_bng *x, t_glist *glist, int mode)
{
! if(mode == IEM_GUI_DRAW_MODE_UPDATE) bng_draw_update(x, glist);
else if(mode == IEM_GUI_DRAW_MODE_MOVE) bng_draw_move(x, glist);
else if(mode == IEM_GUI_DRAW_MODE_NEW) bng_draw_new(x, glist);
--- 121,125 ----
void bng_draw(t_bng *x, t_glist *glist, int mode)
{
! if (mode == IEM_GUI_DRAW_MODE_UPDATE) bng_draw_update(x, glist);
else if(mode == IEM_GUI_DRAW_MODE_MOVE) bng_draw_move(x, glist);
else if(mode == IEM_GUI_DRAW_MODE_NEW) bng_draw_new(x, glist);
***************
*** 165,178 ****
if(ftbreak > fthold)
{
! int h;
!
! h = ftbreak;
ftbreak = fthold;
fthold = h;
}
! if(ftbreak < IEM_BNG_MINBREAKFLASHTIME)
! ftbreak = IEM_BNG_MINBREAKFLASHTIME;
! if(fthold < IEM_BNG_MINHOLDFLASHTIME)
! fthold = IEM_BNG_MINHOLDFLASHTIME;
x->x_flashtime_break = ftbreak;
x->x_flashtime_hold = fthold;
--- 165,174 ----
if(ftbreak > fthold)
{
! int h = ftbreak;
ftbreak = fthold;
fthold = h;
}
! if(ftbreak < IEM_BNG_MINBREAKFLASHTIME) ftbreak = IEM_BNG_MINBREAKFLASHTIME;
! if( fthold < IEM_BNG_MINHOLDFLASHTIME) fthold = IEM_BNG_MINHOLDFLASHTIME;
x->x_flashtime_break = ftbreak;
x->x_flashtime_hold = fthold;
***************
*** 361,365 ****
int fs=8;
int ftbreak=IEM_BNG_DEFAULTBREAKFLASHTIME,
! fthold=IEM_BNG_DEFAULTHOLDFLASHTIME;
char str[144];
--- 357,361 ----
int fs=8;
int ftbreak=IEM_BNG_DEFAULTBREAKFLASHTIME,
! fthold= IEM_BNG_DEFAULTHOLDFLASHTIME;
char str[144];
***************
*** 367,395 ****
iem_inttofstyle(&x->x_gui.x_fsf, 0);
! if((argc == 14)&&IS_A_FLOAT(argv,0)
! &&IS_A_FLOAT(argv,1)&&IS_A_FLOAT(argv,2)
! &&IS_A_FLOAT(argv,3)
! &&(IS_A_SYMBOL(argv,4)||IS_A_FLOAT(argv,4))
! &&(IS_A_SYMBOL(argv,5)||IS_A_FLOAT(argv,5))
! &&(IS_A_SYMBOL(argv,6)||IS_A_FLOAT(argv,6))
! &&IS_A_FLOAT(argv,7)&&IS_A_FLOAT(argv,8)
! &&IS_A_FLOAT(argv,9)&&IS_A_FLOAT(argv,10)&&IS_A_FLOAT(argv,11)
! &&IS_A_FLOAT(argv,12)&&IS_A_FLOAT(argv,13))
{
-
- a = (int)atom_getintarg(0, argc, argv);
- fthold = (int)atom_getintarg(1, argc, argv);
- ftbreak = (int)atom_getintarg(2, argc, argv);
iem_inttosymargs(&x->x_gui.x_isa, atom_getintarg(3, argc, argv));
iemgui_new_getnames(&x->x_gui, 4, argv);
- ldx = (int)atom_getintarg(7, argc, argv);
- ldy = (int)atom_getintarg(8, argc, argv);
iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(9, argc, argv));
- fs = (int)atom_getintarg(10, argc, argv);
- bflcol[0] = (int)atom_getintarg(11, argc, argv);
- bflcol[1] = (int)atom_getintarg(12, argc, argv);
- bflcol[2] = (int)atom_getintarg(13, argc, argv);
}
! else iemgui_new_getnames(&x->x_gui, 4, 0);
x->x_gui.x_draw = (t_iemfunptr)bng_draw;
--- 363,376 ----
iem_inttofstyle(&x->x_gui.x_fsf, 0);
! if (pd_scanargs(argc,argv,"iiiF???iiFiiii",&a,&fthold,&ftbreak,
! &ldx,&ldy,&fs,&bflcol[0],&bflcol[1],&bflcol[2]))
{
iem_inttosymargs(&x->x_gui.x_isa, atom_getintarg(3, argc, argv));
iemgui_new_getnames(&x->x_gui, 4, argv);
iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(9, argc, argv));
}
! else {
! iemgui_new_getnames(&x->x_gui, 4, 0);
! }
x->x_gui.x_draw = (t_iemfunptr)bng_draw;
***************
*** 399,406 ****
x->x_flashed = 0;
x->x_gui.x_glist = (t_glist *)canvas_getcurrent();
! if (!strcmp(x->x_gui.x_snd->s_name, "empty"))
! x->x_gui.x_fsf.x_snd_able = 0;
! if (!strcmp(x->x_gui.x_rcv->s_name, "empty"))
! x->x_gui.x_fsf.x_rcv_able = 0;
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");
--- 380,385 ----
x->x_flashed = 0;
x->x_gui.x_glist = (t_glist *)canvas_getcurrent();
! if (!strcmp(x->x_gui.x_snd->s_name, "empty")) x->x_gui.x_fsf.x_snd_able = 0;
! if (!strcmp(x->x_gui.x_rcv->s_name, "empty")) x->x_gui.x_fsf.x_rcv_able = 0;
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");
Index: g_hdial.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_hdial.c,v
retrieving revision 1.1.1.4.2.2.2.2
retrieving revision 1.1.1.4.2.2.2.3
diff -C2 -d -r1.1.1.4.2.2.2.2 -r1.1.1.4.2.2.2.3
*** g_hdial.c 6 Mar 2004 20:56:29 -0000 1.1.1.4.2.2.2.2
--- g_hdial.c 7 Mar 2004 19:38:13 -0000 1.1.1.4.2.2.2.3
***************
*** 3,7 ****
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
! /* g_7_guis.c written by Thomas Musil (c) IEM KUG Graz Austria 2000-2001 */
/* thanks to Miller Puckette, Guenther Geiger and Krzystof Czaja */
--- 3,7 ----
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
! /* hdial.c written by Thomas Musil (c) IEM KUG Graz Austria 2000-2001 */
/* thanks to Miller Puckette, Guenther Geiger and Krzystof Czaja */
***************
*** 19,30 ****
#include <math.h>
- #ifdef MSW
- #include <io.h>
- #else
- #include <unistd.h>
- #endif
-
- /* ------------- hdl gui-horicontal dial ---------------------- */
-
t_widgetbehavior hradio_widgetbehavior;
static t_class *hradio_class, *hradio_old_class;
--- 19,22 ----
***************
*** 68,71 ****
--- 60,64 ----
!x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,
x->x_number,x->x_gui.x_bcol);
+ sys_vgui("radio_set .x%x.c %x %d\n",canvas,x,x->x_on);
sys_vgui(".x%x.c coords %xLABEL %d %d\n",
canvas, x, x1+x->x_gui.x_ldx, y1+x->x_gui.x_ldy);
***************
*** 190,194 ****
canvas_fixlinesfor(glist_getcanvas(x->x_gui.x_glist), (t_text*)x);
}
-
}
--- 183,186 ----
***************
*** 256,259 ****
--- 248,252 ----
if (pd_class(&x->x_gui.x_obj.ob_pd) == hradio_old_class)
{
+ /* compatibility with earlier "hdial" behavior */
if((x->x_change)&&(i != x->x_on_old))
{
***************
*** 336,350 ****
}
! static void hradio_click(t_hradio *x, t_floatarg xpos, t_floatarg ypos, t_floatarg shift, t_floatarg ctrl, t_floatarg alt)
{
int xx = (int)xpos - (int)text_xpix(&x->x_gui.x_obj, x->x_gui.x_glist);
-
hradio_fout(x, (float)(xx / x->x_gui.x_w));
}
! static int hradio_newclick(t_gobj *z, struct _glist *glist, int xpix, int ypix, int shift, int alt, int dbl, int doit)
{
if(doit)
! hradio_click((t_hradio *)z, (t_floatarg)xpix, (t_floatarg)ypix, (t_floatarg)shift, 0, (t_floatarg)alt);
return (1);
}
--- 329,345 ----
}
! static void hradio_click(t_hradio *x, t_floatarg xpos, t_floatarg ypos,
! t_floatarg shift, t_floatarg ctrl, t_floatarg alt)
{
int xx = (int)xpos - (int)text_xpix(&x->x_gui.x_obj, x->x_gui.x_glist);
hradio_fout(x, (float)(xx / x->x_gui.x_w));
}
! static int hradio_newclick(t_gobj *z, struct _glist *glist,
! int xpix, int ypix, int shift, int alt, int dbl, int doit)
{
if(doit)
! hradio_click((t_hradio *)z, (t_floatarg)xpix, (t_floatarg)ypix,
! (t_floatarg)shift, 0, (t_floatarg)alt);
return (1);
}
***************
*** 430,455 ****
iem_inttofstyle(&x->x_gui.x_fsf, 0);
! if((argc == 15)&&IS_A_FLOAT(argv,0)&&IS_A_FLOAT(argv,1)&&IS_A_FLOAT(argv,2)
! &&IS_A_FLOAT(argv,3)
! &&(IS_A_SYMBOL(argv,4)||IS_A_FLOAT(argv,4))
! &&(IS_A_SYMBOL(argv,5)||IS_A_FLOAT(argv,5))
! &&(IS_A_SYMBOL(argv,6)||IS_A_FLOAT(argv,6))
! &&IS_A_FLOAT(argv,7)&&IS_A_FLOAT(argv,8)
! &&IS_A_FLOAT(argv,9)&&IS_A_FLOAT(argv,10)&&IS_A_FLOAT(argv,11)
! &&IS_A_FLOAT(argv,12)&&IS_A_FLOAT(argv,13)&&IS_A_FLOAT(argv,14))
{
- a = (int)atom_getintarg(0, argc, argv);
- chg = (int)atom_getintarg(1, argc, argv);
iem_inttosymargs(&x->x_gui.x_isa, atom_getintarg(2, argc, argv));
- num = (int)atom_getintarg(3, argc, argv);
iemgui_new_getnames(&x->x_gui, 4, argv);
- ldx = (int)atom_getintarg(7, argc, argv);
- ldy = (int)atom_getintarg(8, argc, argv);
iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(9, argc, argv));
- fs = (int)atom_getintarg(10, argc, argv);
- bflcol[0] = (int)atom_getintarg(11, argc, argv);
- bflcol[1] = (int)atom_getintarg(12, argc, argv);
- bflcol[2] = (int)atom_getintarg(13, argc, argv);
- on = (int)atom_getintarg(14, argc, argv);
}
else iemgui_new_getnames(&x->x_gui, 4, 0);
--- 425,434 ----
iem_inttofstyle(&x->x_gui.x_fsf, 0);
! if(pd_scanargs(argc,argv,"iiFi???iiFiiiii",
! &a,&chg,&num,&ldx,&ldy,&fs,&bflcol[0],&bflcol[1],&bflcol[2],&on))
{
iem_inttosymargs(&x->x_gui.x_isa, atom_getintarg(2, argc, argv));
iemgui_new_getnames(&x->x_gui, 4, argv);
iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(9, argc, argv));
}
else iemgui_new_getnames(&x->x_gui, 4, 0);
***************
*** 458,465 ****
x->x_gui.x_fsf.x_rcv_able = 1;
x->x_gui.x_glist = (t_glist *)canvas_getcurrent();
! if (!strcmp(x->x_gui.x_snd->s_name, "empty"))
! x->x_gui.x_fsf.x_snd_able = 0;
! if (!strcmp(x->x_gui.x_rcv->s_name, "empty"))
! x->x_gui.x_fsf.x_rcv_able = 0;
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");
--- 437,442 ----
x->x_gui.x_fsf.x_rcv_able = 1;
x->x_gui.x_glist = (t_glist *)canvas_getcurrent();
! if (!strcmp(x->x_gui.x_snd->s_name, "empty")) x->x_gui.x_fsf.x_snd_able = 0;
! if (!strcmp(x->x_gui.x_rcv->s_name, "empty")) x->x_gui.x_fsf.x_rcv_able = 0;
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");
***************
*** 576,611 ****
class_addmethod(hradio_old_class, (t_method)hradio_click, gensym("click"),
A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_dialog, gensym("dialog"),
! A_GIMME, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_loadbang,
! gensym("loadbang"), 0);
! class_addmethod(hradio_old_class, (t_method)hradio_set,
! gensym("set"), A_FLOAT, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_size,
! gensym("size"), A_GIMME, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_delta,
! gensym("delta"), A_GIMME, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_pos,
! gensym("pos"), A_GIMME, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_color,
! gensym("color"), A_GIMME, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_send,
! gensym("send"), A_DEFSYM, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_receive,
! gensym("receive"), A_DEFSYM, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_label,
! gensym("label"), A_DEFSYM, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_label_pos,
! gensym("label_pos"), A_GIMME, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_label_font,
! gensym("label_font"), A_GIMME, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_init,
! gensym("init"), A_FLOAT, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_number,
! gensym("number"), A_FLOAT, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_single_change,
! gensym("single_change"), 0);
! class_addmethod(hradio_old_class, (t_method)hradio_double_change,
! gensym("double_change"), 0);
class_setwidget(hradio_old_class, &hradio_widgetbehavior);
class_sethelpsymbol(hradio_old_class, gensym("hradio"));
--- 553,572 ----
class_addmethod(hradio_old_class, (t_method)hradio_click, gensym("click"),
A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_dialog, gensym("dialog"), A_GIMME, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_loadbang, gensym("loadbang"), 0);
! class_addmethod(hradio_old_class, (t_method)hradio_set, gensym("set"), A_FLOAT, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_size, gensym("size"), A_GIMME, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_delta, gensym("delta"), A_GIMME, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_pos, gensym("pos"), A_GIMME, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_color, gensym("color"), A_GIMME, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_send, gensym("send"), A_DEFSYM, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_receive, gensym("receive"), A_DEFSYM, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_label, gensym("label"), A_DEFSYM, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_label_pos, gensym("label_pos"), A_GIMME, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_label_font, gensym("label_font"), A_GIMME, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_init, gensym("init"), A_FLOAT, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_number, gensym("number"), A_FLOAT, 0);
! class_addmethod(hradio_old_class, (t_method)hradio_single_change, gensym("single_change"), 0);
! class_addmethod(hradio_old_class, (t_method)hradio_double_change, gensym("double_change"), 0);
class_setwidget(hradio_old_class, &hradio_widgetbehavior);
class_sethelpsymbol(hradio_old_class, gensym("hradio"));
Index: g_hslider.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_hslider.c,v
retrieving revision 1.1.1.3.2.2.2.2
retrieving revision 1.1.1.3.2.2.2.3
diff -C2 -d -r1.1.1.3.2.2.2.2 -r1.1.1.3.2.2.2.3
*** g_hslider.c 6 Mar 2004 22:14:39 -0000 1.1.1.3.2.2.2.2
--- g_hslider.c 7 Mar 2004 19:38:13 -0000 1.1.1.3.2.2.2.3
***************
*** 23,29 ****
#endif
-
- /* ------------ hsl gui-horicontal slider ----------------------- */
-
t_widgetbehavior hslider_widgetbehavior;
static t_class *hslider_class;
--- 23,26 ----
***************
*** 35,41 ****
t_canvas *canvas=glist_getcanvas(glist);
if (glist_isvisible(glist))
! {
! sys_vgui("slider_set .x%x.c %x %d 0 #%6.6x\n", canvas, x, x->x_val, x->x_gui.x_fcol);
! }
}
--- 32,36 ----
t_canvas *canvas=glist_getcanvas(glist);
if (glist_isvisible(glist))
! {sys_vgui("slider_set .x%x.c %x %d 0 #%6.6x\n", canvas, x, x->x_val, x->x_gui.x_fcol);}
}
***************
*** 46,58 ****
t_canvas *canvas=glist_getcanvas(glist);
sys_vgui("slider_draw .x%x.c %x %d %d %d %d %d %d 0 #%6.6x\n",
! canvas, x, xpos, ypos, xpos+x->x_gui.x_w, ypos+x->x_gui.x_h,
! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,x->x_gui.x_bcol);
sys_vgui("slider_set .x%x.c %x %d 0 #%6.6x\n", canvas, x, x->x_val, x->x_gui.x_fcol);
sys_vgui(".x%x.c create text %d %d -text {%s} -anchor w \
! -font {%s %d bold} -fill #%6.6x -tags %xLABEL\n",
! canvas, xpos+x->x_gui.x_ldx,
! ypos+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);
}
--- 41,52 ----
t_canvas *canvas=glist_getcanvas(glist);
sys_vgui("slider_draw .x%x.c %x %d %d %d %d %d %d 0 #%6.6x\n",
! canvas, x, xpos, ypos, xpos+x->x_gui.x_w, ypos+x->x_gui.x_h,
! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,x->x_gui.x_bcol);
sys_vgui("slider_set .x%x.c %x %d 0 #%6.6x\n", canvas, x, x->x_val, x->x_gui.x_fcol);
sys_vgui(".x%x.c create text %d %d -text {%s} -anchor w \
! -font {%s %d bold} -fill #%6.6x -tags %xLABEL\n",
! canvas, xpos+x->x_gui.x_ldx, ypos+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);
}
***************
*** 63,71 ****
t_canvas *canvas=glist_getcanvas(glist);
sys_vgui("slider_draw .x%x.c %x %d %d %d %d %d %d 0 #%6.6x\n",
! canvas, x, xpos, ypos, xpos+x->x_gui.x_w, ypos+x->x_gui.x_h,
! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,x->x_gui.x_bcol);
sys_vgui("slider_set .x%x.c %x %d 0 #%6.6x\n", canvas, x, x->x_val, x->x_gui.x_fcol);
sys_vgui(".x%x.c coords %xLABEL %d %d\n",
! canvas, x, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy);
}
--- 57,65 ----
t_canvas *canvas=glist_getcanvas(glist);
sys_vgui("slider_draw .x%x.c %x %d %d %d %d %d %d 0 #%6.6x\n",
! canvas, x, xpos, ypos, xpos+x->x_gui.x_w, ypos+x->x_gui.x_h,
! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,x->x_gui.x_bcol);
sys_vgui("slider_set .x%x.c %x %d 0 #%6.6x\n", canvas, x, x->x_val, x->x_gui.x_fcol);
sys_vgui(".x%x.c coords %xLABEL %d %d\n",
! canvas, x, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy);
}
***************
*** 81,84 ****
--- 75,79 ----
t_canvas *canvas=glist_getcanvas(glist);
int xpos=text_xpix(&x->x_gui.x_obj, glist);
+ int ypos=text_ypix(&x->x_gui.x_obj, glist);
sys_vgui(".x%x.c itemconfigure %xLABEL -font {%s %d bold} -fill #%6.6x -text {%s} \n",
canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize,
***************
*** 99,103 ****
void hslider_draw(t_hslider *x, t_glist *glist, int mode)
{
! if(mode == IEM_GUI_DRAW_MODE_UPDATE) hslider_draw_update(x, glist);
else if(mode == IEM_GUI_DRAW_MODE_MOVE) hslider_draw_move(x, glist);
else if(mode == IEM_GUI_DRAW_MODE_NEW) hslider_draw_new(x, glist);
--- 94,98 ----
void hslider_draw(t_hslider *x, t_glist *glist, int mode)
{
! if (mode == IEM_GUI_DRAW_MODE_UPDATE) hslider_draw_update(x, glist);
else if(mode == IEM_GUI_DRAW_MODE_MOVE) hslider_draw_move(x, glist);
else if(mode == IEM_GUI_DRAW_MODE_NEW) hslider_draw_new(x, glist);
***************
*** 425,430 ****
int bflcol[]={-262144, -1, -1};
int w=IEM_SL_DEFAULTSIZE, h=IEM_GUI_DEFAULTSIZE;
! int lilo=0, ldx=-2, ldy=-6, f=0, v=0, steady=1;
! int fs=8;
double min=0.0, max=(double)(IEM_SL_DEFAULTSIZE-1);
char str[144];
--- 420,424 ----
int bflcol[]={-262144, -1, -1};
int w=IEM_SL_DEFAULTSIZE, h=IEM_GUI_DEFAULTSIZE;
! int lilo=0, ldx=-2, ldy=-6, f=0, v=0, steady=1, fs=8;
double min=0.0, max=(double)(IEM_SL_DEFAULTSIZE-1);
char str[144];
***************
*** 433,471 ****
iem_inttofstyle(&x->x_gui.x_fsf, 0);
! if(((argc == 17)||(argc == 18))&&IS_A_FLOAT(argv,0)&&IS_A_FLOAT(argv,1)
! &&IS_A_FLOAT(argv,2)&&IS_A_FLOAT(argv,3)
! &&IS_A_FLOAT(argv,4)&&IS_A_FLOAT(argv,5)
! &&(IS_A_SYMBOL(argv,6)||IS_A_FLOAT(argv,6))
! &&(IS_A_SYMBOL(argv,7)||IS_A_FLOAT(argv,7))
! &&(IS_A_SYMBOL(argv,8)||IS_A_FLOAT(argv,8))
! &&IS_A_FLOAT(argv,9)&&IS_A_FLOAT(argv,10)
! &&IS_A_FLOAT(argv,11)&&IS_A_FLOAT(argv,12)&&IS_A_FLOAT(argv,13)
! &&IS_A_FLOAT(argv,14)&&IS_A_FLOAT(argv,15)&&IS_A_FLOAT(argv,16))
{
- w = (int)atom_getintarg(0, argc, argv);
- h = (int)atom_getintarg(1, argc, argv);
- min = (double)atom_getfloatarg(2, argc, argv);
- max = (double)atom_getfloatarg(3, argc, argv);
- lilo = (int)atom_getintarg(4, argc, argv);
iem_inttosymargs(&x->x_gui.x_isa, atom_getintarg(5, argc, argv));
iemgui_new_getnames(&x->x_gui, 6, argv);
- ldx = (int)atom_getintarg(9, argc, argv);
- ldy = (int)atom_getintarg(10, argc, argv);
iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(11, argc, argv));
- fs = (int)atom_getintarg(12, argc, argv);
- bflcol[0] = (int)atom_getintarg(13, argc, argv);
- bflcol[1] = (int)atom_getintarg(14, argc, argv);
- bflcol[2] = (int)atom_getintarg(15, argc, argv);
- v = (int)atom_getintarg(16, argc, argv);
}
else iemgui_new_getnames(&x->x_gui, 6, 0);
if((argc == 18)&&IS_A_FLOAT(argv,17))
steady = (int)atom_getintarg(17, argc, argv);
-
x->x_gui.x_draw = (t_iemfunptr)hslider_draw;
-
x->x_gui.x_fsf.x_snd_able = 1;
x->x_gui.x_fsf.x_rcv_able = 1;
-
x->x_gui.x_glist = (t_glist *)canvas_getcurrent();
if(x->x_gui.x_isa.x_loadinit)
--- 427,443 ----
iem_inttofstyle(&x->x_gui.x_fsf, 0);
! if(pd_scanargs(argc,argv,"iiffiF???iiFiiiii?;?",
! &w,&h,&min,&max,&lilo,&ldx,&ldy,&fs,&bflcol[0],&bflcol[1],&bflcol[2],&v))
{
iem_inttosymargs(&x->x_gui.x_isa, atom_getintarg(5, argc, argv));
iemgui_new_getnames(&x->x_gui, 6, argv);
iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(11, argc, argv));
}
else iemgui_new_getnames(&x->x_gui, 6, 0);
if((argc == 18)&&IS_A_FLOAT(argv,17))
steady = (int)atom_getintarg(17, argc, argv);
x->x_gui.x_draw = (t_iemfunptr)hslider_draw;
x->x_gui.x_fsf.x_snd_able = 1;
x->x_gui.x_fsf.x_rcv_able = 1;
x->x_gui.x_glist = (t_glist *)canvas_getcurrent();
if(x->x_gui.x_isa.x_loadinit)
***************
*** 478,491 ****
if(steady != 0) steady = 1;
x->x_steady = steady;
! if (!strcmp(x->x_gui.x_snd->s_name, "empty"))
! x->x_gui.x_fsf.x_snd_able = 0;
! if (!strcmp(x->x_gui.x_rcv->s_name, "empty"))
! x->x_gui.x_fsf.x_rcv_able = 0;
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"); }
! if(x->x_gui.x_fsf.x_rcv_able)
! pd_bind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv);
x->x_gui.x_ldx = ldx;
x->x_gui.x_ldy = ldy;
--- 450,460 ----
if(steady != 0) steady = 1;
x->x_steady = steady;
! if (!strcmp(x->x_gui.x_snd->s_name, "empty")) x->x_gui.x_fsf.x_snd_able = 0;
! if (!strcmp(x->x_gui.x_rcv->s_name, "empty")) x->x_gui.x_fsf.x_rcv_able = 0;
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"); }
! if(x->x_gui.x_fsf.x_rcv_able) pd_bind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv);
x->x_gui.x_ldx = ldx;
x->x_gui.x_ldy = ldy;
Index: g_mycanvas.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_mycanvas.c,v
retrieving revision 1.1.1.3.2.2
retrieving revision 1.1.1.3.2.2.2.1
diff -C2 -d -r1.1.1.3.2.2 -r1.1.1.3.2.2.2.1
*** g_mycanvas.c 18 Nov 2003 10:34:10 -0000 1.1.1.3.2.2
--- g_mycanvas.c 7 Mar 2004 19:38:13 -0000 1.1.1.3.2.2.2.1
***************
*** 106,119 ****
void my_canvas_draw(t_my_canvas *x, t_glist *glist, int mode)
{
! if(mode == IEM_GUI_DRAW_MODE_MOVE)
! my_canvas_draw_move(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_NEW)
! my_canvas_draw_new(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_SELECT)
! my_canvas_draw_select(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_ERASE)
! my_canvas_draw_erase(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_CONFIG)
! my_canvas_draw_config(x, glist);
}
--- 106,114 ----
void my_canvas_draw(t_my_canvas *x, t_glist *glist, int mode)
{
! if(mode == IEM_GUI_DRAW_MODE_MOVE) my_canvas_draw_move(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_NEW) my_canvas_draw_new(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_SELECT) my_canvas_draw_select(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_ERASE) my_canvas_draw_erase(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_CONFIG) my_canvas_draw_config(x, glist);
}
Index: g_numbox.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_numbox.c,v
retrieving revision 1.1.1.4.2.2.2.1
retrieving revision 1.1.1.4.2.2.2.2
diff -C2 -d -r1.1.1.4.2.2.2.1 -r1.1.1.4.2.2.2.2
*** g_numbox.c 5 Mar 2004 19:27:52 -0000 1.1.1.4.2.2.2.1
--- g_numbox.c 7 Mar 2004 19:38:13 -0000 1.1.1.4.2.2.2.2
***************
*** 680,708 ****
char str[144];
! if((argc >= 17)&&IS_A_FLOAT(argv,0)&&IS_A_FLOAT(argv,1)
! &&IS_A_FLOAT(argv,2)&&IS_A_FLOAT(argv,3)
! &&IS_A_FLOAT(argv,4)&&IS_A_FLOAT(argv,5)
! &&(IS_A_SYMBOL(argv,6)||IS_A_FLOAT(argv,6))
! &&(IS_A_SYMBOL(argv,7)||IS_A_FLOAT(argv,7))
! &&(IS_A_SYMBOL(argv,8)||IS_A_FLOAT(argv,8))
! &&IS_A_FLOAT(argv,9)&&IS_A_FLOAT(argv,10)
! &&IS_A_FLOAT(argv,11)&&IS_A_FLOAT(argv,12)&&IS_A_FLOAT(argv,13)
! &&IS_A_FLOAT(argv,14)&&IS_A_FLOAT(argv,15)&&IS_A_FLOAT(argv,16))
{
- w = (int)atom_getintarg(0, argc, argv);
- h = (int)atom_getintarg(1, argc, argv);
- min = (double)atom_getfloatarg(2, argc, argv);
- max = (double)atom_getfloatarg(3, argc, argv);
- lilo = (int)atom_getintarg(4, argc, argv);
iem_inttosymargs(&x->x_gui.x_isa, atom_getintarg(5, argc, argv));
iemgui_new_getnames(&x->x_gui, 6, argv);
- ldx = (int)atom_getintarg(9, argc, argv);
- ldy = (int)atom_getintarg(10, argc, argv);
iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(11, argc, argv));
- fs = (int)atom_getintarg(12, argc, argv);
- bflcol[0] = (int)atom_getintarg(13, argc, argv);
- bflcol[1] = (int)atom_getintarg(14, argc, argv);
- bflcol[2] = (int)atom_getintarg(15, argc, argv);
- v = atom_getfloatarg(16, argc, argv);
}
else iemgui_new_getnames(&x->x_gui, 6, 0);
--- 680,689 ----
char str[144];
! if(pd_scanargs(argc,argv,"iiffiF???ii?iiiif*",&w,&h,&min,&max,&lilo,
! &ldx,&ldy,&fs,&bflcol[0],&bflcol[1],&bflcol[2],&v))
{
iem_inttosymargs(&x->x_gui.x_isa, atom_getintarg(5, argc, argv));
iemgui_new_getnames(&x->x_gui, 6, argv);
iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(11, argc, argv));
}
else iemgui_new_getnames(&x->x_gui, 6, 0);
***************
*** 724,731 ****
log_height = 10;
x->x_log_height = log_height;
! if (!strcmp(x->x_gui.x_snd->s_name, "empty"))
! x->x_gui.x_fsf.x_snd_able = 0;
! if (!strcmp(x->x_gui.x_rcv->s_name, "empty"))
! x->x_gui.x_fsf.x_rcv_able = 0;
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");
--- 705,710 ----
log_height = 10;
x->x_log_height = log_height;
! if (!strcmp(x->x_gui.x_snd->s_name, "empty")) x->x_gui.x_fsf.x_snd_able = 0;
! if (!strcmp(x->x_gui.x_rcv->s_name, "empty")) x->x_gui.x_fsf.x_rcv_able = 0;
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");
Index: g_toggle.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_toggle.c,v
retrieving revision 1.1.1.3.2.2.2.1
retrieving revision 1.1.1.3.2.2.2.2
diff -C2 -d -r1.1.1.3.2.2.2.1 -r1.1.1.3.2.2.2.2
*** g_toggle.c 5 Mar 2004 19:27:52 -0000 1.1.1.3.2.2.2.1
--- g_toggle.c 7 Mar 2004 19:38:13 -0000 1.1.1.3.2.2.2.2
***************
*** 158,175 ****
void toggle_draw(t_toggle *x, t_glist *glist, int mode)
{
! if(mode == IEM_GUI_DRAW_MODE_UPDATE)
! toggle_draw_update(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_MOVE)
! toggle_draw_move(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_NEW)
! toggle_draw_new(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_SELECT)
! toggle_draw_select(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_ERASE)
! toggle_draw_erase(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_CONFIG)
! toggle_draw_config(x, glist);
! else if(mode >= IEM_GUI_DRAW_MODE_IO)
! toggle_draw_io(x, glist, mode - IEM_GUI_DRAW_MODE_IO);
}
--- 158,168 ----
void toggle_draw(t_toggle *x, t_glist *glist, int mode)
{
! if (mode == IEM_GUI_DRAW_MODE_UPDATE) toggle_draw_update(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_MOVE) toggle_draw_move(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_NEW) toggle_draw_new(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_SELECT) toggle_draw_select(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_ERASE) toggle_draw_erase(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_CONFIG) toggle_draw_config(x, glist);
! else if(mode >= IEM_GUI_DRAW_MODE_IO) toggle_draw_io(x, glist, mode - IEM_GUI_DRAW_MODE_IO);
}
***************
*** 358,381 ****
iem_inttofstyle(&x->x_gui.x_fsf, 0);
! if(((argc == 13)||(argc == 14))&&IS_A_FLOAT(argv,0)
! &&IS_A_FLOAT(argv,1)
! &&(IS_A_SYMBOL(argv,2)||IS_A_FLOAT(argv,2))
! &&(IS_A_SYMBOL(argv,3)||IS_A_FLOAT(argv,3))
! &&(IS_A_SYMBOL(argv,4)||IS_A_FLOAT(argv,4))
! &&IS_A_FLOAT(argv,5)&&IS_A_FLOAT(argv,6)
! &&IS_A_FLOAT(argv,7)&&IS_A_FLOAT(argv,8)&&IS_A_FLOAT(argv,9)
! &&IS_A_FLOAT(argv,10)&&IS_A_FLOAT(argv,11)&&IS_A_FLOAT(argv,12))
{
- a = (int)atom_getintarg(0, argc, argv);
iem_inttosymargs(&x->x_gui.x_isa, atom_getintarg(1, argc, argv));
iemgui_new_getnames(&x->x_gui, 2, argv);
- ldx = (int)atom_getintarg(5, argc, argv);
- ldy = (int)atom_getintarg(6, argc, argv);
iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(7, argc, argv));
- fs = (int)atom_getintarg(8, argc, 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);
}
else iemgui_new_getnames(&x->x_gui, 2, 0);
--- 351,360 ----
iem_inttofstyle(&x->x_gui.x_fsf, 0);
! if(pd_scanargs(argc,argv,"iF???iiFiiiii;?",
! &a,&ldx,&ldy,&fs,&bflcol[0],&bflcol[1],&bflcol[2],&on))
{
iem_inttosymargs(&x->x_gui.x_isa, atom_getintarg(1, argc, argv));
iemgui_new_getnames(&x->x_gui, 2, argv);
iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(7, argc, argv));
}
else iemgui_new_getnames(&x->x_gui, 2, 0);
***************
*** 387,394 ****
x->x_gui.x_fsf.x_rcv_able = 1;
x->x_gui.x_glist = (t_glist *)canvas_getcurrent();
! if (!strcmp(x->x_gui.x_snd->s_name, "empty"))
! x->x_gui.x_fsf.x_snd_able = 0;
! if (!strcmp(x->x_gui.x_rcv->s_name, "empty"))
! x->x_gui.x_fsf.x_rcv_able = 0;
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");
--- 366,371 ----
x->x_gui.x_fsf.x_rcv_able = 1;
x->x_gui.x_glist = (t_glist *)canvas_getcurrent();
! if (!strcmp(x->x_gui.x_snd->s_name, "empty")) x->x_gui.x_fsf.x_snd_able = 0;
! if (!strcmp(x->x_gui.x_rcv->s_name, "empty")) x->x_gui.x_fsf.x_rcv_able = 0;
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");
Index: g_vdial.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_vdial.c,v
retrieving revision 1.1.1.4.2.2.2.2
retrieving revision 1.1.1.4.2.2.2.3
diff -C2 -d -r1.1.1.4.2.2.2.2 -r1.1.1.4.2.2.2.3
*** g_vdial.c 6 Mar 2004 20:56:29 -0000 1.1.1.4.2.2.2.2
--- g_vdial.c 7 Mar 2004 19:38:13 -0000 1.1.1.4.2.2.2.3
***************
*** 4,7 ****
--- 4,8 ----
/* vdial.c written by Thomas Musil (c) IEM KUG Graz Austria 2000-2001 */
+ /* thanks to Miller Puckette, Guenther Geiger and Krzystof Czaja */
/* name change to vradio by MSP (it's a radio button really) and changed to
***************
*** 18,23 ****
#include <math.h>
- /* ------------- vdl gui-vertical radio button ---------------------- */
-
t_widgetbehavior vradio_widgetbehavior;
static t_class *vradio_class, *vradio_old_class;
--- 19,22 ----
***************
*** 45,53 ****
sys_vgui("radio_set .x%x.c %x %d\n",canvas,x,x->x_on);
sys_vgui(".x%x.c create text %d %d -text {%s} -anchor w \
! -font {%s %d bold} -fill #%6.6x -tags %xLABEL\n",
! canvas, x1+x->x_gui.x_ldx, y1+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);
}
--- 44,51 ----
sys_vgui("radio_set .x%x.c %x %d\n",canvas,x,x->x_on);
sys_vgui(".x%x.c create text %d %d -text {%s} -anchor w \
! -font {%s %d bold} -fill #%6.6x -tags %xLABEL\n",
! canvas, x1+x->x_gui.x_ldx, y1+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);
}
***************
*** 58,62 ****
int x1=text_xpix(&x->x_gui.x_obj, glist), x2=x1+x->x_gui.x_w;
int y1=text_ypix(&x->x_gui.x_obj, glist), y2=y1+x->x_gui.x_h*x->x_number;
! sys_vgui("radio_draw .x%x.c %x %d %d %d %d %d %d 0 %d #%6.6x\n",
canvas, x, x1, y1, x2, y2,
!x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,
--- 56,60 ----
int x1=text_xpix(&x->x_gui.x_obj, glist), x2=x1+x->x_gui.x_w;
int y1=text_ypix(&x->x_gui.x_obj, glist), y2=y1+x->x_gui.x_h*x->x_number;
! sys_vgui("radio_draw .x%x.c %x %d %d %d %d %d %d 1 %d #%6.6x\n",
canvas, x, x1, y1, x2, y2,
!x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,
***************
*** 87,91 ****
void vradio_draw(t_vradio *x, t_glist *glist, int mode)
{
! if(mode == IEM_GUI_DRAW_MODE_UPDATE) vradio_draw_update(x, glist);
else if(mode == IEM_GUI_DRAW_MODE_MOVE) vradio_draw_move(x, glist);
else if(mode == IEM_GUI_DRAW_MODE_NEW) vradio_draw_new(x, glist);
--- 85,89 ----
void vradio_draw(t_vradio *x, t_glist *glist, int mode)
{
! if (mode == IEM_GUI_DRAW_MODE_UPDATE) vradio_draw_update(x, glist);
else if(mode == IEM_GUI_DRAW_MODE_MOVE) vradio_draw_move(x, glist);
else if(mode == IEM_GUI_DRAW_MODE_NEW) vradio_draw_new(x, glist);
***************
*** 116,121 ****
iemgui_save(&x->x_gui, srl, bflcol);
binbuf_addv(b, "ssiisiiiisssiiiiiiii", gensym("#X"),gensym("obj"),
! (t_int)x->x_gui.x_obj.te_xpix,
! (t_int)x->x_gui.x_obj.te_ypix,
(pd_class(&x->x_gui.x_obj.ob_pd) == vradio_old_class ?
gensym("vdl") : gensym("vradio")),
--- 114,119 ----
iemgui_save(&x->x_gui, srl, bflcol);
binbuf_addv(b, "ssiisiiiisssiiiiiiii", gensym("#X"),gensym("obj"),
! (t_int)text_xpix(&x->x_gui.x_obj, x->x_gui.x_glist),
! (t_int)text_ypix(&x->x_gui.x_obj, x->x_gui.x_glist),
(pd_class(&x->x_gui.x_obj.ob_pd) == vradio_old_class ?
gensym("vdl") : gensym("vradio")),
***************
*** 157,161 ****
{
t_symbol *srl[3];
! int a = (int)atom_getintarg(0, argc, argv);
int chg = (int)atom_getintarg(4, argc, argv);
int num = (int)atom_getintarg(6, argc, argv);
--- 155,159 ----
{
t_symbol *srl[3];
! int a = (int)atom_getintarg(0, argc, argv);
int chg = (int)atom_getintarg(4, argc, argv);
int num = (int)atom_getintarg(6, argc, argv);
***************
*** 190,194 ****
{
int i=(int)f;
! int old;
if(i < 0)
--- 188,192 ----
{
int i=(int)f;
! int old=x->x_on_old;
if(i < 0)
***************
*** 334,339 ****
t_floatarg shift, t_floatarg ctrl, t_floatarg alt)
{
! int yy = (int)ypos - text_ypix(&x->x_gui.x_obj, x->x_gui.x_glist);
!
vradio_fout(x, (float)(yy / x->x_gui.x_h));
}
--- 332,336 ----
t_floatarg shift, t_floatarg ctrl, t_floatarg alt)
{
! int yy = (int)ypos - (int)text_ypix(&x->x_gui.x_obj, x->x_gui.x_glist);
vradio_fout(x, (float)(yy / x->x_gui.x_h));
}
***************
*** 425,450 ****
char str[144];
! if((argc == 15)&&IS_A_FLOAT(argv,0)&&IS_A_FLOAT(argv,1)&&IS_A_FLOAT(argv,2)
! &&IS_A_FLOAT(argv,3)
! &&(IS_A_SYMBOL(argv,4)||IS_A_FLOAT(argv,4))
! &&(IS_A_SYMBOL(argv,5)||IS_A_FLOAT(argv,5))
! &&(IS_A_SYMBOL(argv,6)||IS_A_FLOAT(argv,6))
! &&IS_A_FLOAT(argv,7)&&IS_A_FLOAT(argv,8)
! &&IS_A_FLOAT(argv,9)&&IS_A_FLOAT(argv,10)&&IS_A_FLOAT(argv,11)
! &&IS_A_FLOAT(argv,12)&&IS_A_FLOAT(argv,13)&&IS_A_FLOAT(argv,14))
{
- a = (int)atom_getintarg(0, argc, argv);
- chg = (int)atom_getintarg(1, argc, argv);
iem_inttosymargs(&x->x_gui.x_isa, atom_getintarg(2, argc, argv));
- num = (int)atom_getintarg(3, argc, argv);
iemgui_new_getnames(&x->x_gui, 4, argv);
- ldx = (int)atom_getintarg(7, argc, argv);
- ldy = (int)atom_getintarg(8, argc, argv);
iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(9, argc, argv));
- fs = (int)atom_getintarg(10, argc, argv);
- bflcol[0] = (int)atom_getintarg(11, argc, argv);
- bflcol[1] = (int)atom_getintarg(12, argc, argv);
- bflcol[2] = (int)atom_getintarg(13, argc, argv);
- on = (int)atom_getintarg(14, argc, argv);
}
else iemgui_new_getnames(&x->x_gui, 4, 0);
--- 422,434 ----
char str[144];
! iem_inttosymargs(&x->x_gui.x_isa, 0);
! iem_inttofstyle(&x->x_gui.x_fsf, 0);
!
! if(pd_scanargs(argc,argv,"iiFi???iiFiiiii",
! &a,&chg,&num,&ldx,&ldy,&fs,&bflcol[0],&bflcol[1],&bflcol[2],&on))
{
iem_inttosymargs(&x->x_gui.x_isa, atom_getintarg(2, argc, argv));
iemgui_new_getnames(&x->x_gui, 4, argv);
iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(9, argc, argv));
}
else iemgui_new_getnames(&x->x_gui, 4, 0);
***************
*** 453,460 ****
x->x_gui.x_fsf.x_rcv_able = 1;
x->x_gui.x_glist = (t_glist *)canvas_getcurrent();
! if (!strcmp(x->x_gui.x_snd->s_name, "empty"))
! x->x_gui.x_fsf.x_snd_able = 0;
! if (!strcmp(x->x_gui.x_rcv->s_name, "empty"))
! x->x_gui.x_fsf.x_rcv_able = 0;
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");
--- 437,442 ----
x->x_gui.x_fsf.x_rcv_able = 1;
x->x_gui.x_glist = (t_glist *)canvas_getcurrent();
! if (!strcmp(x->x_gui.x_snd->s_name, "empty")) x->x_gui.x_fsf.x_snd_able = 0;
! if (!strcmp(x->x_gui.x_rcv->s_name, "empty")) x->x_gui.x_fsf.x_rcv_able = 0;
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");
***************
*** 567,572 ****
class_addmethod(vradio_old_class, (t_method)vradio_click, gensym("click"),
A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0);
! class_addmethod(vradio_old_class, (t_method)vradio_dialog, gensym("dialog"),
! A_GIMME, 0);
class_addmethod(vradio_old_class, (t_method)vradio_loadbang, gensym("loadbang"), 0);
class_addmethod(vradio_old_class, (t_method)vradio_set, gensym("set"), A_FLOAT, 0);
--- 549,553 ----
class_addmethod(vradio_old_class, (t_method)vradio_click, gensym("click"),
A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, A_FLOAT, 0);
! class_addmethod(vradio_old_class, (t_method)vradio_dialog, gensym("dialog"), A_GIMME, 0);
class_addmethod(vradio_old_class, (t_method)vradio_loadbang, gensym("loadbang"), 0);
class_addmethod(vradio_old_class, (t_method)vradio_set, gensym("set"), A_FLOAT, 0);
Index: g_vslider.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_vslider.c,v
retrieving revision 1.1.1.3.2.2.2.2
retrieving revision 1.1.1.3.2.2.2.3
diff -C2 -d -r1.1.1.3.2.2.2.2 -r1.1.1.3.2.2.2.3
*** g_vslider.c 6 Mar 2004 22:14:39 -0000 1.1.1.3.2.2.2.2
--- g_vslider.c 7 Mar 2004 19:38:13 -0000 1.1.1.3.2.2.2.3
***************
*** 23,29 ****
#endif
-
- /* ------------ vsl gui-vertical slider ----------------------- */
-
t_widgetbehavior vslider_widgetbehavior;
static t_class *vslider_class;
--- 23,26 ----
***************
*** 35,41 ****
t_canvas *canvas=glist_getcanvas(glist);
if (glist_isvisible(glist))
! {
! sys_vgui("slider_set .x%x.c %x %d 1 #%6.6x\n", canvas, x, x->x_val, x->x_gui.x_fcol);
! }
}
--- 32,36 ----
t_canvas *canvas=glist_getcanvas(glist);
if (glist_isvisible(glist))
! {sys_vgui("slider_set .x%x.c %x %d 1 #%6.6x\n", canvas, x, x->x_val, x->x_gui.x_fcol);}
}
***************
*** 44,60 ****
int xpos=text_xpix(&x->x_gui.x_obj, glist);
int ypos=text_ypix(&x->x_gui.x_obj, glist);
- int r = ypos + x->x_gui.x_h - (x->x_val + 50)/100;
- int x1=xpos,y1=ypos,x2=xpos+x->x_gui.x_w, y2=ypos+x->x_gui.x_h+2;
t_canvas *canvas=glist_getcanvas(glist);
-
sys_vgui("slider_draw .x%x.c %x %d %d %d %d %d %d 1 #%6.6x\n",
! canvas, x, xpos, ypos, xpos+x->x_gui.x_w, ypos+x->x_gui.x_h,
! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,x->x_gui.x_bcol);
sys_vgui("slider_set .x%x.c %x %d 1 #%6.6x\n", canvas, x, x->x_val, x->x_gui.x_fcol);
sys_vgui(".x%x.c create text %d %d -text {%s} -anchor w \
! -font {%s %d bold} -fill #%6.6x -tags %xLABEL\n",
! canvas, xpos+x->x_gui.x_ldx, ypos+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);
}
--- 39,52 ----
int xpos=text_xpix(&x->x_gui.x_obj, glist);
int ypos=text_ypix(&x->x_gui.x_obj, glist);
t_canvas *canvas=glist_getcanvas(glist);
sys_vgui("slider_draw .x%x.c %x %d %d %d %d %d %d 1 #%6.6x\n",
! canvas, x, xpos, ypos, xpos+x->x_gui.x_w, ypos+x->x_gui.x_h,
! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,x->x_gui.x_bcol);
sys_vgui("slider_set .x%x.c %x %d 1 #%6.6x\n", canvas, x, x->x_val, x->x_gui.x_fcol);
sys_vgui(".x%x.c create text %d %d -text {%s} -anchor w \
! -font {%s %d bold} -fill #%6.6x -tags %xLABEL\n",
! canvas, xpos+x->x_gui.x_ldx, ypos+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);
}
***************
*** 63,74 ****
int xpos=text_xpix(&x->x_gui.x_obj, glist);
int ypos=text_ypix(&x->x_gui.x_obj, glist);
- int r = ypos + x->x_gui.x_h - (x->x_val + 50)/100;
t_canvas *canvas=glist_getcanvas(glist);
sys_vgui("slider_draw .x%x.c %x %d %d %d %d %d %d 1 #%6.6x\n",
! canvas, x, xpos, ypos, xpos+x->x_gui.x_w, ypos+x->x_gui.x_h,
! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,x->x_gui.x_bcol);
sys_vgui("slider_set .x%x.c %x %d 1 #%6.6x\n", canvas, x, x->x_val, x->x_gui.x_fcol);
sys_vgui(".x%x.c coords %xLABEL %d %d\n",
! canvas, x, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy);
}
--- 55,65 ----
int xpos=text_xpix(&x->x_gui.x_obj, glist);
int ypos=text_ypix(&x->x_gui.x_obj, glist);
t_canvas *canvas=glist_getcanvas(glist);
sys_vgui("slider_draw .x%x.c %x %d %d %d %d %d %d 1 #%6.6x\n",
! canvas, x, xpos, ypos, xpos+x->x_gui.x_w, ypos+x->x_gui.x_h,
! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,x->x_gui.x_bcol);
sys_vgui("slider_set .x%x.c %x %d 1 #%6.6x\n", canvas, x, x->x_val, x->x_gui.x_fcol);
sys_vgui(".x%x.c coords %xLABEL %d %d\n",
! canvas, x, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy);
}
***************
*** 85,89 ****
int xpos=text_xpix(&x->x_gui.x_obj, glist);
int ypos=text_ypix(&x->x_gui.x_obj, glist);
-
sys_vgui(".x%x.c itemconfigure %xLABEL -font {%s %d bold} -fill #%6.6x -text {%s} \n",
canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize,
--- 76,79 ----
***************
*** 91,97 ****
strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"");
sys_vgui("slider_set .x%x.c %x %d 1 #%6.6x\n", canvas, x, x->x_val, x->x_gui.x_fcol);
! sys_vgui("bluebox_draw .x%x.c %xBASE %d %d %d %d %d %d #%6.6x\n",
! canvas, x, xpos, ypos, xpos+x->x_gui.x_w, ypos+x->x_gui.x_h,
! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,x->x_gui.x_bcol);
}
--- 81,85 ----
strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"");
sys_vgui("slider_set .x%x.c %x %d 1 #%6.6x\n", canvas, x, x->x_val, x->x_gui.x_fcol);
! sys_vgui("slider_select .x%x.c %xBASE %d\n", canvas, x, x->x_gui.x_fsf.x_selected);
}
***************
*** 106,110 ****
void vslider_draw(t_vslider *x, t_glist *glist, int mode)
{
! if(mode == IEM_GUI_DRAW_MODE_UPDATE) vslider_draw_update(x, glist);
else if(mode == IEM_GUI_DRAW_MODE_MOVE) vslider_draw_move(x, glist);
else if(mode == IEM_GUI_DRAW_MODE_NEW) vslider_draw_new(x, glist);
--- 94,98 ----
void vslider_draw(t_vslider *x, t_glist *glist, int mode)
{
! if (mode == IEM_GUI_DRAW_MODE_UPDATE) vslider_draw_update(x, glist);
else if(mode == IEM_GUI_DRAW_MODE_MOVE) vslider_draw_move(x, glist);
else if(mode == IEM_GUI_DRAW_MODE_NEW) vslider_draw_new(x, glist);
***************
*** 117,121 ****
/* ------------------------ vsl widgetbehaviour----------------------------- */
-
static void vslider_getrect(t_gobj *z, t_glist *glist,
int *xp1, int *yp1, int *xp2, int *yp2)
--- 105,108 ----
***************
*** 154,157 ****
--- 141,145 ----
h = IEM_SL_MINSIZE;
x->x_gui.x_h = h;
+
if(x->x_val > (x->x_gui.x_h*100 - 100))
{
***************
*** 169,183 ****
if(x->x_lin0_log1)
{
! if((min == 0.0)&&(max == 0.0))
! max = 1.0;
! if(max > 0.0)
! {
! if(min <= 0.0)
! min = 0.01*max;
! }
! else
! {
! if(min > 0.0)
! max = 0.01*min;
}
}
--- 157,165 ----
if(x->x_lin0_log1)
{
! if(min == 0.0 && max == 0.0) max = 1.0;
! if(max > 0.0) {
! if(min <= 0.0) min = 0.01*max;
! } else {
! if(min > 0.0) max = 0.01*min;
}
}
***************
*** 201,205 ****
iemgui_properties(&x->x_gui, srl);
-
sprintf(buf, "pdtk_iemgui_dialog %%s VSLIDER \
--------dimensions(pix)(pix):-------- %d %d width: %d %d height: \
--- 183,186 ----
***************
*** 427,430 ****
--- 408,418 ----
}
+
+
+
+
+
+
+
static void *vslider_new(t_symbol *s, int argc, t_atom *argv)
{
***************
*** 432,437 ****
int bflcol[]={-262144, -1, -1};
int w=IEM_GUI_DEFAULTSIZE, h=IEM_SL_DEFAULTSIZE;
! int lilo=0, f=0, ldx=0, ldy=-8;
! int fs=8, v=0, steady=1;
double min=0.0, max=(double)(IEM_SL_DEFAULTSIZE-1);
char str[144];
--- 420,424 ----
int bflcol[]={-262144, -1, -1};
int w=IEM_GUI_DEFAULTSIZE, h=IEM_SL_DEFAULTSIZE;
! int lilo=0, ldx=0, ldy=-8, f=0, v=0, steady=1, fs=8;
double min=0.0, max=(double)(IEM_SL_DEFAULTSIZE-1);
char str[144];
***************
*** 440,468 ****
iem_inttofstyle(&x->x_gui.x_fsf, 0);
! if(((argc == 17)||(argc == 18))&&IS_A_FLOAT(argv,0)&&IS_A_FLOAT(argv,1)
! &&IS_A_FLOAT(argv,2)&&IS_A_FLOAT(argv,3)
! &&IS_A_FLOAT(argv,4)&&IS_A_FLOAT(argv,5)
! &&(IS_A_SYMBOL(argv,6)||IS_A_FLOAT(argv,6))
! &&(IS_A_SYMBOL(argv,7)||IS_A_FLOAT(argv,7))
! &&(IS_A_SYMBOL(argv,8)||IS_A_FLOAT(argv,8))
! &&IS_A_FLOAT(argv,9)&&IS_A_FLOAT(argv,10)
! &&IS_A_FLOAT(argv,11)&&IS_A_FLOAT(argv,12)&&IS_A_FLOAT(argv,13)
! &&IS_A_FLOAT(argv,14)&&IS_A_FLOAT(argv,15)&&IS_A_FLOAT(argv,16))
{
- w = (int)atom_getintarg(0, argc, argv);
- h = (int)atom_getintarg(1, argc, argv);
- min = (double)atom_getfloatarg(2, argc, argv);
- max = (double)atom_getfloatarg(3, argc, argv);
- lilo = (int)atom_getintarg(4, argc, argv);
iem_inttosymargs(&x->x_gui.x_isa, atom_getintarg(5, argc, argv));
iemgui_new_getnames(&x->x_gui, 6, argv);
- ldx = (int)atom_getintarg(9, argc, argv);
- ldy = (int)atom_getintarg(10, argc, argv);
iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(11, argc, argv));
- fs = (int)atom_getintarg(12, argc, argv);
- bflcol[0] = (int)atom_getintarg(13, argc, argv);
- bflcol[1] = (int)atom_getintarg(14, argc, argv);
- bflcol[2] = (int)atom_getintarg(15, argc, argv);
- v = (int)atom_getintarg(16, argc, argv);
}
else iemgui_new_getnames(&x->x_gui, 6, 0);
--- 427,436 ----
iem_inttofstyle(&x->x_gui.x_fsf, 0);
! if(pd_scanargs(argc,argv,"iiffiF???iiFiiiii?;?",
! &w,&h,&min,&max,&lilo,&ldx,&ldy,&fs,&bflcol[0],&bflcol[1],&bflcol[2],&v))
{
iem_inttosymargs(&x->x_gui.x_isa, atom_getintarg(5, argc, argv));
iemgui_new_getnames(&x->x_gui, 6, argv);
iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(11, argc, argv));
}
else iemgui_new_getnames(&x->x_gui, 6, 0);
Index: g_vumeter.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_vumeter.c,v
retrieving revision 1.1.1.3.2.2.2.1
retrieving revision 1.1.1.3.2.2.2.2
diff -C2 -d -r1.1.1.3.2.2.2.1 -r1.1.1.3.2.2.2.2
*** g_vumeter.c 5 Mar 2004 19:27:52 -0000 1.1.1.3.2.2.2.1
--- g_vumeter.c 7 Mar 2004 19:38:13 -0000 1.1.1.3.2.2.2.2
***************
*** 325,340 ****
void vu_draw(t_vu *x, t_glist *glist, int mode)
{
! if(mode == IEM_GUI_DRAW_MODE_MOVE)
! vu_draw_move(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_NEW)
! vu_draw_new(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_SELECT)
! vu_draw_select(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_ERASE)
! vu_draw_erase(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_CONFIG)
! vu_draw_config(x, glist);
! else if(mode >= IEM_GUI_DRAW_MODE_IO)
! vu_draw_io(x, glist, mode - IEM_GUI_DRAW_MODE_IO);
}
--- 325,334 ----
void vu_draw(t_vu *x, t_glist *glist, int mode)
{
! if (mode == IEM_GUI_DRAW_MODE_MOVE) vu_draw_move(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_NEW) vu_draw_new(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_SELECT) vu_draw_select(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_ERASE) vu_draw_erase(x, glist);
! else if(mode == IEM_GUI_DRAW_MODE_CONFIG) vu_draw_config(x, glist);
! else if(mode >= IEM_GUI_DRAW_MODE_IO) vu_draw_io(x, glist, mode - IEM_GUI_DRAW_MODE_IO);
}
***************
*** 574,594 ****
iem_inttofstyle(&x->x_gui.x_fsf, 0);
! if((argc >= 11)&&IS_A_FLOAT(argv,0)&&IS_A_FLOAT(argv,1)
! &&(IS_A_SYMBOL(argv,2)||IS_A_FLOAT(argv,2))
! &&(IS_A_SYMBOL(argv,3)||IS_A_FLOAT(argv,3))
! &&IS_A_FLOAT(argv,4)&&IS_A_FLOAT(argv,5)
! &&IS_A_FLOAT(argv,6)&&IS_A_FLOAT(argv,7)
! &&IS_A_FLOAT(argv,8)&&IS_A_FLOAT(argv,9)&&IS_A_FLOAT(argv,10))
{
! w = (int)atom_getintarg(0, argc, argv);
! h = (int)atom_getintarg(1, argc, argv);
! iemgui_new_getnames(&x->x_gui, 1, argv);
! ldx = (int)atom_getintarg(4, argc, argv);
! ldy = (int)atom_getintarg(5, argc, argv);
iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(6, argc, argv));
- fs = (int)atom_getintarg(7, argc, argv);
- bflcol[0] = (int)atom_getintarg(8, argc, argv);
- bflcol[2] = (int)atom_getintarg(9, argc, argv);
- scale = (int)atom_getintarg(10, argc, argv);
}
else iemgui_new_getnames(&x->x_gui, 1, 0);
--- 568,576 ----
iem_inttofstyle(&x->x_gui.x_fsf, 0);
! if(pd_scanargs(argc,argv,"ii??ii?iiii*",
! &w,&h,&ldx,&ldy,&fs,&bflcol[0],&bflcol[2],&scale))
{
! iemgui_new_getnames(&x->x_gui, 1, argv); /*???*/
iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(6, argc, argv));
}
else iemgui_new_getnames(&x->x_gui, 1, 0);