Commit 94a039fd authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

Death to tcl Part 1 (cont.): g_scalar.c

parent fe3fc457
......@@ -546,11 +546,6 @@ void scalar_drawselectrect(t_scalar *x, t_glist *glist, int state)
glist_xtopixels(glist, 0);
t_float yscale = glist_ytopixels(glist, 1) -
glist_ytopixels(glist, 0);
//sys_vgui(".x%lx.c create prect %d %d %d %d "
// "-strokewidth 1 -stroke $pd_colors(selection) "
// "-tags {select%lx selected}\n",
// glist_getcanvas(glist), x1, y1, x2, y2,
// x);
gui_vmess("gui_scalar_draw_select_rect", "xsiiiiiff",
glist_getcanvas(glist), tagbuf,
state,
......@@ -566,7 +561,6 @@ void scalar_drawselectrect(t_scalar *x, t_glist *glist, int state)
{
if (glist_istoplevel(glist))
{
//sys_vgui(".x%lx.c delete select%lx\n", glist_getcanvas(glist), x);
gui_vmess("gui_scalar_draw_select_rect", "xsiiiiiii",
glist_getcanvas(glist), tagbuf,
state,
......@@ -607,20 +601,12 @@ void scalar_select(t_gobj *z, t_glist *owner, int state)
if (state)
{
x->sc_selected = owner;
//sys_vgui(".x%lx.c addtag selected withtag blankscalar%lx\n",
// glist_getcanvas(owner), x);
//sys_vgui(".x%lx.c addtag scalar_selected withtag {.scalar%lx}\n",
// glist_getcanvas(owner), x->sc_vec);
gui_vmess("gui_gobj_select", "xs",
glist_getcanvas(owner), tagbuf);
}
else
{
x->sc_selected = 0;
//sys_vgui(".x%lx.c dtag blankscalar%lx selected\n",
// glist_getcanvas(owner), x);
//sys_vgui(".x%lx.c dtag .scalar%lx scalar_selected\n",
// glist_getcanvas(owner), x->sc_vec);
gui_vmess("gui_gobj_deselect", "xs",
glist_getcanvas(owner), tagbuf);
}
......@@ -877,10 +863,6 @@ static void scalar_groupvis(t_scalar *x, t_glist *owner, t_template *template,
t_gobj *y;
if (vis)
{
//sys_vgui(".x%lx.c create group -tags {.dgroup%lx.%lx} "
// "-parent {.dgroup%lx.%lx}\\\n",
// glist_getcanvas(owner), gl, x->sc_vec,
// parent, x->sc_vec);
char tagbuf[MAXPDSTRING];
sprintf(tagbuf, "dgroup%lx.%lx", (long unsigned int)gl,
(long unsigned int)x->sc_vec);
......@@ -992,14 +974,6 @@ static void scalar_vis(t_gobj *z, t_glist *owner, int vis)
To fix these, we set the correct fill/stroke/strokelinjoin options
here on the .scalar%lx group. (Notice also that tkpath doesn't
understand "None"-- instead we must send an empty symbol.) */
//sys_vgui(".x%lx.c create group -tags {.scalar%lx %s} "
// "-matrix { {%g %g} {%g %g} {%d %d} } "
// "-stroke \"\" -fill black -strokelinejoin miter\n",
// glist_getcanvas(owner), x->sc_vec,
// (glist_isselected(owner, &x->sc_gobj) ? "scalar_selected" : ""),
// xscale, 0.0, 0.0, yscale, (int)glist_xtopixels(owner, basex),
// (int)glist_ytopixels(owner, basey)
// );
char tagbuf[MAXPDSTRING];
sprintf(tagbuf, "scalar%lx", (long unsigned int)x->sc_vec);
gui_vmess("gui_create_scalar", "xsiffffiii",
......@@ -1010,9 +984,6 @@ static void scalar_vis(t_gobj *z, t_glist *owner, int vis)
(int)glist_xtopixels(owner, basex),
(int)glist_ytopixels(owner, basey),
glist_istoplevel(owner));
//sys_vgui(".x%lx.c create group -tags {.dgroup%lx.%lx} "
// "-parent {.scalar%lx}\n",
// glist_getcanvas(owner), templatecanvas, x->sc_vec, x->sc_vec);
char groupbuf[MAXPDSTRING];
// Quick hack to make gui_create_scalar_group more general (so we
// don't have to tack on "gobj" manually)
......@@ -1044,8 +1015,6 @@ static void scalar_vis(t_gobj *z, t_glist *owner, int vis)
}
if (!vis)
{
//sys_vgui(".x%lx.c delete .scalar%lx\n", glist_getcanvas(owner),
// x->sc_vec);
char tagbuf[MAXPDSTRING];
sprintf(tagbuf, "scalar%lx", (long unsigned int)x->sc_vec);
gui_vmess("gui_scalar_erase", "xs",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment