Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10662
Modified Files: Tag: impd_0_37 u_object.tk g_hdial.c g_vdial.c Log Message: fixing my bugs
Index: u_object.tk =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/u_object.tk,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** u_object.tk 5 Mar 2004 18:59:50 -0000 1.1.2.2 --- u_object.tk 6 Mar 2004 20:56:29 -0000 1.1.2.3 *************** *** 218,222 **** proc radio_draw {canvas tag x1 y1 x2 y2 ins outs orient number colour} { set isnew [expr [llength [$canvas gettags ${tag}BASE]] == 0] ! bluebox_draw $canvas $tag $x1 $y1 $x2 $y2 $ins $outs $colour if {$orient} {set size [expr $y2-$y1]} {set size [expr $x2-$x1]} set size [expr $size/$number] --- 218,222 ---- proc radio_draw {canvas tag x1 y1 x2 y2 ins outs orient number colour} { set isnew [expr [llength [$canvas gettags ${tag}BASE]] == 0] ! bluebox_draw $canvas ${tag}BASE $x1 $y1 $x2 $y2 $ins $outs $colour if {$orient} {set size [expr $y2-$y1]} {set size [expr $x2-$x1]} set size [expr $size/$number] *************** *** 241,242 **** --- 241,257 ---- $canvas itemconfigure ${tag}BUT$value -fill #000000 } + + proc radio_erase {canvas tag} { + bluebox_erase $canvas ${tag}BASE + $canvas delete ${tag}BUT + } + + proc bang_draw {canvas tag x1 y1 x2 y2 ins outs colour} { + bluebox_draw $canvas ${tag}BASE $x1 $y1 $x2 $y2 $ins $outs $colour + io_draw $canvas $tag $x1 $y1 $x2 $y2 $ins $outs + } + + proc bang_erase {canvas tag} { + bluebox_erase $canvas ${tag}BASE + io_erase $canvas $tag + }
Index: g_hdial.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_hdial.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_hdial.c 5 Mar 2004 19:27:51 -0000 1.1.1.4.2.2.2.1 --- g_hdial.c 6 Mar 2004 20:56:29 -0000 1.1.1.4.2.2.2.2 *************** *** 34,47 **** void hradio_draw_update(t_hradio *x, t_glist *glist) { ! if(glist_isvisible(glist)) ! { t_canvas *canvas=glist_getcanvas(glist); ! ! sys_vgui(".x%x.c itemconfigure %xBUT%d -fill #%6.6x -outline #%6.6x\n", ! canvas, x, x->x_on_old, ! x->x_gui.x_bcol, x->x_gui.x_bcol); ! sys_vgui(".x%x.c itemconfigure %xBUT%d -fill #%6.6x -outline #%6.6x\n", ! canvas, x, x->x_on, ! x->x_gui.x_fcol, x->x_gui.x_fcol); } } --- 34,40 ---- void hradio_draw_update(t_hradio *x, t_glist *glist) { ! if(glist_isvisible(glist)) { t_canvas *canvas=glist_getcanvas(glist); ! sys_vgui("radio_set .x%x.c %x %d\n",canvas,x,x->x_on); } } *************** *** 50,72 **** { t_canvas *canvas=glist_getcanvas(glist); ! int n=x->x_number, i, dx=x->x_gui.x_w, s4=dx/4; ! int yy11=text_ypix(&x->x_gui.x_obj, glist), yy12=yy11+dx; ! int yy21=yy11+s4, yy22=yy12-s4; ! int xx11b=text_xpix(&x->x_gui.x_obj, glist), xx11=xx11b, xx21=xx11b+s4; ! int xx22=xx11b+dx-s4; ! int xpos=text_xpix(&x->x_gui.x_obj, glist); ! int ypos=text_ypix(&x->x_gui.x_obj, glist); ! ! sys_vgui("radio_draw .x%x.c %xBASE %d %d %d %d %d %d 0 %d #%6.6x\n", ! canvas, x, xx11, yy11, xx11+dx*x->x_number, yy12, !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 create text %d %d -text {%s} -anchor w \ ! -font {%s %d bold} -fill #%6.6x -tags %xLABEL\n", ! canvas, xx11b+x->x_gui.x_ldx, yy11+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); }
--- 43,59 ---- { t_canvas *canvas=glist_getcanvas(glist); ! int n=x->x_number; ! int x1=text_xpix(&x->x_gui.x_obj, glist), x2=x1+x->x_gui.x_w*x->x_number; ! int y1=text_ypix(&x->x_gui.x_obj, glist), y2=y1+x->x_gui.x_h; ! 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, 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 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); }
*************** *** 74,94 **** { t_canvas *canvas=glist_getcanvas(glist); ! int n=x->x_number, i, dx=x->x_gui.x_w, s4=dx/4; ! int yy11=text_ypix(&x->x_gui.x_obj, glist), yy12=yy11+dx; ! int yy21=yy11+s4, yy22=yy12-s4; ! int xx11b=text_xpix(&x->x_gui.x_obj, glist), xx11=xx11b, xx21=xx11b+s4; ! int xx22=xx11b+dx-s4; ! int xpos=text_xpix(&x->x_gui.x_obj, glist); ! int ypos=text_ypix(&x->x_gui.x_obj, glist); ! ! sys_vgui("radio_draw .x%x.c %xBASE %d %d %d %d %d %d 0 %d #%6.6x\n", ! canvas, x, xx11, yy11, xx11+dx*x->x_number, yy12, !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able, x->x_number,x->x_gui.x_bcol); - xx11 = xx11b; - xx21=xx11b+s4; - xx22=xx11b+dx-s4; sys_vgui(".x%x.c coords %xLABEL %d %d\n", ! canvas, x, xx11b+x->x_gui.x_ldx, yy11+x->x_gui.x_ldy); }
--- 61,73 ---- { t_canvas *canvas=glist_getcanvas(glist); ! int n=x->x_number; ! int x1=text_xpix(&x->x_gui.x_obj, glist), x2=x1+x->x_gui.x_w*x->x_number; ! int y1=text_ypix(&x->x_gui.x_obj, glist), y2=y1+x->x_gui.x_h; ! 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, x->x_number,x->x_gui.x_bcol); sys_vgui(".x%x.c coords %xLABEL %d %d\n", ! canvas, x, x1+x->x_gui.x_ldx, y1+x->x_gui.x_ldy); }
*************** *** 96,106 **** { t_canvas *canvas=glist_getcanvas(glist); ! int n=x->x_number, i; ! ! for(i=0; i<n; i++) ! { ! sys_vgui("bluebox_erase .x%x.c %xBASE%d\n", canvas, x, i); ! sys_vgui(".x%x.c delete %xBUT%d\n", canvas, x, i); ! } sys_vgui(".x%x.c delete %xLABEL\n", canvas, x); } --- 75,79 ---- { t_canvas *canvas=glist_getcanvas(glist); ! sys_vgui("radio_erase .x%x.c %x\n", canvas, x); sys_vgui(".x%x.c delete %xLABEL\n", canvas, x); } *************** *** 108,126 **** void hradio_draw_config(t_hradio* x, t_glist* glist) { ! t_canvas *canvas=glist_getcanvas(glist); ! int n=x->x_number, i; ! ! 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, ! 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:""); ! for(i=0; i<n; i++) ! { ! sys_vgui(".x%x.c itemconfigure %xBASE%d -fill #%6.6x\n", canvas, x, i, ! x->x_gui.x_bcol); ! sys_vgui(".x%x.c itemconfigure %xBUT%d -fill #%6.6x -outline #%6.6x\n", canvas, x, i, ! (x->x_on==i)?x->x_gui.x_fcol:x->x_gui.x_bcol, ! (x->x_on==i)?x->x_gui.x_fcol:x->x_gui.x_bcol); ! } }
--- 81,85 ---- void hradio_draw_config(t_hradio* x, t_glist* glist) { ! hradio_draw_new(x,glist); }
*************** *** 128,157 **** { t_canvas *canvas=glist_getcanvas(glist); ! int n=x->x_number, i; ! ! if(x->x_gui.x_fsf.x_selected) ! { ! for(i=0; i<n; i++) ! { ! sys_vgui(".x%x.c itemconfigure %xBASE%d -outline #%6.6x\n", canvas, x, i, ! IEM_GUI_COLOR_SELECTED); ! } ! sys_vgui(".x%x.c itemconfigure %xLABEL -fill #%6.6x\n", canvas, x, IEM_GUI_COLOR_SELECTED); ! } ! else ! { ! for(i=0; i<n; i++) ! { ! sys_vgui(".x%x.c itemconfigure %xBASE%d -outline #%6.6x\n", canvas, x, i, ! IEM_GUI_COLOR_NORMAL); ! } ! sys_vgui(".x%x.c itemconfigure %xLABEL -fill #%6.6x\n", canvas, x, ! x->x_gui.x_lcol); ! } }
void hradio_draw(t_hradio *x, t_glist *glist, int mode) { ! if(mode == IEM_GUI_DRAW_MODE_UPDATE) hradio_draw_update(x, glist); else if(mode == IEM_GUI_DRAW_MODE_MOVE) hradio_draw_move(x, glist); else if(mode == IEM_GUI_DRAW_MODE_NEW) hradio_draw_new(x, glist); --- 87,96 ---- { t_canvas *canvas=glist_getcanvas(glist); ! sys_vgui("bluebox_select .x%x.c %xBASE %d\n", canvas, x, x->x_gui.x_fsf.x_selected); }
void hradio_draw(t_hradio *x, t_glist *glist, int mode) { ! if (mode == IEM_GUI_DRAW_MODE_UPDATE) hradio_draw_update(x, glist); else if(mode == IEM_GUI_DRAW_MODE_MOVE) hradio_draw_move(x, glist); else if(mode == IEM_GUI_DRAW_MODE_NEW) hradio_draw_new(x, glist); *************** *** 223,227 **** { 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); --- 162,166 ---- { 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);
Index: g_vdial.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_vdial.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_vdial.c 5 Mar 2004 19:27:52 -0000 1.1.1.4.2.2.2.1 --- g_vdial.c 6 Mar 2004 20:56:29 -0000 1.1.1.4.2.2.2.2 *************** *** 27,40 **** void vradio_draw_update(t_vradio *x, t_glist *glist) { ! if(glist_isvisible(glist)) ! { t_canvas *canvas=glist_getcanvas(glist); ! ! sys_vgui(".x%x.c itemconfigure %xBUT%d -fill #%6.6x -outline #%6.6x\n", ! canvas, x, x->x_on_old, ! x->x_gui.x_bcol, x->x_gui.x_bcol); ! sys_vgui(".x%x.c itemconfigure %xBUT%d -fill #%6.6x -outline #%6.6x\n", ! canvas, x, x->x_on, ! x->x_gui.x_fcol, x->x_gui.x_fcol); } } --- 27,33 ---- void vradio_draw_update(t_vradio *x, t_glist *glist) { ! if(glist_isvisible(glist)) { t_canvas *canvas=glist_getcanvas(glist); ! sys_vgui("radio_set .x%x.c %x %d\n",canvas,x,x->x_on); } } *************** *** 43,77 **** { t_canvas *canvas=glist_getcanvas(glist); ! int n=x->x_number, i, dy=x->x_gui.x_h, s4=dy/4; ! int yy11b=text_ypix(&x->x_gui.x_obj, glist); ! int yy11=yy11b, yy12=yy11+dy; ! int yy21=yy11+s4, yy22=yy12-s4; ! int xx11=text_xpix(&x->x_gui.x_obj, glist), xx12=xx11+dy; ! int xx21=xx11+s4, xx22=xx12-s4; ! int xpos=text_xpix(&x->x_gui.x_obj, glist); ! int ypos=text_ypix(&x->x_gui.x_obj, glist); ! ! sys_vgui("radio_draw .x%x.c %xBASE %d %d %d %d %d %d 0 %d #%6.6x\n", ! canvas, x, xx11, yy11, xx12, yy11+dy*x->x_number, !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); - /* - for(i=0; i<n; i++) - { - sys_vgui(".x%x.c create rectangle %d %d %d %d -fill #%6.6x -outline #%6.6x -tags %xBUT%d\n", - canvas, xx21, yy21, xx22, yy22, - (x->x_on==i)?x->x_gui.x_fcol:x->x_gui.x_bcol, - (x->x_on==i)?x->x_gui.x_fcol:x->x_gui.x_bcol, x, i); - yy11 += dy; - yy12 += dy; - yy21 += dy; - yy22 += dy; - } - */ - //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, xx11+x->x_gui.x_ldx, yy11b+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, --- 36,50 ---- { t_canvas *canvas=glist_getcanvas(glist); ! int n=x->x_number; ! 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, 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 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, *************** *** 82,101 **** { t_canvas *canvas=glist_getcanvas(glist); ! int n=x->x_number, i, dy=x->x_gui.x_h, s4=dy/4; ! int yy11b=text_ypix(&x->x_gui.x_obj, glist); ! int yy11=yy11b, yy12=yy11+dy; ! int yy21=yy11+s4, yy22=yy12-s4; ! int xx11=text_xpix(&x->x_gui.x_obj, glist), xx12=xx11+dy; ! int xx21=xx11+s4, xx22=xx12-s4; ! int xpos=text_xpix(&x->x_gui.x_obj, glist); ! int ypos=text_ypix(&x->x_gui.x_obj, glist); ! ! sys_vgui("radio_draw .x%x.c %xBASE %d %d %d %d %d %d 0 %d #%6.6x\n", ! canvas, x, xx11, yy11, xx12, yy12+dy*x->x_number, !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, xx11+x->x_gui.x_ldx, yy11b+x->x_gui.x_ldy); }
--- 55,68 ---- { t_canvas *canvas=glist_getcanvas(glist); ! int n=x->x_number; ! 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, 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); }
*************** *** 103,113 **** { t_canvas *canvas=glist_getcanvas(glist); ! int n=x->x_number, i; ! ! for(i=0; i<n; i++) ! { ! sys_vgui("bluebox_erase .x%x.c %xBASE%d\n", canvas, x, i); ! sys_vgui(".x%x.c delete %xBUT%d\n", canvas, x, i); ! } sys_vgui(".x%x.c delete %xLABEL\n", canvas, x); } --- 70,74 ---- { t_canvas *canvas=glist_getcanvas(glist); ! sys_vgui("radio_erase .x%x.c %x\n", canvas, x); sys_vgui(".x%x.c delete %xLABEL\n", canvas, x); } *************** *** 115,133 **** void vradio_draw_config(t_vradio* x, t_glist* glist) { ! t_canvas *canvas=glist_getcanvas(glist); ! int n=x->x_number, i; ! ! 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, ! 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:""); ! for(i=0; i<n; i++) ! { ! sys_vgui(".x%x.c itemconfigure %xBASE%d -fill #%6.6x\n", canvas, x, i, ! x->x_gui.x_bcol); ! sys_vgui(".x%x.c itemconfigure %xBUT%d -fill #%6.6x -outline #%6.6x\n", canvas, x, i, ! (x->x_on==i)?x->x_gui.x_fcol:x->x_gui.x_bcol, ! (x->x_on==i)?x->x_gui.x_fcol:x->x_gui.x_bcol); ! } }
--- 76,80 ---- void vradio_draw_config(t_vradio* x, t_glist* glist) { ! vradio_draw_new(x,glist); }
*************** *** 135,159 **** { t_canvas *canvas=glist_getcanvas(glist); ! int n=x->x_number, i; ! ! if(x->x_gui.x_fsf.x_selected) ! { ! for(i=0; i<n; i++) ! { ! sys_vgui(".x%x.c itemconfigure %xBASE%d -outline #%6.6x\n", canvas, x, i, ! IEM_GUI_COLOR_SELECTED); ! } ! sys_vgui(".x%x.c itemconfigure %xLABEL -fill #%6.6x\n", canvas, x, IEM_GUI_COLOR_SELECTED); ! } ! else ! { ! for(i=0; i<n; i++) ! { ! sys_vgui(".x%x.c itemconfigure %xBASE%d -outline #%6.6x\n", canvas, x, i, ! IEM_GUI_COLOR_NORMAL); ! } ! sys_vgui(".x%x.c itemconfigure %xLABEL -fill #%6.6x\n", canvas, x, ! x->x_gui.x_lcol); ! } }
--- 82,86 ---- { t_canvas *canvas=glist_getcanvas(glist); ! sys_vgui("bluebox_select .x%x.c %xBASE %d\n", canvas, x, x->x_gui.x_fsf.x_selected); }
*************** *** 230,234 **** { 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); --- 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);