Commit ccd0cb65 authored by user's avatar user
Browse files

commented out some more sys_vgui calls that have been replaced by gui_vmess

parent df29048f
......@@ -1565,7 +1565,6 @@ static void garray_doredraw(t_gobj *client, t_glist *glist)
// to be children of their gop <group>
t_scalar *sc = x->x_scalar;
char tagbuf[MAXPDSTRING];
post("did we make it here?");
sprintf(tagbuf, "scalar%lx", (long unsigned int)sc->sc_vec);
gui_vmess("gui_text_select", "ss",
canvas_tag(glist_getcanvas(glist)), tagbuf);
......
......@@ -53,11 +53,11 @@ void bng_draw_new(t_bng *x, t_glist *glist)
t_float cr = (x->x_gui.x_w-2)/2.0;
t_float cx = x1+cr+1.5;
t_float cy = y1+cr+1.5;
sys_vgui(".x%lx.c create circle %f %f -r %f "
"-stroke $pd_colors(iemgui_border) -fill #%6.6x "
"-tags {%lxBUT x%lx text iemgui border}\n",
canvas, cx, cy, cr, x->x_flashed?x->x_gui.x_fcol:x->x_gui.x_bcol,
x, x);
//sys_vgui(".x%lx.c create circle %f %f -r %f "
// "-stroke $pd_colors(iemgui_border) -fill #%6.6x "
// "-tags {%lxBUT x%lx text iemgui border}\n",
// canvas, cx, cy, cr, x->x_flashed?x->x_gui.x_fcol:x->x_gui.x_bcol,
// x, x);
gui_vmess("gui_create_bng", "ssfff", canvas_tag(canvas), tagbuf,
cx - x1 - 0.5, cy - y1 - 0.5, cr);
}
......
......@@ -859,9 +859,9 @@ void canvas_map(t_canvas *x, t_floatarg f)
if (glist_isvisible(x))
{
/* just clear out the whole canvas */
sys_vgui(".x%lx.c dtag all selected\n", x);
//sys_vgui(".x%lx.c delete all\n", x);
sys_vgui("foreach item [.x%lx.c find withtag {(!root)}] { .x%lx.c delete $item }\n", x, x);
//sys_vgui(".x%lx.c dtag all selected\n", x);
//sys_vgui("foreach item [.x%lx.c find withtag {(!root)}] "
// "{ .x%lx.c delete $item }\n", x, x);
gui_vmess("gui_canvas_erase_all_gobjs", "s",
canvas_tag(x));
x->gl_mapped = 0;
......@@ -912,6 +912,7 @@ void glist_menu_open(t_glist *x)
}
else
{
/* Not sure if this is still needed */
sys_vgui("focus .x%lx\n", (t_int)x);
}
}
......@@ -1047,6 +1048,7 @@ void canvas_deletelinesfor(t_canvas *x, t_text *text)
{
sys_vgui(".x%lx.c delete l%lx\n",
glist_getcanvas(x), oc);
/* probably need a gui_vmess here */
}
obj_disconnect(t.tr_ob, t.tr_outno, t.tr_ob2, t.tr_inno);
}
......@@ -1721,7 +1723,10 @@ static void glist_redrawall(t_template *template, t_glist *gl, int action)
else if (g->g_pd == canvas_class)
glist_redrawall(template, (t_glist *)g, action);
}
if (glist_isselected(glist_getcanvas(gl), (t_gobj *)gl)) {
if (glist_isselected(glist_getcanvas(gl), (t_gobj *)gl))
{
/* Haven't tested scalars inside gop yet, but we
probably need a gui_vmess here */
sys_vgui("pdtk_select_all_gop_widgets .x%lx %lx %d\n",
glist_getcanvas(gl), gl, 1);
}
......@@ -1998,6 +2003,7 @@ static void canvas_f(t_canvas *x, t_symbol *s, int argc, t_atom *argv)
}
}
/* Not sure if this is still used... */
void canvasgop_draw_move(t_canvas *x, int doit)
{
//delete the earlier GOP window so that when dragging
......
......@@ -2468,7 +2468,7 @@ void canvas_vis(t_canvas *x, t_floatarg f)
argsbuf);
// This probably needs a gui_vmess */
sys_vgui("pdtk_canvas_set_font .x%lx %d\n", x, x->gl_font);
// canvas_reflecttitle(x);
x->gl_havewindow = 1;
......@@ -4914,7 +4914,7 @@ void canvas_displaceselection(t_canvas *x, int dx, int dy)
}
if (dx || dy)
{
sys_vgui("pdtk_canvas_displace_withtag .x%lx.c %d %d\n", x, dx, dy);
//sys_vgui("pdtk_canvas_displace_withtag .x%lx.c %d %d\n", x, dx, dy);
gui_vmess("gui_canvas_displace_withtag", "sii", canvas_tag(x), dx, dy);
if (resortin) canvas_resortinlets(x);
if (resortout) canvas_resortoutlets(x);
......
......@@ -99,24 +99,24 @@ void magicGlass_updateText(t_magicGlass *x, int moved)
//fprintf(stderr,"%d %d %d : %d %d\n",
// sys_fontheight(x->x_display_font),
// sys_fontwidth(x->x_display_font), x->x_maxSize, x->x_x, bgSize);
sys_vgui(".x%x.c coords magicGlassText %d %d\n",
x->x_c,
x->x_x + 20,
x->x_y);
sys_vgui(".x%x.c coords magicGlassLine %d %d %d %d %d %d\n",
x->x_c,
x->x_x + 8,
x->x_y,
x->x_x + 13,
x->x_y + 5,
x->x_x + 13,
x->x_y - 5);
sys_vgui(".x%x.c coords magicGlassBg %d %d %d %d\n",
x->x_c,
x->x_x + 13,
x->x_y - (int)(sys_fontheight(x->x_display_font)/2) - 3,
bgSize,
x->x_y + (int)(sys_fontheight(x->x_display_font)/2) + 3);
//sys_vgui(".x%x.c coords magicGlassText %d %d\n",
// x->x_c,
// x->x_x + 20,
// x->x_y);
//sys_vgui(".x%x.c coords magicGlassLine %d %d %d %d %d %d\n",
// x->x_c,
// x->x_x + 8,
// x->x_y,
// x->x_x + 13,
// x->x_y + 5,
// x->x_x + 13,
// x->x_y - 5);
//sys_vgui(".x%x.c coords magicGlassBg %d %d %d %d\n",
// x->x_c,
// x->x_x + 13,
// x->x_y - (int)(sys_fontheight(x->x_display_font)/2) - 3,
// bgSize,
// x->x_y + (int)(sys_fontheight(x->x_display_font)/2) + 3);
gui_vmess("gui_cord_inspector_update", "ssiiiiii",
canvas_tag(x->x_c), x->x_string,
x->x_x, x->x_y, bgSize,
......@@ -129,21 +129,21 @@ void magicGlass_updateText(t_magicGlass *x, int moved)
void magicGlass_drawNew(t_magicGlass *x)
{
//fprintf(stderr,"magicglass_drawNew\n");
sys_vgui(".x%x.c create prect 0 0 0 0 -stroke $pd_colors(magic_glass_bg) "
"-fill $pd_colors(magic_glass_bg) -tags magicGlassBg\n",
x->x_c);
sys_vgui(".x%x.c create ppolygon 0 0 0 0 0 0 "
"-fill $pd_colors(magic_glass_bd) -strokewidth 1 "
"-tags magicGlassLine\n",
x->x_c);
sys_vgui(".x%x.c create text 0 0 -text {} -anchor w "
"-fill $pd_colors(magic_glass_flash) "
"-font {{%s} -%d %s} -tags magicGlassText\n",
x->x_c, sys_font, x->x_display_font, sys_fontweight);
sys_vgui(".x%x.c raise magicGlassBg\n",
x->x_c);
sys_vgui(".x%x.c raise magicGlassText\n",
x->x_c);
//sys_vgui(".x%x.c create prect 0 0 0 0 -stroke $pd_colors(magic_glass_bg) "
// "-fill $pd_colors(magic_glass_bg) -tags magicGlassBg\n",
// x->x_c);
//sys_vgui(".x%x.c create ppolygon 0 0 0 0 0 0 "
// "-fill $pd_colors(magic_glass_bd) -strokewidth 1 "
// "-tags magicGlassLine\n",
// x->x_c);
//sys_vgui(".x%x.c create text 0 0 -text {} -anchor w "
// "-fill $pd_colors(magic_glass_flash) "
// "-font {{%s} -%d %s} -tags magicGlassText\n",
// x->x_c, sys_font, x->x_display_font, sys_fontweight);
//sys_vgui(".x%x.c raise magicGlassBg\n",
// x->x_c);
//sys_vgui(".x%x.c raise magicGlassText\n",
// x->x_c);
gui_vmess("gui_text_create_gobj", "sssiii",
canvas_tag(x->x_c), "cord_inspector", "cord_inspector", 0, 0, 0);
gui_vmess("gui_create_cord_inspector", "s",
......@@ -155,9 +155,9 @@ void magicGlass_drawNew(t_magicGlass *x)
void magicGlass_undraw(t_magicGlass *x)
{
//fprintf(stderr,"magicglass_undraw\n");
sys_vgui(".x%x.c delete magicGlassBg\n", x->x_c);
sys_vgui(".x%x.c delete magicGlassLine\n", x->x_c);
sys_vgui(".x%x.c delete magicGlassText\n", x->x_c);
//sys_vgui(".x%x.c delete magicGlassBg\n", x->x_c);
//sys_vgui(".x%x.c delete magicGlassLine\n", x->x_c);
//sys_vgui(".x%x.c delete magicGlassText\n", x->x_c);
gui_vmess("gui_erase_cord_inspector", "s",
canvas_tag(x->x_c));
}
......@@ -165,9 +165,9 @@ void magicGlass_undraw(t_magicGlass *x)
void magicGlass_flashText(t_magicGlass *x)
{
//fprintf(stderr,"magicglass_flashText\n");
sys_vgui(".x%x.c itemconfigure magicGlassText "
"-fill $pd_colors(magic_glass_text)\n",
x->x_c);
//sys_vgui(".x%x.c itemconfigure magicGlassText "
// "-fill $pd_colors(magic_glass_text)\n",
// x->x_c);
gui_vmess("gui_cord_inspector_flash", "s",
canvas_tag(x->x_c));
}
......
......@@ -25,14 +25,14 @@ void my_canvas_draw_new(t_my_canvas *x, t_glist *glist)
int x1=text_xpix(&x->x_gui.x_obj, glist);
int y1=text_ypix(&x->x_gui.x_obj, glist);
sys_vgui(".x%lx.c create prect %d %d %d %d -fill #%6.6x -stroke #%6.6x "
"-tags {%lxRECT x%lx text iemgui}\n",
canvas, x1, y1, x1+x->x_vis_w, y1+x->x_vis_h,
x->x_gui.x_bcol, x->x_gui.x_bcol, x, x);
sys_vgui(".x%lx.c create prect %d %d %d %d -stroke #%6.6x "
"-tags {%lxBASE x%lx text iemgui}\n",
canvas, x1, y1, x1+x->x_gui.x_w, y1+x->x_gui.x_h,
x->x_gui.x_bcol, x, x);
//sys_vgui(".x%lx.c create prect %d %d %d %d -fill #%6.6x -stroke #%6.6x "
// "-tags {%lxRECT x%lx text iemgui}\n",
// canvas, x1, y1, x1+x->x_vis_w, y1+x->x_vis_h,
// x->x_gui.x_bcol, x->x_gui.x_bcol, x, x);
//sys_vgui(".x%lx.c create prect %d %d %d %d -stroke #%6.6x "
// "-tags {%lxBASE x%lx text iemgui}\n",
// canvas, x1, y1, x1+x->x_gui.x_w, y1+x->x_gui.x_h,
// x->x_gui.x_bcol, x, x);
char colorbuf[MAXPDSTRING];
sprintf(colorbuf, "#%6.6x", x->x_gui.x_bcol);
gui_vmess("gui_text_create_gobj", "sssiii", canvas_tag(canvas),
......@@ -49,10 +49,10 @@ void my_canvas_draw_move(t_my_canvas *x, t_glist *glist)
int x1=text_xpix(&x->x_gui.x_obj, glist);
int y1=text_ypix(&x->x_gui.x_obj, glist);
sys_vgui(".x%lx.c coords %lxRECT %d %d %d %d\n",
canvas, x, x1, y1, x1+x->x_vis_w, y1+x->x_vis_h);
sys_vgui(".x%lx.c coords %lxBASE %d %d %d %d\n",
canvas, x, x1, y1, x1+x->x_gui.x_w, y1+x->x_gui.x_h);
//sys_vgui(".x%lx.c coords %lxRECT %d %d %d %d\n",
// canvas, x, x1, y1, x1+x->x_vis_w, y1+x->x_vis_h);
//sys_vgui(".x%lx.c coords %lxBASE %d %d %d %d\n",
// canvas, x, x1, y1, x1+x->x_gui.x_w, y1+x->x_gui.x_h);
gui_vmess("gui_mycanvas_coords", "ssiiii",
canvas_tag(canvas), gobj_tag(x),
x->x_vis_w, x->x_vis_h, x->x_gui.x_w, x->x_gui.x_h);
......@@ -78,9 +78,9 @@ void my_canvas_draw_select(t_my_canvas* x, t_glist* glist)
t_canvas *canvas=glist_getcanvas(glist);
if (x->x_gui.x_glist != glist_getcanvas(glist)) return;
char bcol[8]; sprintf(bcol, "#%6.6x", x->x_gui.x_bcol);
sys_vgui(".x%lx.c itemconfigure %lxBASE -stroke %s\n", canvas, x,
x->x_gui.x_selected == canvas && x->x_gui.x_glist == canvas ?
"$pd_colors(selection)" : bcol);
//sys_vgui(".x%lx.c itemconfigure %lxBASE -stroke %s\n", canvas, x,
// x->x_gui.x_selected == canvas && x->x_gui.x_glist == canvas ?
// "$pd_colors(selection)" : bcol);
gui_vmess("gui_mycanvas_select_color", "sss",
canvas_tag(canvas), gobj_tag(x),
x->x_gui.x_selected == canvas && x->x_gui.x_glist == canvas ?
......
......@@ -179,6 +179,7 @@ static void my_numbox_draw_new(t_my_numbox *x, t_glist *glist)
gui_vmess("gui_create_numbox", "isssiiiiiiiiiiiii", x->x_numwidth,
canvas_tag(canvas), gobj_tag(x),
bcol, x1, y1, x2-4, y1, x2, y1+4, x2, y2, x1, y2, x1, y1, half);
/* Not sure when it is necessary to hide the frame... */
if (!x->x_hide_frame || x->x_hide_frame == 2)
sys_vgui(".x%lx.c create polyline %d %d %d %d %d %d -stroke #%6.6x "
"-tags {%lxBASE2 x%lx text iemgui}\n",
......@@ -196,6 +197,7 @@ static void my_numbox_draw_new(t_my_numbox *x, t_glist *glist)
x->x_buf, x->x_gui.x_fontsize, colorbuf, x1+half+2, y1+half+d, x1, y1);
}
/* Not sure that this is needed anymore */
static void my_numbox_draw_move(t_my_numbox *x, t_glist *glist)
{
t_canvas *canvas=glist_getcanvas(glist);
......@@ -204,15 +206,17 @@ static void my_numbox_draw_move(t_my_numbox *x, t_glist *glist)
int x1=text_xpix(&x->x_gui.x_obj, glist), x2=x1+x->x_numwidth;
int y1=text_ypix(&x->x_gui.x_obj, glist), y2=y1+x->x_gui.x_h;
sys_vgui(".x%lx.c coords %lxBASE1 %d %d %d %d %d %d %d %d %d %d\n",
canvas, x, x1, y1, x2-4, y1, x2, y1+4, x2, y2, x1, y2);
//sys_vgui(".x%lx.c coords %lxBASE1 %d %d %d %d %d %d %d %d %d %d\n",
// canvas, x, x1, y1, x2-4, y1, x2, y1+4, x2, y2, x1, y2);
if (x->x_hide_frame <= 1)
iemgui_io_draw_move(&x->x_gui);
if (!x->x_hide_frame || x->x_hide_frame == 2)
sys_vgui(".x%lx.c coords %lxBASE2 %d %d %d %d %d %d\n",
canvas, x, x1, y1, x1 + half, y1 + half, x1, y2);
sys_vgui(".x%lx.c coords %lxNUMBER %d %d\n",
canvas, x, x1+half+2, y1+half+d);
{
//sys_vgui(".x%lx.c coords %lxBASE2 %d %d %d %d %d %d\n",
// canvas, x, x1, y1, x1 + half, y1 + half, x1, y2);
}
//sys_vgui(".x%lx.c coords %lxNUMBER %d %d\n",
// canvas, x, x1+half+2, y1+half+d);
}
static void my_numbox_draw_config(t_my_numbox* x,t_glist* glist)
......@@ -247,6 +251,8 @@ static void my_numbox_draw_select(t_my_numbox *x, t_glist *glist)
}
char fcol[8]; sprintf(fcol, "#%6.6x", x->x_gui.x_fcol);
char bcol[8]; sprintf(bcol, "#%6.6x", x->x_gui.x_bcol);
// The logic in these sys_vgui calls is being taken care
// of in the gui now...
sys_vgui(".x%lx.c itemconfigure %lxBASE1 -stroke %s\n", canvas, x,
issel ? selection_color : x->x_hide_frame <= 1 ? "$pd_colors(iemgui_border)" : bcol);
sys_vgui(".x%lx.c itemconfigure %lxBASE2 -stroke %s\n", canvas, x,
......
......@@ -515,18 +515,21 @@ void rtext_draw(t_rtext *x)
rtext_senditup(x, SEND_FIRST, &w, &h, &indx);
}
/* Not needed since the rtext gets erased along with the parent gobj group */
void rtext_erase(t_rtext *x)
{
if (x && x->x_glist)
sys_vgui(".x%lx.c delete %s\n", glist_getcanvas(x->x_glist), x->x_tag);
//if (x && x->x_glist)
// sys_vgui(".x%lx.c delete %s\n", glist_getcanvas(x->x_glist), x->x_tag);
}
/* Not needed since the rtext gets erased along with the parent gobj group */
void rtext_displace(t_rtext *x, int dx, int dy)
{
sys_vgui(".x%lx.c move %s %d %d\n", glist_getcanvas(x->x_glist),
x->x_tag, dx, dy);
//sys_vgui(".x%lx.c move %s %d %d\n", glist_getcanvas(x->x_glist),
// x->x_tag, dx, dy);
}
/* Not sure if this is still used */
void rtext_select(t_rtext *x, int state)
{
t_glist *glist = x->x_glist;
......
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