diff --git a/pd/src/g_bang.c b/pd/src/g_bang.c index e846e67ea1956f2277c5b0f97c648647b34908ce..46603e84bdd14edcdfb7615eac6948c8c3caf9da 100644 --- a/pd/src/g_bang.c +++ b/pd/src/g_bang.c @@ -72,31 +72,31 @@ void bng_draw_new(t_bng *x, t_glist *glist) else nlet_tag = "bogus"; - sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -tags {%lxBASE %lxBNG text}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -tags {%lxBASE %lxBNG %lx text}\n", canvas, xpos, ypos, xpos + x->x_gui.x_w, ypos + x->x_gui.x_h, - x->x_gui.x_bcol, x, x); - sys_vgui(".x%lx.c create oval %d %d %d %d -fill #%6.6x -tags {%lxBUT %lxBNG text}\n", + x->x_gui.x_bcol, x, x, x); + sys_vgui(".x%lx.c create oval %d %d %d %d -fill #%6.6x -tags {%lxBUT %lxBNG %lx text}\n", canvas, xpos+1, ypos+1, xpos + x->x_gui.x_w-1, ypos + x->x_gui.x_h-1, - x->x_flashed?x->x_gui.x_fcol:x->x_gui.x_bcol, x, x); + x->x_flashed?x->x_gui.x_fcol:x->x_gui.x_bcol, x, x, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ - -font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxBNG text}\n", + -font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxBNG %lx text}\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, sys_fontweight, - x->x_gui.x_lcol, x, x); + x->x_gui.x_lcol, x, x, x); if(!x->x_gui.x_fsf.x_snd_able && canvas == x->x_gui.x_glist) { - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxBNG%so%d %so%d %lxBNG outlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxBNG%so%d %so%d %lxBNG %lx outlet}\n", canvas, xpos, ypos + x->x_gui.x_h-1, xpos + IOWIDTH, - ypos + x->x_gui.x_h, x, nlet_tag, 0, nlet_tag, 0, x); + ypos + x->x_gui.x_h, x, nlet_tag, 0, nlet_tag, 0, x, x); } if(!x->x_gui.x_fsf.x_rcv_able && canvas == x->x_gui.x_glist) { - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxBNG%si%d %si%d %lxBNG inlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxBNG%si%d %si%d %lxBNG %lx inlet}\n", canvas, xpos, ypos, - xpos + IOWIDTH, ypos+1, x, nlet_tag, 0, nlet_tag, 0, x); + xpos + IOWIDTH, ypos+1, x, nlet_tag, 0, nlet_tag, 0, x, x); } //} } @@ -221,16 +221,16 @@ void bng_draw_io(t_bng* x, t_glist* glist, int old_snd_rcv_flags) else nlet_tag = "bogus"; if((old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && !x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxBNG%so%d %so%d %lxBNG outlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxBNG%so%d %so%d %lxBNG %lx outlet}\n", canvas, xpos, ypos + x->x_gui.x_h-1, xpos + IOWIDTH, - ypos + x->x_gui.x_h, x, nlet_tag, 0, nlet_tag, 0, x); + ypos + x->x_gui.x_h, x, nlet_tag, 0, nlet_tag, 0, x, x); if(!(old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && x->x_gui.x_fsf.x_snd_able) sys_vgui(".x%lx.c delete %lxBNG%so%d\n", canvas, x, nlet_tag, 0); if((old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && !x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxBNG%si%d %si%d %lxBNG inlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxBNG%si%d %si%d %lxBNG %lx inlet}\n", canvas, xpos, ypos, - xpos + IOWIDTH, ypos+1, x, nlet_tag, 0, nlet_tag, 0, x); + xpos + IOWIDTH, ypos+1, x, nlet_tag, 0, nlet_tag, 0, x, x); if(!(old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && x->x_gui.x_fsf.x_rcv_able) sys_vgui(".x%lx.c delete %lxBNG%si%d\n", canvas, x, nlet_tag, 0); } @@ -261,11 +261,11 @@ void bng_draw_select(t_bng* x, t_glist* glist) sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor bottom_right_corner\n", sh->h_pathname, SCALEHANDLE_WIDTH, SCALEHANDLE_HEIGHT); - sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxBNG}\n", + sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxBNG %lx}\n", canvas, x->x_gui.x_obj.te_xpix + x->x_gui.x_w - SCALEHANDLE_WIDTH - 1, x->x_gui.x_obj.te_ypix + x->x_gui.x_h - SCALEHANDLE_HEIGHT - 1, SCALEHANDLE_WIDTH, SCALEHANDLE_HEIGHT, - sh->h_pathname, x, x); + sh->h_pathname, x, x, x); sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n", sh->h_pathname, sh->h_bindsym->s_name); sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n", @@ -283,11 +283,11 @@ void bng_draw_select(t_bng* x, t_glist* glist) sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair\n", lh->h_pathname, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT); - sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxBNG}\n", + sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxBNG %lx}\n", canvas, x->x_gui.x_obj.te_xpix+ x->x_gui.x_ldx - LABELHANDLE_WIDTH, x->x_gui.x_obj.te_ypix + x->x_gui.x_ldy - LABELHANDLE_HEIGHT, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT, - lh->h_pathname, x, x, x); + lh->h_pathname, x, x, x, x); sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n", lh->h_pathname, lh->h_bindsym->s_name); sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n", diff --git a/pd/src/g_editor.c b/pd/src/g_editor.c index 3cadd99d5e29aae1f1cad2b6828142ead51e10f5..3859b5beb4afcd42b9b1ae5a9efebcd3bcbaf068 100644 --- a/pd/src/g_editor.c +++ b/pd/src/g_editor.c @@ -1418,8 +1418,8 @@ void canvas_undo_arrange(t_canvas *x, void *z, int action) } // and finally redraw canvas - canvas_redraw(x); - /* some day when the object tagging is properly done for all GUI objects + //canvas_redraw(x); + // some day when the object tagging is properly done for all GUI objects t_object *ob = NULL; t_rtext *yr = NULL; if (prev) { @@ -1441,7 +1441,7 @@ void canvas_undo_arrange(t_canvas *x, void *z, int action) // fall back to legacy redraw for objects that are not patchable //fprintf(stderr,"lower fallback redraw\n"); canvas_redraw(x); - }*/ + }//*/ glob_preset_node_list_check_loc_and_update(); } @@ -1463,8 +1463,8 @@ void canvas_undo_arrange(t_canvas *x, void *z, int action) y->g_next = next; // and finally redraw canvas - canvas_redraw(x); - /* some day when the object tagging is properly done for all GUI objects + //canvas_redraw(x); + // some day when the object tagging is properly done for all GUI objects t_object *ob = NULL; t_rtext *yr = NULL; if (prev) { @@ -1485,7 +1485,7 @@ void canvas_undo_arrange(t_canvas *x, void *z, int action) // fall back to legacy redraw for objects that are not patchable //fprintf(stderr,"raise fallback redraw\n"); canvas_redraw(x); - }*/ + }//*/ glob_preset_node_list_check_loc_and_update(); } @@ -1665,10 +1665,10 @@ void canvas_undo_canvas_apply(t_canvas *x, void *z, int action) t_canvas *canvas=(t_canvas *)glist_getcanvas(x); //if gop is being disabled go one level up - if (!x->gl_isgraph && x->gl_owner) { + /*if (!x->gl_isgraph && x->gl_owner) { canvas=canvas->gl_owner; canvas_redraw(canvas); - } + }*/ //if properties window is open, update the properties with the previous window properties /*t_int properties = gfxstub_haveproperties((void *)x); @@ -4143,6 +4143,11 @@ static void canvas_displaceselection(t_canvas *x, int dx, int dy) if (x->gl_editor->e_selection) canvas_dirty(x, 1); } + // if we have old_displace, legacy displaced objects won't conform + // to proper ordering of objects as they have been redrawn on top + // of everything else rather than where they were supposed to be + // (e.g. possibly in the middle or at the bottom) + if (old_displace) canvas_redraw(x); old_displace = 0; } diff --git a/pd/src/g_graph.c b/pd/src/g_graph.c index 997d08c3dc3fda1468d253cb4633ecb4a4bb733a..ec9672af14f9825c28898ebb59e183f25e12a12d 100644 --- a/pd/src/g_graph.c +++ b/pd/src/g_graph.c @@ -817,10 +817,10 @@ static void graph_vis(t_gobj *gr, t_glist *parent_glist, int vis) if (vis && gobj_shouldvis(gr, parent_glist)) { sys_vgui(".x%lx.c create polygon\ - %d %d %d %d %d %d %d %d %d %d -tags %sfill -fill $graph_outline\n", + %d %d %d %d %d %d %d %d %d %d -tags {%sfill %s} -fill $graph_outline\n", glist_getcanvas(x->gl_owner), //parent_glist, - x1, y1, x1, y2, x2, y2, x2, y1, x1, y1, tag); + x1, y1, x1, y2, x2, y2, x2, y1, x1, y1, tag, tag); } else if (gobj_shouldvis(gr, parent_glist)) { @@ -840,9 +840,9 @@ static void graph_vis(t_gobj *gr, t_glist *parent_glist, int vis) t_garray *ga; /* draw a rectangle around the graph */ sys_vgui(".x%lx.c create line\ - %d %d %d %d %d %d %d %d %d %d -fill $graph_outline -tags %sR\n", + %d %d %d %d %d %d %d %d %d %d -fill $graph_outline -tags {%sR %s}\n", glist_getcanvas(x->gl_owner), - x1, y1, x1, y2, x2, y2, x2, y1, x1, y1, tag); + x1, y1, x1, y2, x2, y2, x2, y1, x1, y1, tag, tag); /* if there's just one "garray" in the graph, write its name along the top */ diff --git a/pd/src/g_hdial.c b/pd/src/g_hdial.c index a22ca2794e469300d8b9ed057efc30b0dc784aba..523c8cbde6cd13396f11210da9da8446051a0ca7 100644 --- a/pd/src/g_hdial.c +++ b/pd/src/g_hdial.c @@ -86,30 +86,30 @@ void hradio_draw_new(t_hradio *x, t_glist *glist) for(i=0; i<n; i++) { - sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -tags {%lxBASE%d %lxHRDO text}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -tags {%lxBASE%d %lxHRDO %lx text}\n", canvas, xx11, yy11, xx11+dx, yy12, - x->x_gui.x_bcol, x, i, x); - sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -outline #%6.6x -tags {%lxBUT%d %lxHRDO text}\n", + x->x_gui.x_bcol, x, i, x, x); + sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -outline #%6.6x -tags {%lxBUT%d %lxHRDO %lx text}\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, x); + (x->x_on==i)?x->x_gui.x_fcol:x->x_gui.x_bcol, x, i, x, x); xx11 += dx; xx21 += dx; xx22 += dx; x->x_drawn = x->x_on; } sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ - -font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxHRDO text}\n", + -font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxHRDO %lx text}\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, sys_fontweight, - x->x_gui.x_lcol, x, x); + x->x_gui.x_lcol, x, x, x); if(!x->x_gui.x_fsf.x_snd_able && canvas == x->x_gui.x_glist) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxHRDO%so%d %so%d %lxHRDO outlet}\n", - canvas, xx11b, yy12-1, xx11b + IOWIDTH, yy12, x, nlet_tag, 0, nlet_tag, 0, x); + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxHRDO%so%d %so%d %lxHRDO %lx outlet}\n", + canvas, xx11b, yy12-1, xx11b + IOWIDTH, yy12, x, nlet_tag, 0, nlet_tag, 0, x, x); if(!x->x_gui.x_fsf.x_rcv_able && canvas == x->x_gui.x_glist) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxHRDO%si%d %si%d %lxHRDO inlet}\n", - canvas, xx11b, yy11, xx11b + IOWIDTH, yy11+1, x, nlet_tag, 0, nlet_tag, 0, x); + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxHRDO%si%d %si%d %lxHRDO %lx inlet}\n", + canvas, xx11b, yy11, xx11b + IOWIDTH, yy11+1, x, nlet_tag, 0, nlet_tag, 0, x, x); //} } @@ -249,18 +249,18 @@ void hradio_draw_io(t_hradio* x, t_glist* glist, int old_snd_rcv_flags) else nlet_tag = "bogus"; if((old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && !x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxHRDO%so%d %so%d %lxHRDO outlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxHRDO%so%d %so%d %lxHRDO %lx outlet}\n", canvas, xpos, ypos + x->x_gui.x_w-1, xpos + IOWIDTH, ypos + x->x_gui.x_w, - x, nlet_tag, 0, nlet_tag, 0, x); + x, nlet_tag, 0, nlet_tag, 0, x, x); if(!(old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && x->x_gui.x_fsf.x_snd_able) sys_vgui(".x%lx.c delete %lxHRDO%so%d\n", canvas, x, nlet_tag, 0); if((old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && !x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxHRDO%si%d %si%d %lxHRDO inlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxHRDO%si%d %si%d %lxHRDO %lx inlet}\n", canvas, xpos, ypos, - xpos + IOWIDTH, ypos+1, x, nlet_tag, 0, nlet_tag, 0, x); + xpos + IOWIDTH, ypos+1, x, nlet_tag, 0, nlet_tag, 0, x, x); if(!(old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && x->x_gui.x_fsf.x_rcv_able) sys_vgui(".x%lx.c delete %lxHRDO%si%d\n", canvas, x, nlet_tag, 0); } @@ -294,11 +294,11 @@ void hradio_draw_select(t_hradio* x, t_glist* glist) sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor bottom_right_corner\n", sh->h_pathname, SCALEHANDLE_WIDTH, SCALEHANDLE_HEIGHT); - sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxHRDO}\n", + sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxHRDO %lx}\n", canvas, x->x_gui.x_obj.te_xpix + x->x_gui.x_w * x->x_number - SCALEHANDLE_WIDTH - 1, x->x_gui.x_obj.te_ypix + x->x_gui.x_h - SCALEHANDLE_HEIGHT - 1, SCALEHANDLE_WIDTH, SCALEHANDLE_HEIGHT, - sh->h_pathname, x, x); + sh->h_pathname, x, x, x); sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n", sh->h_pathname, sh->h_bindsym->s_name); sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n", @@ -315,11 +315,11 @@ void hradio_draw_select(t_hradio* x, t_glist* glist) sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair\n", lh->h_pathname, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT); - sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxHRDO}\n", + sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxHRDO %lx}\n", canvas, x->x_gui.x_obj.te_xpix+ x->x_gui.x_ldx - LABELHANDLE_WIDTH, x->x_gui.x_obj.te_ypix + x->x_gui.x_ldy - LABELHANDLE_HEIGHT, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT, - lh->h_pathname, x, x, x); + lh->h_pathname, x, x, x, x); sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n", lh->h_pathname, lh->h_bindsym->s_name); sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n", diff --git a/pd/src/g_hslider.c b/pd/src/g_hslider.c index d58f1cddbc186754b5a63a5d5c1186ef4d105f5f..fadb52efe6b1fe48a427d11193a49bb6bc454e96 100644 --- a/pd/src/g_hslider.c +++ b/pd/src/g_hslider.c @@ -96,28 +96,28 @@ static void hslider_draw_new(t_hslider *x, t_glist *glist) if (yyyy) nlet_tag = rtext_gettag(yyyy); else nlet_tag = "bogus"; - sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -tags {%lxBASE %lxHSLDR text}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -tags {%lxBASE %lxHSLDR %lx text}\n", canvas, xpos, ypos, xpos + x->x_gui.x_w+5, ypos + x->x_gui.x_h, - x->x_gui.x_bcol, x, x); - sys_vgui(".x%lx.c create line %d %d %d %d -width 3 -fill #%6.6x -tags {%lxKNOB %lxHSLDR text}\n", + x->x_gui.x_bcol, x, x, x); + sys_vgui(".x%lx.c create line %d %d %d %d -width 3 -fill #%6.6x -tags {%lxKNOB %lxHSLDR %lx text}\n", canvas, r, ypos+2, r, - ypos + x->x_gui.x_h-1, x->x_gui.x_fcol, x, x); + ypos + x->x_gui.x_h-1, x->x_gui.x_fcol, x, x, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ - -font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxHSLDR text}\n", + -font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxHSLDR %lx text}\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, sys_fontweight, - x->x_gui.x_lcol, x, x); + x->x_gui.x_lcol, x, x, x); if(!x->x_gui.x_fsf.x_snd_able && canvas == x->x_gui.x_glist) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxHSLDR%so%d %so%d %lxHSLDR outlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxHSLDR%so%d %so%d %lxHSLDR %lx outlet}\n", canvas, xpos, ypos + x->x_gui.x_h-1, - xpos+7, ypos + x->x_gui.x_h, x, nlet_tag, 0, nlet_tag, 0, x); + xpos+7, ypos + x->x_gui.x_h, x, nlet_tag, 0, nlet_tag, 0, x, x); if(!x->x_gui.x_fsf.x_rcv_able && canvas == x->x_gui.x_glist) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxHSLDR%si%d %si%d %lxHSLDR inlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxHSLDR%si%d %si%d %lxHSLDR %lx inlet}\n", canvas, xpos, ypos, - xpos+7, ypos+1, x, nlet_tag, 0, nlet_tag, 0, x); + xpos+7, ypos+1, x, nlet_tag, 0, nlet_tag, 0, x, x); //} } @@ -242,15 +242,15 @@ static void hslider_draw_io(t_hslider* x,t_glist* glist, int old_snd_rcv_flags) else nlet_tag = "bogus"; if((old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && !x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxHSLDR%so%d %so%d %lxHSLDR outlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxHSLDR%so%d %so%d %lxHSLDR %lx outlet}\n", canvas, xpos, ypos + x->x_gui.x_h-1, - xpos+7, ypos + x->x_gui.x_h, x, nlet_tag, 0, nlet_tag, 0, x); + xpos+7, ypos + x->x_gui.x_h, x, nlet_tag, 0, nlet_tag, 0, x, x); if(!(old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && x->x_gui.x_fsf.x_snd_able) sys_vgui(".x%lx.c delete %lxHSLDR%so%d\n", canvas, x, nlet_tag, 0); if((old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && !x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxHSLDR%si%d %si%d %lxHSLDR inlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxHSLDR%si%d %si%d %lxHSLDR %lx inlet}\n", canvas, xpos, ypos, - xpos+7, ypos+1, x, nlet_tag, 0, nlet_tag, 0, x); + xpos+7, ypos+1, x, nlet_tag, 0, nlet_tag, 0, x, x); if(!(old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && x->x_gui.x_fsf.x_rcv_able) sys_vgui(".x%lx.c delete %lxHSLDR%si%d\n", canvas, x, nlet_tag, 0); } @@ -280,11 +280,11 @@ static void hslider_draw_select(t_hslider* x,t_glist* glist) sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor bottom_right_corner\n", sh->h_pathname, SCALEHANDLE_WIDTH, SCALEHANDLE_HEIGHT); - sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxHSLDR}\n", + sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxHSLDR %lx}\n", canvas, x->x_gui.x_obj.te_xpix + x->x_gui.x_w + 5 - SCALEHANDLE_WIDTH - 1, x->x_gui.x_obj.te_ypix + x->x_gui.x_h - SCALEHANDLE_HEIGHT - 1, SCALEHANDLE_WIDTH, SCALEHANDLE_HEIGHT, - sh->h_pathname, x, x); + sh->h_pathname, x, x, x); sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n", sh->h_pathname, sh->h_bindsym->s_name); sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n", @@ -302,11 +302,11 @@ static void hslider_draw_select(t_hslider* x,t_glist* glist) sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair\n", lh->h_pathname, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT); - sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxHSLDR}\n", + sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxHSLDR %lx}\n", canvas, x->x_gui.x_obj.te_xpix+ x->x_gui.x_ldx - LABELHANDLE_WIDTH, x->x_gui.x_obj.te_ypix + x->x_gui.x_ldy - LABELHANDLE_HEIGHT, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT, - lh->h_pathname, x, x, x); + lh->h_pathname, x, x, x, x); sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n", lh->h_pathname, lh->h_bindsym->s_name); sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n", diff --git a/pd/src/g_mycanvas.c b/pd/src/g_mycanvas.c index ef6131e613d429d2e45f3d43277d36d06a3d88ac..3f2bffad8ce933b12e79349c2ffaebf1a982796a 100644 --- a/pd/src/g_mycanvas.c +++ b/pd/src/g_mycanvas.c @@ -49,20 +49,20 @@ void my_canvas_draw_new(t_my_canvas *x, t_glist *glist) //if (glist_isvisible(glist)) { - sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -outline #%6.6x -tags {%lxRECT %lxMYCNV text}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -outline #%6.6x -tags {%lxRECT %lxMYCNV %lx text}\n", canvas, xpos, ypos, xpos + x->x_vis_w, ypos + x->x_vis_h, - x->x_gui.x_bcol, x->x_gui.x_bcol, x, x); - sys_vgui(".x%lx.c create rectangle %d %d %d %d -outline #%6.6x -tags {%lxBASE %lxMYCNV text}\n", + x->x_gui.x_bcol, x->x_gui.x_bcol, x, x, x); + sys_vgui(".x%lx.c create rectangle %d %d %d %d -outline #%6.6x -tags {%lxBASE %lxMYCNV %lx text}\n", canvas, xpos, ypos, xpos + x->x_gui.x_w, ypos + x->x_gui.x_h, - x->x_gui.x_bcol, x, x); + x->x_gui.x_bcol, x, x, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ - -font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxMYCNV text}\n", + -font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxMYCNV %lx text}\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, sys_fontweight, - x->x_gui.x_lcol, x, x); + x->x_gui.x_lcol, x, x, x); //} } @@ -157,11 +157,11 @@ void my_canvas_draw_select(t_my_canvas* x, t_glist* glist) sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor bottom_right_corner\n", sh->h_pathname, SCALEHANDLE_WIDTH, SCALEHANDLE_HEIGHT); - sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxMYCNV}\n", + sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxMYCNV %lx}\n", canvas, x->x_gui.x_obj.te_xpix + x->x_vis_w - SCALEHANDLE_WIDTH - 1, x->x_gui.x_obj.te_ypix + x->x_vis_h - SCALEHANDLE_HEIGHT - 1, SCALEHANDLE_WIDTH, SCALEHANDLE_HEIGHT, - sh->h_pathname, x, x); + sh->h_pathname, x, x, x); sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n", sh->h_pathname, sh->h_bindsym->s_name); sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n", @@ -179,11 +179,11 @@ void my_canvas_draw_select(t_my_canvas* x, t_glist* glist) sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair\n", lh->h_pathname, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT); - sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxMYCNV}\n", + sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxMYCNV %lx}\n", canvas, x->x_gui.x_obj.te_xpix+ x->x_gui.x_ldx - LABELHANDLE_WIDTH, x->x_gui.x_obj.te_ypix + x->x_gui.x_ldy - LABELHANDLE_HEIGHT, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT, - lh->h_pathname, x, x, x); + lh->h_pathname, x, x, x, x); sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n", lh->h_pathname, lh->h_bindsym->s_name); sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n", diff --git a/pd/src/g_numbox.c b/pd/src/g_numbox.c index 515ac33b375fd9b404c11c41c75f5a77fc632825..de511e44473f67a03f1bcc9a53b2af133c6baf69 100644 --- a/pd/src/g_numbox.c +++ b/pd/src/g_numbox.c @@ -216,55 +216,55 @@ static void my_numbox_draw_new(t_my_numbox *x, t_glist *glist) if (x->x_hide_frame <= 1) { sys_vgui( ".x%lx.c create polygon %d %d %d %d %d %d %d %d %d %d -outline #%6.6x \ - -fill #%6.6x -tags {%lxBASE1 %lxNUM text}\n", + -fill #%6.6x -tags {%lxBASE1 %lxNUM %lx text}\n", canvas, xpos, ypos, xpos + x->x_numwidth-4, ypos, xpos + x->x_numwidth, ypos+4, xpos + x->x_numwidth, ypos + x->x_gui.x_h, xpos, ypos + x->x_gui.x_h, - IEM_GUI_COLOR_NORMAL, x->x_gui.x_bcol, x, x); + IEM_GUI_COLOR_NORMAL, x->x_gui.x_bcol, x, x, x); if(!x->x_gui.x_fsf.x_snd_able && canvas == x->x_gui.x_glist) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxNUM%so%d %so%d %lxNUM outlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxNUM%so%d %so%d %lxNUM %lx outlet}\n", canvas, xpos, ypos + x->x_gui.x_h-1, xpos+IOWIDTH, ypos + x->x_gui.x_h, - x, nlet_tag, 0, nlet_tag, 0, x); + x, nlet_tag, 0, nlet_tag, 0, x, x); if(!x->x_gui.x_fsf.x_rcv_able && canvas == x->x_gui.x_glist) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxNUM%si%d %si%d %lxNUM inlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxNUM%si%d %si%d %lxNUM %lx inlet}\n", canvas, xpos, ypos, xpos+IOWIDTH, ypos+1, - x, nlet_tag, 0, nlet_tag, 0, x); + x, nlet_tag, 0, nlet_tag, 0, x, x); } else { sys_vgui( ".x%lx.c create polygon %d %d %d %d %d %d %d %d %d %d -outline #%6.6x \ - -fill #%6.6x -tags {%lxBASE1 %lxNUM text}\n", + -fill #%6.6x -tags {%lxBASE1 %lxNUM %lx text}\n", canvas, xpos, ypos, xpos + x->x_numwidth-4, ypos, xpos + x->x_numwidth, ypos+4, xpos + x->x_numwidth, ypos + x->x_gui.x_h, xpos, ypos + x->x_gui.x_h, - x->x_gui.x_bcol, x->x_gui.x_bcol, x, x); + x->x_gui.x_bcol, x->x_gui.x_bcol, x, x, x); } if (!x->x_hide_frame || x->x_hide_frame == 2) sys_vgui( - ".x%lx.c create line %d %d %d %d %d %d -fill #%6.6x -tags {%lxBASE2 %lxNUM text}\n", + ".x%lx.c create line %d %d %d %d %d %d -fill #%6.6x -tags {%lxBASE2 %lxNUM %lx text}\n", canvas, xpos, ypos, xpos + half, ypos + half, xpos, ypos + x->x_gui.x_h, - x->x_gui.x_fcol, x, x); + x->x_gui.x_fcol, x, x, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ - -font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxNUM text}\n", + -font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxNUM %lx text}\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, sys_fontweight, - x->x_gui.x_lcol, x, x); + x->x_gui.x_lcol, x, x, x); my_numbox_ftoa(x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ - -font {{%s} -%d %s} -fill #%6.6x -tags {%lxNUMBER %lxNUM noscroll text}\n", + -font {{%s} -%d %s} -fill #%6.6x -tags {%lxNUMBER %lxNUM %lx noscroll text}\n", canvas, xpos+half+2, ypos+half+d, x->x_buf, x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, - x->x_gui.x_fcol, x, x); + x->x_gui.x_fcol, x, x, x); //} } @@ -417,19 +417,19 @@ static void my_numbox_draw_io(t_my_numbox* x,t_glist* glist, int old_snd_rcv_fla else nlet_tag = "bogus"; if((old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && !x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxNUM%so%d %so%d %lxNUM outlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxNUM%so%d %so%d %lxNUM %lx outlet}\n", canvas, xpos, ypos + x->x_gui.x_h-1, xpos+IOWIDTH, ypos + x->x_gui.x_h, - x, nlet_tag, 0, nlet_tag, 0, x); + x, nlet_tag, 0, nlet_tag, 0, x, x); if(!(old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && x->x_gui.x_fsf.x_snd_able) sys_vgui(".x%lx.c delete %lxNUM%so%d\n", canvas, x, nlet_tag, 0); if((old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && !x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxNUM%si%d %si%d %lxNUM inlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxNUM%si%d %si%d %lxNUM %lx inlet}\n", canvas, xpos, ypos, xpos+IOWIDTH, ypos+1, - x, nlet_tag, 0, nlet_tag, 0, x); + x, nlet_tag, 0, nlet_tag, 0, x, x); if(!(old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && x->x_gui.x_fsf.x_rcv_able) sys_vgui(".x%lx.c delete %lxNUM%si%d\n", canvas, x, nlet_tag, 0); @@ -474,11 +474,11 @@ static void my_numbox_draw_select(t_my_numbox *x, t_glist *glist) sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor bottom_right_corner\n", sh->h_pathname, SCALEHANDLE_WIDTH, SCALEHANDLE_HEIGHT); - sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxNUM}\n", + sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxNUM %lx}\n", canvas, x->x_gui.x_obj.te_xpix + x->x_numwidth - SCALEHANDLE_WIDTH - 1, x->x_gui.x_obj.te_ypix + x->x_gui.x_h - SCALEHANDLE_HEIGHT - 1, SCALEHANDLE_WIDTH, SCALEHANDLE_HEIGHT, - sh->h_pathname, x, x); + sh->h_pathname, x, x, x); sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n", sh->h_pathname, sh->h_bindsym->s_name); sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n", @@ -495,11 +495,11 @@ static void my_numbox_draw_select(t_my_numbox *x, t_glist *glist) sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair\n", lh->h_pathname, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT); - sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxNUM}\n", + sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxNUM %lx}\n", canvas, x->x_gui.x_obj.te_xpix+ x->x_gui.x_ldx - LABELHANDLE_WIDTH, x->x_gui.x_obj.te_ypix + x->x_gui.x_ldy - LABELHANDLE_HEIGHT, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT, - lh->h_pathname, x, x, x); + lh->h_pathname, x, x, x, x); sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n", lh->h_pathname, lh->h_bindsym->s_name); sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n", diff --git a/pd/src/g_scalar.c b/pd/src/g_scalar.c index f23444e9980707c743b7670fbaeba666ab3c2071..2e741198838f0681b5c857f022e0b3188a078ac2 100644 --- a/pd/src/g_scalar.c +++ b/pd/src/g_scalar.c @@ -363,8 +363,8 @@ static void scalar_vis(t_gobj *z, t_glist *owner, int vis) { int x1 = glist_xtopixels(owner, basex); int y1 = glist_ytopixels(owner, basey); - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags scalar%lx\n", - glist_getcanvas(owner), x1-1, y1-1, x1+1, y1+1, x); + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lx scalar%lx}\n", + glist_getcanvas(owner), x1-1, y1-1, x1+1, y1+1, x, x); } else sys_vgui(".x%lx.c delete scalar%lx\n", glist_getcanvas(owner), x); return; diff --git a/pd/src/g_text.c b/pd/src/g_text.c index d07040c435ff9cb01c6a5cf4787d948ea11deaeb..91593669d20028a6dab671ab5da62f13cc85b2e8 100644 --- a/pd/src/g_text.c +++ b/pd/src/g_text.c @@ -1670,11 +1670,11 @@ void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime, //fprintf(stderr,"glist_drawiofor o firsttime\n"); issignal = obj_issignaloutlet(ob,i); sys_vgui(".x%lx.c create rectangle %d %d %d %d \ - -fill %s -outline %s -tags {%so%d outlet}\n", + -fill %s -outline %s -tags {%so%d %lx outlet}\n", glist_getcanvas(glist), onset, y2 - 2, onset + IOWIDTH, y2, (issignal ? "$signal_nlet" : "$msg_nlet"), (issignal ? "$signal_cord" : "$msg_cord"), - tag, i); + tag, i, tag); } else { //fprintf(stderr,"glist_drawiofor o redraw\n"); @@ -1700,11 +1700,11 @@ void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime, //fprintf(stderr,"glist_drawiofor i firsttime\n"); issignal = obj_issignalinlet(ob,i); sys_vgui(".x%lx.c create rectangle %d %d %d %d \ - -fill %s -outline %s -tags {%si%d inlet}\n", + -fill %s -outline %s -tags {%si%d %lx inlet}\n", glist_getcanvas(glist), onset, y1, onset + IOWIDTH, y1 + EXTRAPIX, (issignal ? "$signal_nlet" : "$msg_nlet"), (issignal ? "$signal_cord" : "$msg_cord"), - tag, i); + tag, i, tag); } else { //fprintf(stderr,"glist_drawiofor i firsttime\n"); @@ -1740,11 +1740,11 @@ void glist_drawiofor_withtag(t_glist *glist, t_object *ob, int firsttime, //fprintf(stderr,"drawiofor_withtag o firsttime\n"); issignal = obj_issignaloutlet(ob,i); sys_vgui(".x%lx.c create rectangle %d %d %d %d \ - -fill %s -outline %s -tags {%so%d outlet}\n", + -fill %s -outline %s -tags {%so%d %lx outlet}\n", glist_getcanvas(glist), onset, y2 - 2, onset + IOWIDTH, y2, (issignal ? "$signal_nlet" : "$msg_nlet"), (issignal ? "$signal_cord" : "$msg_cord"), - tag, i); + tag, i, tag); } /* else @@ -1765,11 +1765,11 @@ void glist_drawiofor_withtag(t_glist *glist, t_object *ob, int firsttime, //fprintf(stderr,"drawiofor_withtag i firsttime\n"); issignal = obj_issignalinlet(ob,i); sys_vgui(".x%lx.c create rectangle %d %d %d %d \ - -fill %s -outline %s -tags {%si%d inlet}\n", + -fill %s -outline %s -tags {%si%d %lx inlet}\n", glist_getcanvas(glist), onset, y1, onset + IOWIDTH, y1 + EXTRAPIX, (issignal ? "$signal_nlet" : "$msg_nlet"), (issignal ? "$signal_cord" : "$msg_cord"), - tag, i); + tag, i, tag); } /* else { @@ -1832,10 +1832,10 @@ void text_drawborder(t_text *x, t_glist *glist, if (firsttime) { sys_vgui(".x%lx.c create polygon %d %d %d %d %d %d %d %d %d %d \ - -dash %s -outline %s -fill %s -tags {%sR text}\n", + -dash %s -outline %s -fill %s -tags {%sR %lx text}\n", glist_getcanvas(glist), x1, y1, x2, y1, x2, y2, x1, y2, x1, y1, - pattern, outline, fill, tag); + pattern, outline, fill, tag, tag); } else { @@ -1852,11 +1852,11 @@ void text_drawborder(t_text *x, t_glist *glist, { if (firsttime) sys_vgui(".x%lx.c create polygon\ - %d %d %d %d %d %d %d %d %d %d %d %d %d %d -outline $box_outline -fill $msg_box_fill -tags {%sR text}\n", + %d %d %d %d %d %d %d %d %d %d %d %d %d %d -outline $box_outline -fill $msg_box_fill -tags {%sR %lx text}\n", glist_getcanvas(glist), x1, y1, x2+4, y1, x2, y1+4, x2, y2-4, x2+4, y2, x1, y2, x1, y1, - tag); + tag, tag); else sys_vgui(".x%lx.c coords %sR\ %d %d %d %d %d %d %d %d %d %d %d %d %d %d\n", @@ -1868,10 +1868,10 @@ void text_drawborder(t_text *x, t_glist *glist, { if (firsttime) sys_vgui(".x%lx.c create polygon\ - %d %d %d %d %d %d %d %d %d %d %d %d -outline $box_outline -fill $atom_box_fill -tags {%sR text}\n", + %d %d %d %d %d %d %d %d %d %d %d %d -outline $box_outline -fill $atom_box_fill -tags {%sR %lx text}\n", glist_getcanvas(glist), x1, y1, x2-4, y1, x2, y1+4, x2, y2, x1, y2, x1, y1, - tag); + tag, tag); else sys_vgui(".x%lx.c coords %sR\ %d %d %d %d %d %d %d %d %d %d %d %d\n", @@ -1916,10 +1916,10 @@ void text_drawborder_withtag(t_text *x, t_glist *glist, if (firsttime) { sys_vgui(".x%lx.c create polygon %d %d %d %d %d %d %d %d %d %d \ - -dash %s -outline %s -fill %s -tags {%sR text}\n", + -dash %s -outline %s -fill %s -tags {%sR %lx text}\n", glist_getcanvas(glist), x1, y1, x2, y1, x2, y2, x1, y2, x1, y1, - pattern, outline, fill, tag); + pattern, outline, fill, tag, tag); } } else if (x->te_type == T_MESSAGE) @@ -1929,23 +1929,23 @@ void text_drawborder_withtag(t_text *x, t_glist *glist, if (firsttime) sys_vgui(".x%lx.c create polygon \ %d %d %d %d %d %d %d %d %d %d %d %d %d %d \ - -outline $box_outline -fill $msg_box_fill -tags {%sR text}\n", + -outline $box_outline -fill $msg_box_fill -tags {%sR %lx text}\n", glist_getcanvas(glist), x1, y1, x2+msg_draw_const, y1, x2, y1+msg_draw_const, x2, y2-msg_draw_const, x2+msg_draw_const, y2, x1, y2, x1, y1, - tag); + tag, tag); } else if (x->te_type == T_ATOM) { atom_draw_const = ((y2-y1)/3); if (firsttime) sys_vgui(".x%lx.c create polygon %d %d %d %d %d %d %d %d %d %d %d %d \ - -outline $box_outline -fill $atom_box_fill -tags {%sR text}\n", + -outline $box_outline -fill $atom_box_fill -tags {%sR %lx text}\n", glist_getcanvas(glist), x1, y1, x2-atom_draw_const, y1, x2, y1+atom_draw_const, x2, y2, x1, y2, x1, y1, - tag); + tag, tag); } /* draw inlets/outlets */ diff --git a/pd/src/g_toggle.c b/pd/src/g_toggle.c index 4735828df3bcf68c3f3de3846f1f71d4dd5f9215..461cc23356d83552305a68c55fad922acc55f315 100644 --- a/pd/src/g_toggle.c +++ b/pd/src/g_toggle.c @@ -79,28 +79,28 @@ void toggle_draw_new(t_toggle *x, t_glist *glist) w = 2; if(x->x_gui.x_w >= 60) w = 3; - sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -tags {%lxBASE %lxTGL text}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -tags {%lxBASE %lxTGL %lx text}\n", canvas, xx, yy, xx + x->x_gui.x_w, yy + x->x_gui.x_h, - x->x_gui.x_bcol, x, x); - sys_vgui(".x%lx.c create line %d %d %d %d -width %d -fill #%6.6x -tags {%lxX1 %lxTGL text}\n", + x->x_gui.x_bcol, x, x, x); + sys_vgui(".x%lx.c create line %d %d %d %d -width %d -fill #%6.6x -tags {%lxX1 %lxTGL %lx text}\n", canvas, xx+w+1, yy+w+1, xx + x->x_gui.x_w-w, yy + x->x_gui.x_h-w, w, - (x->x_on!=0.0)?x->x_gui.x_fcol:x->x_gui.x_bcol, x, x); - sys_vgui(".x%lx.c create line %d %d %d %d -width %d -fill #%6.6x -tags {%lxX2 %lxTGL text}\n", + (x->x_on!=0.0)?x->x_gui.x_fcol:x->x_gui.x_bcol, x, x, x); + sys_vgui(".x%lx.c create line %d %d %d %d -width %d -fill #%6.6x -tags {%lxX2 %lxTGL %lx text}\n", 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, x); + (x->x_on!=0.0)?x->x_gui.x_fcol:x->x_gui.x_bcol, x, x, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ - -font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxTGL text}\n", + -font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxTGL %lx text}\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, sys_fontweight, - x->x_gui.x_lcol, x, x); + x->x_gui.x_lcol, x, x, x); if(!x->x_gui.x_fsf.x_snd_able && canvas == x->x_gui.x_glist) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxTGL%so%d %so%d %lxTGL outlet}\n", - canvas, xx, yy + x->x_gui.x_h-1, xx + IOWIDTH, yy + x->x_gui.x_h, x, nlet_tag, 0, nlet_tag, 0, x); + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxTGL%so%d %so%d %lxTGL %lx outlet}\n", + canvas, xx, yy + x->x_gui.x_h-1, xx + IOWIDTH, yy + x->x_gui.x_h, x, nlet_tag, 0, nlet_tag, 0, x, x); if(!x->x_gui.x_fsf.x_rcv_able && canvas == x->x_gui.x_glist) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxTGL%si%d %si%d %lxTGL inlet}\n", - canvas, xx, yy, xx + IOWIDTH, yy+1, x, nlet_tag, 0, nlet_tag, 0, x); + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxTGL%si%d %si%d %lxTGL %lx inlet}\n", + canvas, xx, yy, xx + IOWIDTH, yy+1, x, nlet_tag, 0, nlet_tag, 0, x, x); //} } @@ -239,16 +239,16 @@ void toggle_draw_io(t_toggle* x, t_glist* glist, int old_snd_rcv_flags) else nlet_tag = "bogus"; if((old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && !x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxTGL%so%d %so%d %lxTGL outlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxTGL%so%d %so%d %lxTGL %lx outlet}\n", canvas, xpos, ypos + x->x_gui.x_h-1, xpos + IOWIDTH, - ypos + x->x_gui.x_h, x, nlet_tag, 0, nlet_tag, 0, x); + ypos + x->x_gui.x_h, x, nlet_tag, 0, nlet_tag, 0, x, x); if(!(old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && x->x_gui.x_fsf.x_snd_able) sys_vgui(".x%lx.c delete %lxTGL%so%d\n", canvas, x, nlet_tag, 0); if((old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && !x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxTGL%si%d %si%d %lxTGL outlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxTGL%si%d %si%d %lxTGL %lx outlet}\n", canvas, xpos, ypos, - xpos + IOWIDTH, ypos+1, x, nlet_tag, 0, nlet_tag, 0, x); + xpos + IOWIDTH, ypos+1, x, nlet_tag, 0, nlet_tag, 0, x, x); if(!(old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && x->x_gui.x_fsf.x_rcv_able) sys_vgui(".x%lx.c delete %lxTGL%si%d\n", canvas, x, nlet_tag, 0); } @@ -279,11 +279,11 @@ void toggle_draw_select(t_toggle* x, t_glist* glist) sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor bottom_right_corner\n", sh->h_pathname, SCALEHANDLE_WIDTH, SCALEHANDLE_HEIGHT); - sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxTGL}\n", + sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxTGL %lx}\n", canvas, x->x_gui.x_obj.te_xpix + x->x_gui.x_w - SCALEHANDLE_WIDTH - 1, x->x_gui.x_obj.te_ypix + x->x_gui.x_h - SCALEHANDLE_HEIGHT - 1, SCALEHANDLE_WIDTH, SCALEHANDLE_HEIGHT, - sh->h_pathname, x, x); + sh->h_pathname, x, x, x); sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n", sh->h_pathname, sh->h_bindsym->s_name); sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n", @@ -301,11 +301,11 @@ void toggle_draw_select(t_toggle* x, t_glist* glist) sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair\n", lh->h_pathname, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT); - sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxTGL}\n", + sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxTGL %lx}\n", canvas, x->x_gui.x_obj.te_xpix+ x->x_gui.x_ldx - LABELHANDLE_WIDTH, x->x_gui.x_obj.te_ypix + x->x_gui.x_ldy - LABELHANDLE_HEIGHT, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT, - lh->h_pathname, x, x, x); + lh->h_pathname, x, x, x, x); sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n", lh->h_pathname, lh->h_bindsym->s_name); sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n", diff --git a/pd/src/g_vdial.c b/pd/src/g_vdial.c index d14eb765d39d21ce5060693f5f2c58de1f857c9e..166362eb60fd7dfa2c1dee0a286171efd528a68f 100644 --- a/pd/src/g_vdial.c +++ b/pd/src/g_vdial.c @@ -84,13 +84,13 @@ void vradio_draw_new(t_vradio *x, t_glist *glist) for(i=0; i<n; i++) { - sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -tags {%lxBASE%d %lxVRDO text}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -tags {%lxBASE%d %lxVRDO %lx text}\n", canvas, xx11, yy11, xx12, yy12, - x->x_gui.x_bcol, x, i, x); - sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -outline #%6.6x -tags {%lxBUT%d %lxVRDO text}\n", + x->x_gui.x_bcol, x, i, x, x); + sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -outline #%6.6x -tags {%lxBUT%d %lxVRDO %lx text}\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, x); + (x->x_on==i)?x->x_gui.x_fcol:x->x_gui.x_bcol, x, i, x, x); yy11 += dy; yy12 += dy; yy21 += dy; @@ -98,17 +98,17 @@ void vradio_draw_new(t_vradio *x, t_glist *glist) x->x_drawn = x->x_on; } sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ - -font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxVRDO text}\n", + -font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxVRDO %lx text}\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, sys_fontweight, - x->x_gui.x_lcol, x, x); + x->x_gui.x_lcol, x, x, x); if(!x->x_gui.x_fsf.x_snd_able && canvas == x->x_gui.x_glist) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVRDO%so%d %so%d %lxVRDO outlet}\n", - canvas, xx11, yy11-1, xx11 + IOWIDTH, yy11, x, nlet_tag, 0, nlet_tag, 0, x); + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVRDO%so%d %so%d %lxVRDO %lx outlet}\n", + canvas, xx11, yy11-1, xx11 + IOWIDTH, yy11, x, nlet_tag, 0, nlet_tag, 0, x, x); if(!x->x_gui.x_fsf.x_rcv_able && canvas == x->x_gui.x_glist) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVRDO%si%d %si%d %lxVRDO inlet}\n", - canvas, xx11, yy11b, xx11 + IOWIDTH, yy11b+1, x, nlet_tag, 0, nlet_tag, 0, x); + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVRDO%si%d %si%d %lxVRDO %lx inlet}\n", + canvas, xx11, yy11b, xx11 + IOWIDTH, yy11b+1, x, nlet_tag, 0, nlet_tag, 0, x, x); //} } @@ -248,18 +248,18 @@ void vradio_draw_io(t_vradio* x, t_glist* glist, int old_snd_rcv_flags) else nlet_tag = "bogus"; if((old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && !x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVRDO%so%d %so%d %lxVRDO outlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVRDO%so%d %so%d %lxVRDO %lx outlet}\n", canvas, xpos, ypos+(x->x_number*x->x_gui.x_h)-1, xpos+ IOWIDTH, - ypos+(x->x_number*x->x_gui.x_h), x, nlet_tag, 0, nlet_tag, 0, x); + ypos+(x->x_number*x->x_gui.x_h), x, nlet_tag, 0, nlet_tag, 0, x, x); if(!(old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && x->x_gui.x_fsf.x_snd_able) sys_vgui(".x%lx.c delete %lxVRDO%so%d\n", canvas, x, nlet_tag, 0); if((old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && !x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVRDO%si%d %si%d %lxVRDO inlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVRDO%si%d %si%d %lxVRDO %lx inlet}\n", canvas, xpos, ypos, xpos+ IOWIDTH, ypos+1, - x, nlet_tag, 0, nlet_tag, 0, x); + x, nlet_tag, 0, nlet_tag, 0, x, x); if(!(old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && x->x_gui.x_fsf.x_rcv_able) sys_vgui(".x%lx.c delete %lxVRDO%si%d\n", canvas, x, nlet_tag, 0); } @@ -294,11 +294,11 @@ void vradio_draw_select(t_vradio* x, t_glist* glist) sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor bottom_right_corner\n", sh->h_pathname, SCALEHANDLE_WIDTH, SCALEHANDLE_HEIGHT); - sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxVRDO}\n", + sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxVRDO %lx}\n", canvas, x->x_gui.x_obj.te_xpix + x->x_gui.x_w - SCALEHANDLE_WIDTH - 1, x->x_gui.x_obj.te_ypix + x->x_gui.x_h * x->x_number - SCALEHANDLE_HEIGHT - 1, SCALEHANDLE_WIDTH, SCALEHANDLE_HEIGHT, - sh->h_pathname, x, x); + sh->h_pathname, x, x, x); sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n", sh->h_pathname, sh->h_bindsym->s_name); sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n", @@ -316,11 +316,11 @@ void vradio_draw_select(t_vradio* x, t_glist* glist) sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair\n", lh->h_pathname, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT); - sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH lxVDRO}\n", + sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH lxVDRO %lx}\n", canvas, x->x_gui.x_obj.te_xpix+ x->x_gui.x_ldx - LABELHANDLE_WIDTH, x->x_gui.x_obj.te_ypix + x->x_gui.x_ldy - LABELHANDLE_HEIGHT, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT, - lh->h_pathname, x, x, x); + lh->h_pathname, x, x, x, x); sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n", lh->h_pathname, lh->h_bindsym->s_name); sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n", diff --git a/pd/src/g_vslider.c b/pd/src/g_vslider.c index e7333d3d382e082769d3a95394680907bfc95818..ad211c43d8a33f9ae46804daa84da236ccf87e92 100644 --- a/pd/src/g_vslider.c +++ b/pd/src/g_vslider.c @@ -96,31 +96,31 @@ static void vslider_draw_new(t_vslider *x, t_glist *glist) if (yyyy) nlet_tag = rtext_gettag(yyyy); else nlet_tag = "bogus"; - sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -tags {%lxBASE %lxVSLDR text}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -tags {%lxBASE %lxVSLDR %lx text}\n", canvas, xpos, ypos, xpos + x->x_gui.x_w, ypos + x->x_gui.x_h+5, - x->x_gui.x_bcol, x, x); - sys_vgui(".x%lx.c create line %d %d %d %d -width 3 -fill #%6.6x -tags {%lxKNOB %lxVSLDR text}\n", + x->x_gui.x_bcol, x, x, x); + sys_vgui(".x%lx.c create line %d %d %d %d -width 3 -fill #%6.6x -tags {%lxKNOB %lxVSLDR %lx text}\n", canvas, xpos+2, r, - xpos + x->x_gui.x_w-1, r, x->x_gui.x_fcol, x, x); + xpos + x->x_gui.x_w-1, r, x->x_gui.x_fcol, x, x, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ - -font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxVSLDR text}\n", + -font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxVSLDR %lx text}\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, sys_fontweight, - x->x_gui.x_lcol, x, x); + x->x_gui.x_lcol, x, x, x); if(!x->x_gui.x_fsf.x_snd_able && canvas == x->x_gui.x_glist) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVSLDR%so%d %so%d %lxVSLDR outlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVSLDR%so%d %so%d %lxVSLDR %lx outlet}\n", canvas, xpos, ypos + x->x_gui.x_h+4, xpos+7, ypos + x->x_gui.x_h+5, - x, nlet_tag, 0, nlet_tag, 0, x); + x, nlet_tag, 0, nlet_tag, 0, x, x); if(!x->x_gui.x_fsf.x_rcv_able && canvas == x->x_gui.x_glist) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVSLDR%si%d %si%d %lxVSLDR inlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVSLDR%si%d %si%d %lxVSLDR %lx inlet}\n", canvas, xpos, ypos, xpos+7, ypos+1, - x, nlet_tag, 0, nlet_tag, 0, x); + x, nlet_tag, 0, nlet_tag, 0, x, x); //} } @@ -246,19 +246,19 @@ static void vslider_draw_io(t_vslider* x,t_glist* glist, int old_snd_rcv_flags) else nlet_tag = "bogus"; if((old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && !x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVSLDR%so%d %so%d %lxVSLDR outlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVSLDR%so%d %so%d %lxVSLDR %lx outlet}\n", canvas, xpos, ypos + x->x_gui.x_h+4, xpos+7, ypos + x->x_gui.x_h+5, - x, nlet_tag, 0, nlet_tag, 0, x); + x, nlet_tag, 0, nlet_tag, 0, x, x); if(!(old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && x->x_gui.x_fsf.x_snd_able) sys_vgui(".x%lx.c delete %lxVSLDR%so%d\n", canvas, x, nlet_tag, 0); if((old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && !x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVSLDR%si%d %si%d %lxVSLDR inlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVSLDR%si%d %si%d %lxVSLDR %lx inlet}\n", canvas, xpos, ypos, xpos+7, ypos+1, - x, nlet_tag, 0, nlet_tag, 0, x); + x, nlet_tag, 0, nlet_tag, 0, x, x); if(!(old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && x->x_gui.x_fsf.x_rcv_able) sys_vgui(".x%lx.c delete %lxVSLDR%si%d\n", canvas, x, nlet_tag, 0); } @@ -288,11 +288,11 @@ static void vslider_draw_select(t_vslider *x, t_glist *glist) sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor bottom_right_corner\n", sh->h_pathname, SCALEHANDLE_WIDTH, SCALEHANDLE_HEIGHT); - sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxVSLDR}\n", + sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxVSLDR %lx}\n", canvas, x->x_gui.x_obj.te_xpix + x->x_gui.x_w - SCALEHANDLE_WIDTH - 1, x->x_gui.x_obj.te_ypix + 5 + x->x_gui.x_h - SCALEHANDLE_HEIGHT - 1, SCALEHANDLE_WIDTH, SCALEHANDLE_HEIGHT, - sh->h_pathname, x, x); + sh->h_pathname, x, x, x); sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n", sh->h_pathname, sh->h_bindsym->s_name); sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n", @@ -310,11 +310,11 @@ static void vslider_draw_select(t_vslider *x, t_glist *glist) sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair\n", lh->h_pathname, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT); - sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxVSLDR}\n", + sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxVSLDR %lx}\n", canvas, x->x_gui.x_obj.te_xpix+ x->x_gui.x_ldx - LABELHANDLE_WIDTH, x->x_gui.x_obj.te_ypix + x->x_gui.x_ldy - LABELHANDLE_HEIGHT, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT, - lh->h_pathname, x, x, x); + lh->h_pathname, x, x, x, x); sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n", lh->h_pathname, lh->h_bindsym->s_name); sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n", diff --git a/pd/src/g_vumeter.c b/pd/src/g_vumeter.c index ce8238d57741802c67241bf31fc54f15ee2d0141..3732f7e25a9e033a4ba95944fe57fa21e1db4863 100644 --- a/pd/src/g_vumeter.c +++ b/pd/src/g_vumeter.c @@ -131,70 +131,70 @@ static void vu_draw_new(t_vu *x, t_glist *glist) if (yyyy) nlet_tag = rtext_gettag(yyyy); else nlet_tag = "bogus"; - sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -tags {%lxBASE %lxVU text}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -tags {%lxBASE %lxVU %lx text}\n", canvas, xpos, ypos, xpos+x->x_gui.x_w+2, - ypos+x->x_gui.x_h+4, x->x_gui.x_bcol, x, x); + ypos+x->x_gui.x_h+4, x->x_gui.x_bcol, x, x, x); for(i=1; i<=IEM_VU_STEPS; i++) { led_col = iemgui_vu_col[i]; yyy = k4 + k1*(k2-i); - sys_vgui(".x%lx.c create line %d %d %d %d -width %d -fill #%6.6x -tags {%lxRLED%d %lxVU text}\n", - canvas, quad1+1, yyy+2, quad3+1, yyy+2, x->x_led_size, iemgui_color_hex[led_col], x, i, x); + sys_vgui(".x%lx.c create line %d %d %d %d -width %d -fill #%6.6x -tags {%lxRLED%d %lxVU %lx text}\n", + canvas, quad1+1, yyy+2, quad3+1, yyy+2, x->x_led_size, iemgui_color_hex[led_col], x, i, x, x); if(((i+2)&3) && (x->x_scale)) sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ - -font {{%s} -%d %s} -fill #%6.6x -tags {%lxSCALE%d %lxVU text}\n", + -font {{%s} -%d %s} -fill #%6.6x -tags {%lxSCALE%d %lxVU %lx text}\n", canvas, end+1, yyy+k3+2, iemgui_vu_scale_str[i], x->x_gui.x_font, x->x_gui.x_fontsize, - sys_fontweight, x->x_gui.x_lcol, x, i, x); + sys_fontweight, x->x_gui.x_lcol, x, i, x, x); } if(x->x_scale) { i=IEM_VU_STEPS+1; yyy = k4 + k1*(k2-i); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ - -font {{%s} -%d %s} -fill #%6.6x -tags {%lxSCALE%d %lxVU text}\n", + -font {{%s} -%d %s} -fill #%6.6x -tags {%lxSCALE%d %lxVU %lx text}\n", canvas, end+1, yyy+k3+2, iemgui_vu_scale_str[i], x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, - x->x_gui.x_lcol, x, i, x); + x->x_gui.x_lcol, x, i, x, x); } - sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -outline #%6.6x -tags {%lxRCOVER %lxVU text}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -fill #%6.6x -outline #%6.6x -tags {%lxRCOVER %lxVU %lx text}\n", canvas, quad1+1, ypos+1, quad3, - ypos+1 + k1*IEM_VU_STEPS, x->x_gui.x_bcol, x->x_gui.x_bcol, x, x); - sys_vgui(".x%lx.c create line %d %d %d %d -width %d -fill #%6.6x -tags {%lxPLED %lxVU text}\n", + ypos+1 + k1*IEM_VU_STEPS, x->x_gui.x_bcol, x->x_gui.x_bcol, x, x, x); + sys_vgui(".x%lx.c create line %d %d %d %d -width %d -fill #%6.6x -tags {%lxPLED %lxVU %lx text}\n", canvas, mid+1, ypos+12, - mid+1, ypos+12, x->x_led_size, x->x_gui.x_bcol, x, x); + mid+1, ypos+12, x->x_led_size, x->x_gui.x_bcol, x, x, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ - -font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxVU text}\n", + -font {{%s} -%d %s} -fill #%6.6x -tags {%lxLABEL %lxVU %lx text}\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, sys_fontweight, - x->x_gui.x_lcol, x, x); + x->x_gui.x_lcol, x, x, x); if(!x->x_gui.x_fsf.x_snd_able && canvas == x->x_gui.x_glist) { - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVU%so%d %so%d %lxVU outlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVU%so%d %so%d %lxVU %lx outlet}\n", canvas, xpos, ypos + x->x_gui.x_h+3, xpos + IOWIDTH, ypos + x->x_gui.x_h+4, - x, nlet_tag, 0, nlet_tag, 0, x); - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVU%so%d %so%d %lxVU outlet}\n", + x, nlet_tag, 0, nlet_tag, 0, x, x); + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVU%so%d %so%d %lxVU %lx outlet}\n", canvas, xpos+x->x_gui.x_w+2-IOWIDTH, ypos + x->x_gui.x_h+3, xpos+x->x_gui.x_w+2, ypos + x->x_gui.x_h+4, - x, nlet_tag, 1, nlet_tag, 1, x); + x, nlet_tag, 1, nlet_tag, 1, x, x); } if(!x->x_gui.x_fsf.x_rcv_able && canvas == x->x_gui.x_glist) { - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVU%si%d %si%d %lxVU inlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVU%si%d %si%d %lxVU %lx inlet}\n", canvas, xpos, ypos, xpos + IOWIDTH, ypos+1, - x, nlet_tag, 0, nlet_tag, 0, x); - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVU%si%d %si%d %lxVU inlet}\n", + x, nlet_tag, 0, nlet_tag, 0, x, x); + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVU%si%d %si%d %lxVU %lx inlet}\n", canvas, xpos+x->x_gui.x_w+2-IOWIDTH, ypos, xpos+x->x_gui.x_w+2, ypos+1, - x, nlet_tag, 1, nlet_tag, 1, x); + x, nlet_tag, 1, nlet_tag, 1, x, x); } x->x_updaterms = x->x_updatepeak = 1; sys_queuegui(x, x->x_gui.x_glist, vu_draw_update); @@ -410,16 +410,16 @@ static void vu_draw_io(t_vu* x, t_glist* glist, int old_snd_rcv_flags) if((old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && !x->x_gui.x_fsf.x_snd_able) { - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVU%so%d %so%d %lxVU outlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVU%so%d %so%d %lxVU %lx outlet}\n", canvas, xpos, ypos + x->x_gui.x_h+3, xpos + IOWIDTH, ypos + x->x_gui.x_h+4, - x, nlet_tag, 0, nlet_tag, 0, x); - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVU%so%d %so%d %lxVU outlet}\n", + x, nlet_tag, 0, nlet_tag, 0, x, x); + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVU%so%d %so%d %lxVU %lx outlet}\n", canvas, xpos+x->x_gui.x_w+2-IOWIDTH, ypos + x->x_gui.x_h+3, xpos+x->x_gui.x_w+2, ypos + x->x_gui.x_h+4, - x, nlet_tag, 1, nlet_tag, 1, x); + x, nlet_tag, 1, nlet_tag, 1, x, x); } if(!(old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && x->x_gui.x_fsf.x_snd_able) { @@ -428,16 +428,16 @@ static void vu_draw_io(t_vu* x, t_glist* glist, int old_snd_rcv_flags) } if((old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && !x->x_gui.x_fsf.x_rcv_able) { - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVU%si%d %si%d %lxVU outlet}\n", + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVU%si%d %si%d %lxVU %lx outlet}\n", canvas, xpos, ypos, xpos + IOWIDTH, ypos+1, - x, nlet_tag, 0, nlet_tag, 0, x); - sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVU%si%d %si%d %lxVU outlet}\n", + x, nlet_tag, 0, nlet_tag, 0, x, x); + sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags {%lxVU%si%d %si%d %lxVU %lx outlet}\n", canvas, xpos+x->x_gui.x_w+2-IOWIDTH, ypos, xpos+x->x_gui.x_w+2, ypos+1, - x, nlet_tag, 1, nlet_tag, 1, x); + x, nlet_tag, 1, nlet_tag, 1, x, x); } if(!(old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && x->x_gui.x_fsf.x_rcv_able) { @@ -484,11 +484,11 @@ static void vu_draw_select(t_vu* x,t_glist* glist) sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor bottom_right_corner\n", sh->h_pathname, SCALEHANDLE_WIDTH, SCALEHANDLE_HEIGHT); - sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxVU}\n", + sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxSCALE %lxVU %lx}\n", canvas, x->x_gui.x_obj.te_xpix + x->x_gui.x_w + 2 - SCALEHANDLE_WIDTH - 1, x->x_gui.x_obj.te_ypix + x->x_gui.x_h + 4 - SCALEHANDLE_HEIGHT - 1, SCALEHANDLE_WIDTH, SCALEHANDLE_HEIGHT, - sh->h_pathname, x, x); + sh->h_pathname, x, x, x); sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n", sh->h_pathname, sh->h_bindsym->s_name); sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n", @@ -505,11 +505,11 @@ static void vu_draw_select(t_vu* x,t_glist* glist) sys_vgui("canvas %s -width %d -height %d -bg $select_color -bd 0 -cursor crosshair\n", lh->h_pathname, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT); - sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxVU}\n", + sys_vgui(".x%x.c create window %d %d -anchor nw -width %d -height %d -window %s -tags {%lxLABEL %lxLABELH %lxVU %lx}\n", canvas, x->x_gui.x_obj.te_xpix+ x->x_gui.x_ldx - LABELHANDLE_WIDTH, x->x_gui.x_obj.te_ypix + x->x_gui.x_ldy - LABELHANDLE_HEIGHT, LABELHANDLE_WIDTH, LABELHANDLE_HEIGHT, - lh->h_pathname, x, x, x); + lh->h_pathname, x, x, x, x); sys_vgui("bind %s <Button> {pd [concat %s _click 1 %%x %%y \\;]}\n", lh->h_pathname, lh->h_bindsym->s_name); sys_vgui("bind %s <ButtonRelease> {pd [concat %s _click 0 0 0 \\;]}\n", @@ -922,18 +922,18 @@ static void vu_scale(t_vu *x, t_floatarg fscale) yyy = k4 + k1*(k2-i); if((i+2)&3) sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ - -font {{%s} -%d %s} -fill #%6.6x -tags {%lxSCALE%d %lxVU}\n", + -font {{%s} -%d %s} -fill #%6.6x -tags {%lxSCALE%d %lxVU %lx}\n", canvas, end+1, yyy+k3+2, iemgui_vu_scale_str[i], x->x_gui.x_font, x->x_gui.x_fontsize, - sys_fontweight, x->x_gui.x_lcol, x, i, x); + sys_fontweight, x->x_gui.x_lcol, x, i, x, x); } i=IEM_VU_STEPS+1; yyy = k4 + k1*(k2-i); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ - -font {{%s} -%d %s} -fill #%6.6x -tags {%lxSCALE%d %lxVU}\n", + -font {{%s} -%d %s} -fill #%6.6x -tags {%lxSCALE%d %lxVU %lx}\n", canvas, end+1, yyy+k3+2, iemgui_vu_scale_str[i], x->x_gui.x_font, x->x_gui.x_fontsize, - sys_fontweight, x->x_gui.x_lcol, x, i, x); + sys_fontweight, x->x_gui.x_lcol, x, i, x, x); } } }