Commit cb07afb7 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

added iemgui labels, graph ticks/labels

parent 76f25790
...@@ -41,7 +41,7 @@ text { ...@@ -41,7 +41,7 @@ text {
.xlet_control { .xlet_control {
stroke: red; stroke: red;
fill: gray; fill: gray;
stroke-width: 1; // stroke-width: 1;
} }
.xlet_signal { .xlet_signal {
...@@ -56,8 +56,30 @@ text { ...@@ -56,8 +56,30 @@ text {
stroke-width: 1; stroke-width: 1;
} }
.iemgui_label_selected {
fill: blue;
}
@-webkit-keyframes fizzle {
0% {
stroke-width: 1;
stroke-opacity: 1;
x: 0;
rx: 1;
ry: 1;
}
100% {
stroke-width: 20;
stroke-opacity: 0.2;
x: 100;
rx: 50;
ry: 50;
}
}
.xlet_selected { .xlet_selected {
stroke: purple !important; stroke: purple !important;
-webkit-animation: fizzle 0.5s linear 1;
} }
//.xlet:hover { //.xlet:hover {
......
...@@ -2567,6 +2567,58 @@ function gui_iemgui_redraw_border(cid, tag, x1, y1, x2, y2) { ...@@ -2567,6 +2567,58 @@ function gui_iemgui_redraw_border(cid, tag, x1, y1, x2, y2) {
}); });
} }
function gui_iemgui_label_new(cid, tag, x, y, color, text, font) {
var g = get_gobj(cid, tag);
var svg_text = create_item(cid, 'text', {
// x and y need to be relative to baseline instead of nw anchor
x: x,
y: y,
// 'font-size': font + 'px',
id: tag + 'label'
});
var text_node = patchwin[cid].window.document.createTextNode(text);
svg_text.appendChild(text_node);
g.appendChild(svg_text);
}
function gui_iemgui_label_set(cid, tag, text) {
get_item(cid, tag + 'label').textContent = text;
}
function gui_iemgui_label_coords(cid, tag, x, y) {
var svg_text = get_item(cid, tag + 'label');
configure_item(svg_text, {
x: x,
y: y
});
}
function gui_iemgui_label_color(cid, tag, color) {
var svg_text = get_item(cid, tag + 'label');
configure_item(svg_text, {
fill: color
});
}
function gui_iemgui_label_select(cid, tag, is_selected) {
var svg_text = get_item(cid, tag + 'label');
if (is_selected) {
svg_text.classList.add('iemgui_label_selected');
} else {
svg_text.classList.remove('iemgui_label_selected');
}
}
function gui_iemgui_label_font(cid, tag, font) {
var svg_text = get_item(cid, tag + 'label');
// This has to wait until we remove the tcl formatting
// that Pd uses for font name/size
// configure_item(svg_text, {
// font: font
// });
}
function gui_create_mycanvas(cid,tag,color,x1,y1,x2_vis,y2_vis,x2,y2) { function gui_create_mycanvas(cid,tag,color,x1,y1,x2_vis,y2_vis,x2,y2) {
var rect_vis = create_item(cid,'rect', { var rect_vis = create_item(cid,'rect', {
width: x2_vis - x1, width: x2_vis - x1,
...@@ -2840,18 +2892,25 @@ exports.popup_action = popup_action; ...@@ -2840,18 +2892,25 @@ exports.popup_action = popup_action;
// Graphs and Arrays // Graphs and Arrays
function gui_graph_drawborder(cid, tag, x1, y1, x2, y2) { // Doesn't look like we needs this
var svgelem = get_item(cid, 'patchsvg');
var b = create_item(cid, 'rect', { //function gui_graph_drawborder(cid, tag, x1, y1, x2, y2) {
x: x1, // var g = get_gobj(cid, tag);
y: y1, // var b = create_item(cid, 'rect', {
width: x2 - x1, // width: x2 - x1,
height: y2 - y1, // height: y2 - y1,
stroke: 'black', // stroke: 'black',
fill: 'none', // fill: 'none',
id: tag // id: tag
// });
// g.appendChild(b);
//}
function gui_graph_fill_border(cid, tag) {
var b = get_item(cid, tag + 'border');
configure_item(b, {
fill: 'gray'
}); });
svgelem.appendChild(b);
} }
function gui_graph_deleteborder(cid, tag) { function gui_graph_deleteborder(cid, tag) {
...@@ -2859,6 +2918,68 @@ function gui_graph_deleteborder(cid, tag) { ...@@ -2859,6 +2918,68 @@ function gui_graph_deleteborder(cid, tag) {
b.parentNode.removeChild(b); b.parentNode.removeChild(b);
} }
function gui_graph_label(cid, tag, y, array_name, font, font_size,
font_weight, is_selected) {
// var graph = get_item(
}
function gui_graph_vtick(cid, tag, x, up_y, down_y, tick_pix, basex, basey) {
var g = get_gobj(cid, tag);
// Don't think these need an ID...
var up_tick = create_item(cid, 'line', {
stroke: 'black',
x1: x - basex,
y1: up_y - basey,
x2: x - basex,
y2: up_y - tick_pix - basey
});
var down_tick = create_item(cid, 'line', {
stroke: 'black',
x1: x - basex,
y1: down_y - basey,
x2: x - basex,
y2: down_y + tick_pix - basey
});
g.appendChild(up_tick);
g.appendChild(down_tick);
}
function gui_graph_htick(cid, tag, y, r_x, l_x, tick_pix, basex, basey) {
var g = get_gobj(cid, tag);
// Don't think these need an ID...
var left_tick = create_item(cid, 'line', {
stroke: 'black',
x1: l_x - basex,
y1: y - basey,
x2: l_x - tick_pix - basex,
y2: y - basey,
id: "fuckoff" + y
});
var right_tick = create_item(cid, 'line', {
stroke: 'black',
x1: r_x - basex,
y1: y - basey,
x2: r_x + tick_pix - basex,
y2: y - basey
});
g.appendChild(left_tick);
g.appendChild(right_tick);
}
function gui_graph_tick_label(cid, tag, x, y, text, font, font_size, font_weight, basex, basey) {
var g = get_gobj(cid, tag);
var svg_text = create_item(cid, 'text', {
// need a label "y" relative to baseline
x: x - basex,
y: y - basey,
'font-size': font_size,
});
var text_node = patchwin[cid].window.document.createTextNode(text);
svg_text.appendChild(text_node);
g.appendChild(svg_text);
}
function gui_canvas_drawredrect(cid, x1, y1, x2, y2) { function gui_canvas_drawredrect(cid, x1, y1, x2, y2) {
var svgelem = get_item(cid, 'patchsvg'); var svgelem = get_item(cid, 'patchsvg');
var b = create_item(cid, 'rect', { var b = create_item(cid, 'rect', {
......
...@@ -104,3 +104,14 @@ Everything else: ...@@ -104,3 +104,14 @@ Everything else:
conditionally fill the slots conditionally fill the slots
* fix font shits (can't use 'hanging' base-line dominant because it doesn't * fix font shits (can't use 'hanging' base-line dominant because it doesn't
scale correctly) scale correctly)
* iemgui font configuration -- de-tcl-ize the {fontface fontsize} tcl list,
then make it work
* do msg box click animation in css
* tgl 'X' doesn't show up
* gui_graph_fill_border: use css class selectors instead of configuration
* standardize javascript function names
Crashers
--------
copy/paste from menu gives ECONN
...@@ -233,6 +233,10 @@ void iemgui_label(t_iemgui *x, t_symbol *s) ...@@ -233,6 +233,10 @@ void iemgui_label(t_iemgui *x, t_symbol *s)
sys_vgui(".x%lx.c itemconfigure %lxLABEL -text {%s} \n", sys_vgui(".x%lx.c itemconfigure %lxLABEL -text {%s} \n",
glist_getcanvas(x->x_glist), x, glist_getcanvas(x->x_glist), x,
s!=s_empty?x->x_lab->s_name:""); s!=s_empty?x->x_lab->s_name:"");
gui_vmess("gui_iemgui_label_set", "sss",
canvas_tag(glist_getcanvas(x->x_glist)),
gobj_tag(x),
s != s_empty ? x->x_lab->s_name : "");
iemgui_shouldvis(x, IEM_GUI_DRAW_MODE_CONFIG); iemgui_shouldvis(x, IEM_GUI_DRAW_MODE_CONFIG);
} }
} }
...@@ -243,10 +247,15 @@ void iemgui_label_pos(t_iemgui *x, t_symbol *s, int ac, t_atom *av) ...@@ -243,10 +247,15 @@ void iemgui_label_pos(t_iemgui *x, t_symbol *s, int ac, t_atom *av)
x->x_ldy = atom_getintarg(1, ac, av); x->x_ldy = atom_getintarg(1, ac, av);
if(glist_isvisible(x->x_glist)) if(glist_isvisible(x->x_glist))
{ {
sys_vgui(".x%lx.c coords %lxLABEL %d %d\n", //sys_vgui(".x%lx.c coords %lxLABEL %d %d\n",
glist_getcanvas(x->x_glist), x, // glist_getcanvas(x->x_glist), x,
text_xpix((t_object *)x,x->x_glist)+x->x_ldx, // text_xpix((t_object *)x,x->x_glist)+x->x_ldx,
text_ypix((t_object *)x,x->x_glist)+x->x_ldy); // text_ypix((t_object *)x,x->x_glist)+x->x_ldy);
gui_vmess("gui_iemgui_label_coords", "ssii",
canvas_tag(glist_getcanvas(x->x_glist)),
gobj_tag(x),
x->x_ldx,
x->x_ldy);
iemgui_shouldvis(x, IEM_GUI_DRAW_MODE_CONFIG); iemgui_shouldvis(x, IEM_GUI_DRAW_MODE_CONFIG);
} }
} }
...@@ -259,8 +268,12 @@ void iemgui_label_font(t_iemgui *x, t_symbol *s, int ac, t_atom *av) ...@@ -259,8 +268,12 @@ void iemgui_label_font(t_iemgui *x, t_symbol *s, int ac, t_atom *av)
x->x_fontsize = maxi(atom_getintarg(1, ac, av),4); x->x_fontsize = maxi(atom_getintarg(1, ac, av),4);
if(glist_isvisible(x->x_glist)) if(glist_isvisible(x->x_glist))
{ {
sys_vgui(".x%lx.c itemconfigure %lxLABEL -font %s\n", //sys_vgui(".x%lx.c itemconfigure %lxLABEL -font %s\n",
glist_getcanvas(x->x_glist), x, iemgui_font(x)); // glist_getcanvas(x->x_glist), x, iemgui_font(x));
gui_vmess("gui_iemgui_label_font", "sss",
canvas_tag(glist_getcanvas(x->x_glist)),
gobj_tag(x),
iemgui_font(x));
iemgui_shouldvis(x, IEM_GUI_DRAW_MODE_CONFIG); iemgui_shouldvis(x, IEM_GUI_DRAW_MODE_CONFIG);
} }
} }
...@@ -496,9 +509,7 @@ void iemgui_displace_withtag(t_gobj *z, t_glist *glist, int dx, int dy) ...@@ -496,9 +509,7 @@ void iemgui_displace_withtag(t_gobj *z, t_glist *glist, int dx, int dy)
void iemgui_select(t_gobj *z, t_glist *glist, int selected) void iemgui_select(t_gobj *z, t_glist *glist, int selected)
{ {
char tagbuf[MAXPDSTRING];
t_iemgui *x = (t_iemgui *)z; t_iemgui *x = (t_iemgui *)z;
sprintf(tagbuf, "x%lx", (long unsigned int)x);
t_canvas *canvas=glist_getcanvas(glist); t_canvas *canvas=glist_getcanvas(glist);
if (selected) if (selected)
x->x_selected = canvas; x->x_selected = canvas;
...@@ -506,7 +517,7 @@ void iemgui_select(t_gobj *z, t_glist *glist, int selected) ...@@ -506,7 +517,7 @@ void iemgui_select(t_gobj *z, t_glist *glist, int selected)
x->x_selected = NULL; x->x_selected = NULL;
//sys_vgui(".x%lx.c itemconfigure {x%lx&&border} -stroke %s\n", canvas, x, //sys_vgui(".x%lx.c itemconfigure {x%lx&&border} -stroke %s\n", canvas, x,
// x->x_selected && x->x_glist == canvas ? selection_color : border_color); // x->x_selected && x->x_glist == canvas ? selection_color : border_color);
gui_vmess("gui_text_select_color", "ss", canvas_string(canvas), tagbuf); gui_vmess("gui_text_select_color", "ss", canvas_tag(canvas), gobj_tag(x));
x->x_draw((void *)z, glist, IEM_GUI_DRAW_MODE_SELECT); x->x_draw((void *)z, glist, IEM_GUI_DRAW_MODE_SELECT);
if (selected < 2) if (selected < 2)
{ {
...@@ -944,52 +955,96 @@ static void scalehandle_check_and_redraw(t_iemgui *x) ...@@ -944,52 +955,96 @@ static void scalehandle_check_and_redraw(t_iemgui *x)
// IEMGUI refactor (by Mathieu) // IEMGUI refactor (by Mathieu)
void iemgui_tag_selected(t_iemgui *x) { void iemgui_tag_selected(t_iemgui *x) {
char tagbuf[MAXPDSTRING];
sprintf(tagbuf, "x%lx", (long unsigned int)x);
t_canvas *canvas=glist_getcanvas(x->x_glist); t_canvas *canvas=glist_getcanvas(x->x_glist);
if(x->x_selected) if(x->x_selected)
{ {
//sys_vgui(".x%lx.c addtag selected withtag x%lx\n", canvas, x); //sys_vgui(".x%lx.c addtag selected withtag x%lx\n", canvas, x);
gui_vmess("gui_text_select", "ss", canvas_string(canvas), tagbuf); gui_vmess("gui_text_select", "ss", canvas_tag(canvas), gobj_tag(x));
} }
else else
{ {
//sys_vgui(".x%lx.c dtag x%lx selected\n", canvas, x); //sys_vgui(".x%lx.c dtag x%lx selected\n", canvas, x);
gui_vmess("gui_text_deselect", "ss", canvas_string(canvas), tagbuf); gui_vmess("gui_text_deselect", "ss", canvas_tag(canvas), gobj_tag(x));
} }
} }
void iemgui_label_draw_new(t_iemgui *x) { void iemgui_label_draw_new(t_iemgui *x) {
char col[8];
t_canvas *canvas=glist_getcanvas(x->x_glist); t_canvas *canvas=glist_getcanvas(x->x_glist);
int x1=text_xpix(&x->x_obj, x->x_glist); int x1=text_xpix(&x->x_obj, x->x_glist);
int y1=text_ypix(&x->x_obj, x->x_glist); int y1=text_ypix(&x->x_obj, x->x_glist);
sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w " //sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w "
"-font %s -fill #%6.6x -tags {%lxLABEL x%lx text iemgui}\n", // "-font %s -fill #%6.6x -tags {%lxLABEL x%lx text iemgui}\n",
canvas, x1+x->x_ldx, y1+x->x_ldy, // canvas, x1+x->x_ldx, y1+x->x_ldy,
x->x_lab!=s_empty?x->x_lab->s_name:"", // x->x_lab!=s_empty?x->x_lab->s_name:"",
iemgui_font(x), x->x_lcol, x, x); // iemgui_font(x), x->x_lcol, x, x);
sprintf(col, "#%6.6x", x->x_lcol);
gui_vmess("gui_iemgui_label_new", "ssiisss",
canvas_tag(canvas),
gobj_tag(x),
x->x_ldx,
x->x_ldy,
col,
x->x_lab != s_empty ? x->x_lab->s_name : "",
iemgui_font(x));
} }
void iemgui_label_draw_move(t_iemgui *x) { void iemgui_label_draw_move(t_iemgui *x) {
t_canvas *canvas=glist_getcanvas(x->x_glist); t_canvas *canvas=glist_getcanvas(x->x_glist);
int x1=text_xpix(&x->x_obj, x->x_glist); int x1=text_xpix(&x->x_obj, x->x_glist);
int y1=text_ypix(&x->x_obj, x->x_glist); int y1=text_ypix(&x->x_obj, x->x_glist);
sys_vgui(".x%lx.c coords %lxLABEL %d %d\n", //sys_vgui(".x%lx.c coords %lxLABEL %d %d\n",
canvas, x, x1+x->x_ldx, y1+x->x_ldy); // canvas, x, x1+x->x_ldx, y1+x->x_ldy);
gui_vmess("gui_iemgui_label_coords", "ssii",
canvas_tag(glist_getcanvas(x->x_glist)),
gobj_tag(x),
x->x_ldx,
x->x_ldy);
} }
void iemgui_label_draw_config(t_iemgui *x) { void iemgui_label_draw_config(t_iemgui *x) {
char col[8];
t_canvas *canvas=glist_getcanvas(x->x_glist); t_canvas *canvas=glist_getcanvas(x->x_glist);
if (x->x_selected == canvas && x->x_glist == canvas) if (x->x_selected == canvas && x->x_glist == canvas)
sys_vgui(".x%lx.c itemconfigure %lxLABEL -font %s " {
"-fill $pd_colors(selection) -text {%s} \n", //sys_vgui(".x%lx.c itemconfigure %lxLABEL -font %s "
canvas, x, iemgui_font(x), // "-fill $pd_colors(selection) -text {%s} \n",
x->x_lab!=s_empty?x->x_lab->s_name:""); // canvas, x, iemgui_font(x),
// x->x_lab!=s_empty?x->x_lab->s_name:"");
gui_vmess("gui_iemgui_label_font", "sss",
canvas_tag(glist_getcanvas(x->x_glist)),
gobj_tag(x),
iemgui_font(x));
gui_vmess("gui_iemgui_label_set", "sss",
canvas_tag(glist_getcanvas(x->x_glist)),
gobj_tag(x),
x->x_lab != s_empty ? x->x_lab->s_name: "");
sprintf(col, "#%6.6x", x->x_lcol);
gui_vmess("gui_iemgui_label_color", "sss",
canvas_tag(canvas),
gobj_tag(x),
col);
}
else else
sys_vgui(".x%lx.c itemconfigure %lxLABEL -font %s " {
"-fill #%6.6x -text {%s} \n", //sys_vgui(".x%lx.c itemconfigure %lxLABEL -font %s "
canvas, x, iemgui_font(x), // "-fill #%6.6x -text {%s} \n",
x->x_lcol, x->x_lab!=s_empty?x->x_lab->s_name:""); // canvas, x, iemgui_font(x),
// x->x_lcol, x->x_lab!=s_empty?x->x_lab->s_name:"");
gui_vmess("gui_iemgui_label_font", "sss",
canvas_tag(glist_getcanvas(x->x_glist)),
gobj_tag(x),
iemgui_font(x));
gui_vmess("gui_iemgui_label_set", "sss",
canvas_tag(glist_getcanvas(x->x_glist)),
gobj_tag(x),
x->x_lab != s_empty ? x->x_lab->s_name: "");
sprintf(col, "#%6.6x", x->x_lcol);
gui_vmess("gui_iemgui_label_color", "sss",
canvas_tag(canvas),
gobj_tag(x),
col);
}
if (x->x_selected == canvas && x->x_glist == canvas) if (x->x_selected == canvas && x->x_glist == canvas)
{ {
t_scalehandle *lh = (t_scalehandle *)(x->x_lhandle); t_scalehandle *lh = (t_scalehandle *)(x->x_lhandle);
...@@ -1003,11 +1058,23 @@ void iemgui_label_draw_config(t_iemgui *x) { ...@@ -1003,11 +1058,23 @@ void iemgui_label_draw_config(t_iemgui *x) {
void iemgui_label_draw_select(t_iemgui *x) { void iemgui_label_draw_select(t_iemgui *x) {
t_canvas *canvas=glist_getcanvas(x->x_glist); t_canvas *canvas=glist_getcanvas(x->x_glist);
if (x->x_selected == canvas && x->x_glist == canvas) if (x->x_selected == canvas && x->x_glist == canvas)
sys_vgui(".x%lx.c itemconfigure %lxLABEL " {
"-fill $pd_colors(selection)\n", canvas, x); //sys_vgui(".x%lx.c itemconfigure %lxLABEL "
// "-fill $pd_colors(selection)\n", canvas, x);
gui_vmess("gui_iemgui_label_select", "ssi",
canvas_tag(canvas),
gobj_tag(x),
1);
}
else else
sys_vgui(".x%lx.c itemconfigure %lxLABEL -fill #%6.6x\n", {
canvas, x, x->x_lcol); //sys_vgui(".x%lx.c itemconfigure %lxLABEL -fill #%6.6x\n",
// canvas, x, x->x_lcol);
gui_vmess("gui_iemgui_label_select", "ssi",
canvas_tag(canvas),
gobj_tag(x),
0);
}
} }
extern t_class *my_numbox_class; extern t_class *my_numbox_class;
...@@ -1015,6 +1082,7 @@ extern t_class *vu_class; ...@@ -1015,6 +1082,7 @@ extern t_class *vu_class;
extern t_class *my_canvas_class; extern t_class *my_canvas_class;
void iemgui_draw_io(t_iemgui *x, int old_sr_flags) void iemgui_draw_io(t_iemgui *x, int old_sr_flags)
{ {
char tagbuf[MAXPDSTRING];
t_canvas *canvas=glist_getcanvas(x->x_glist); t_canvas *canvas=glist_getcanvas(x->x_glist);
if (x->x_glist != canvas) return; // is gop if (x->x_glist != canvas) return; // is gop
t_class *c = pd_class((t_pd *)x); t_class *c = pd_class((t_pd *)x);
...@@ -1044,12 +1112,9 @@ void iemgui_draw_io(t_iemgui *x, int old_sr_flags) ...@@ -1044,12 +1112,9 @@ void iemgui_draw_io(t_iemgui *x, int old_sr_flags)
// canvas, x1+i*k, y2-1, x1+i*k + IOWIDTH, y2, // canvas, x1+i*k, y2-1, x1+i*k + IOWIDTH, y2,
// iem_get_tag(canvas, x), i, x, // iem_get_tag(canvas, x), i, x,
// x->x_selected == x->x_glist ? "iemgui selected" : "iemgui"); // x->x_selected == x->x_glist ? "iemgui selected" : "iemgui");
char parenttagbuf[MAXPDSTRING];
char tagbuf[MAXPDSTRING];
sprintf(parenttagbuf, "x%lx", (long unsigned int)x);
sprintf(tagbuf, "%so%d", iem_get_tag(canvas, x), i); sprintf(tagbuf, "%so%d", iem_get_tag(canvas, x), i);
gui_vmess("gui_canvas_drawio", "sssiiiiiisiii", canvas_string(canvas), gui_vmess("gui_canvas_drawio", "sssiiiiiisiii", canvas_tag(canvas),
parenttagbuf, tagbuf, gobj_tag(x), tagbuf,
x1+i*k, y2-1, x1+i*k + IOWIDTH, y2, x1, y1, "o", i, x1+i*k, y2-1, x1+i*k + IOWIDTH, y2, x1, y1, "o", i,
0, 1); 0, 1);
} }
...@@ -1058,10 +1123,9 @@ void iemgui_draw_io(t_iemgui *x, int old_sr_flags) ...@@ -1058,10 +1123,9 @@ void iemgui_draw_io(t_iemgui *x, int old_sr_flags)
{ {
//sys_vgui(".x%lx.c delete %so%d\n", //sys_vgui(".x%lx.c delete %so%d\n",
// canvas, iem_get_tag(canvas, x), i); // canvas, iem_get_tag(canvas, x), i);
char tagbuf[MAXPDSTRING];
sprintf(tagbuf, "%so%d", iem_get_tag(canvas, x), i); sprintf(tagbuf, "%so%d", iem_get_tag(canvas, x), i);
gui_vmess("gui_eraseio", "ss", gui_vmess("gui_eraseio", "ss",
canvas_string(canvas), tagbuf); canvas_tag(canvas), tagbuf);
} }
a = old_sr_flags & IEM_GUI_OLD_RCV_FLAG; a = old_sr_flags & IEM_GUI_OLD_RCV_FLAG;
...@@ -1077,12 +1141,9 @@ void iemgui_draw_io(t_iemgui *x, int old_sr_flags) ...@@ -1077,12 +1141,9 @@ void iemgui_draw_io(t_iemgui *x, int old_sr_flags)
// canvas, x1+i*k, y1, x1+i*k + IOWIDTH, y1+1, // canvas, x1+i*k, y1, x1+i*k + IOWIDTH, y1+1,
// iem_get_tag(canvas, x), i, x, // iem_get_tag(canvas, x), i, x,
// x->x_selected == x->x_glist ? "iemgui selected" : "iemgui"); // x->x_selected == x->x_glist ? "iemgui selected" : "iemgui");
char parenttagbuf[MAXPDSTRING];
char tagbuf[MAXPDSTRING];
sprintf(parenttagbuf, "x%lx", (long unsigned int)x);
sprintf(tagbuf, "%si%d", iem_get_tag(canvas, x), i); sprintf(tagbuf, "%si%d", iem_get_tag(canvas, x), i);
gui_vmess("gui_canvas_drawio", "sssiiiiiisiii", canvas_string(canvas), gui_vmess("gui_canvas_drawio", "sssiiiiiisiii", canvas_tag(canvas),
parenttagbuf, tagbuf, gobj_tag(x), tagbuf,
x1+i*k, y1, x1+i*k + IOWIDTH, y1+1, x1, y1, "i", i, x1+i*k, y1, x1+i*k + IOWIDTH, y1+1, x1, y1, "i", i,
0, 1); 0, 1);
} }
...@@ -1091,14 +1152,14 @@ void iemgui_draw_io(t_iemgui *x, int old_sr_flags) ...@@ -1091,14 +1152,14 @@ void iemgui_draw_io(t_iemgui *x, int old_sr_flags)
{ {
//sys_vgui(".x%lx.c delete %si%d\n", //sys_vgui(".x%lx.c delete %si%d\n",
// canvas, iem_get_tag(canvas, x), i); // canvas, iem_get_tag(canvas, x), i);
char tagbuf[MAXPDSTRING];
sprintf(tagbuf, "%si%d", iem_get_tag(canvas, x), i); sprintf(tagbuf, "%si%d", iem_get_tag(canvas, x), i);
gui_vmess("gui_eraseio", "ss", gui_vmess("gui_eraseio", "ss",
canvas_string(canvas), tagbuf); canvas_tag(canvas), tagbuf);
} }
} }
void iemgui_io_draw_move(t_iemgui *x) { void iemgui_io_draw_move(t_iemgui *x) {
char tagbuf[MAXPDSTRING];
t_canvas *canvas=glist_getcanvas(x->x_glist); t_canvas *canvas=glist_getcanvas(x->x_glist);
t_class *c = pd_class((t_pd *)x); t_class *c = pd_class((t_pd *)x);
int x1,y1,x2,y2; int x1,y1,x2,y2;
...@@ -1111,10 +1172,9 @@ void iemgui_io_draw_move(t_iemgui *x) { ...@@ -1111,10 +1172,9 @@ void iemgui_io_draw_move(t_iemgui *x) {
{ {
//sys_vgui(".x%lx.c coords %so%d %d %d %d %d\n", //sys_vgui(".x%lx.c coords %so%d %d %d %d %d\n",
// canvas, iem_get_tag(canvas, x), i, x1+i*k, y2-1, x1+i*k+IOWIDTH, y2); // canvas, iem_get_tag(canvas, x), i, x1+i*k, y2-1, x1+i*k+IOWIDTH, y2);
char tagbuf[MAXPDSTRING];
sprintf(tagbuf, "%so%d", iem_get_tag(canvas, x), i); sprintf(tagbuf