Commit 33b24e85 authored by Mathieu L Bouchard's avatar Mathieu L Bouchard
Browse files

fix last commit (4th refactor)

parent 2dff3561
...@@ -950,9 +950,9 @@ const char *nlet_tag, const char *class_tag) { ...@@ -950,9 +950,9 @@ const char *nlet_tag, const char *class_tag) {
h->h_vis = 1; h->h_vis = 1;
} }
void scalehandle_draw_select2(t_iemgui *x, t_glist *canvas, const char *class_tag) { void scalehandle_draw_select2(t_iemgui *x, t_glist *canvas, const char *class_tag, int sx, int sy) {
char *nlet_tag = iem_get_tag(canvas, (t_iemgui *)x); char *nlet_tag = iem_get_tag(canvas, (t_iemgui *)x);
scalehandle_draw_select(x->x_handle,canvas,x->x_w-1,x->x_h-1,nlet_tag,class_tag); scalehandle_draw_select(x->x_handle,canvas,sx,sy,nlet_tag,class_tag);
if (strcmp(x->x_lab->s_name, "empty") != 0) if (strcmp(x->x_lab->s_name, "empty") != 0)
{ {
scalehandle_draw_select(x->x_lhandle,canvas,x->x_ldx,x->x_ldy,nlet_tag,class_tag); scalehandle_draw_select(x->x_lhandle,canvas,x->x_ldx,x->x_ldy,nlet_tag,class_tag);
......
...@@ -405,7 +405,7 @@ EXTERN void canvas_apply_setundo(t_canvas *x, t_gobj *y); ...@@ -405,7 +405,7 @@ EXTERN void canvas_apply_setundo(t_canvas *x, t_gobj *y);
// scalehandle code, as refactored by Mathieu // scalehandle code, as refactored by Mathieu
EXTERN void scalehandle_bind(t_scalehandle *h); EXTERN void scalehandle_bind(t_scalehandle *h);
EXTERN void scalehandle_draw_select(t_scalehandle *h, t_glist *canvas, int px, int py, const char *nlet_tag, const char *class_tag); EXTERN void scalehandle_draw_select(t_scalehandle *h, t_glist *canvas, int px, int py, const char *nlet_tag, const char *class_tag);
EXTERN void scalehandle_draw_select2(t_iemgui *x, t_glist *canvas, const char *class_tag); EXTERN void scalehandle_draw_select2(t_iemgui *x, t_glist *canvas, const char *class_tag, int sx, int sy);
EXTERN void scalehandle_draw_erase(t_scalehandle *h, t_glist *canvas); EXTERN void scalehandle_draw_erase(t_scalehandle *h, t_glist *canvas);
EXTERN void scalehandle_draw_erase2(t_iemgui *x, t_glist *canvas); EXTERN void scalehandle_draw_erase2(t_iemgui *x, t_glist *canvas);
EXTERN void scalehandle_draw_new(t_scalehandle *x, t_glist *canvas); EXTERN void scalehandle_draw_new(t_scalehandle *x, t_glist *canvas);
......
...@@ -237,7 +237,8 @@ void bng_draw_select(t_bng* x, t_glist* glist) ...@@ -237,7 +237,8 @@ void bng_draw_select(t_bng* x, t_glist* glist)
"-stroke $pd_colors(selection)\n", canvas, x); "-stroke $pd_colors(selection)\n", canvas, x);
sys_vgui(".x%lx.c itemconfigure %lxLABEL " sys_vgui(".x%lx.c itemconfigure %lxLABEL "
"-fill $pd_colors(selection)\n", canvas, x); "-fill $pd_colors(selection)\n", canvas, x);
scalehandle_draw_select2(&x->x_gui,glist,"BNG"); scalehandle_draw_select2(&x->x_gui,glist,"BNG",
x->x_gui.x_w-1,x->x_gui.x_h-1);
} }
sys_vgui(".x%lx.c addtag selected withtag %lxBNG\n", canvas, x); sys_vgui(".x%lx.c addtag selected withtag %lxBNG\n", canvas, x);
} }
......
...@@ -257,7 +257,8 @@ void hradio_draw_select(t_hradio* x, t_glist* glist) ...@@ -257,7 +257,8 @@ void hradio_draw_select(t_hradio* x, t_glist* glist)
} }
sys_vgui(".x%lx.c itemconfigure %lxLABEL " sys_vgui(".x%lx.c itemconfigure %lxLABEL "
"-fill $pd_colors(selection)\n", canvas, x); "-fill $pd_colors(selection)\n", canvas, x);
scalehandle_draw_select2(&x->x_gui,glist,"HRDO"); scalehandle_draw_select2(&x->x_gui,glist,"HRDO",
x->x_gui.x_w*x->x_number-1,x->x_gui.x_h-1);
} }
sys_vgui(".x%lx.c addtag selected withtag %lxHRDO\n", canvas, x); sys_vgui(".x%lx.c addtag selected withtag %lxHRDO\n", canvas, x);
} }
......
...@@ -238,7 +238,8 @@ static void hslider_draw_select(t_hslider* x,t_glist* glist) ...@@ -238,7 +238,8 @@ static void hslider_draw_select(t_hslider* x,t_glist* glist)
"-stroke $pd_colors(selection)\n", canvas, x); "-stroke $pd_colors(selection)\n", canvas, x);
sys_vgui(".x%lx.c itemconfigure %lxLABEL " sys_vgui(".x%lx.c itemconfigure %lxLABEL "
"-fill $pd_colors(selection)\n", canvas, x); "-fill $pd_colors(selection)\n", canvas, x);
scalehandle_draw_select2(&x->x_gui,glist,"HSLDR"); scalehandle_draw_select2(&x->x_gui,glist,"HSLDR",
x->x_gui.x_w+5-1,x->x_gui.x_h-1);
} }
sys_vgui(".x%lx.c addtag selected withtag %lxHSLDR\n", canvas, x); sys_vgui(".x%lx.c addtag selected withtag %lxHSLDR\n", canvas, x);
} }
......
...@@ -144,7 +144,8 @@ void my_canvas_draw_select(t_my_canvas* x, t_glist* glist) ...@@ -144,7 +144,8 @@ void my_canvas_draw_select(t_my_canvas* x, t_glist* glist)
char *nlet_tag = iem_get_tag(glist, (t_iemgui *)x); char *nlet_tag = iem_get_tag(glist, (t_iemgui *)x);
sys_vgui(".x%lx.c itemconfigure %lxBASE " sys_vgui(".x%lx.c itemconfigure %lxBASE "
"-stroke $pd_colors(selection)\n", canvas, x); "-stroke $pd_colors(selection)\n", canvas, x);
scalehandle_draw_select2(&x->x_gui,glist,"MYCNV"); scalehandle_draw_select2(&x->x_gui,glist,"MYCNV",
x->x_vis_w,x->x_vis_h);
} }
sys_vgui(".x%lx.c addtag selected withtag %lxMYCNV\n", canvas, x); sys_vgui(".x%lx.c addtag selected withtag %lxMYCNV\n", canvas, x);
} }
......
...@@ -458,7 +458,8 @@ static void my_numbox_draw_select(t_my_numbox *x, t_glist *glist) ...@@ -458,7 +458,8 @@ static void my_numbox_draw_select(t_my_numbox *x, t_glist *glist)
"-stroke $pd_colors(selection)\n", canvas, x, x); "-stroke $pd_colors(selection)\n", canvas, x, x);
sys_vgui(".x%lx.c itemconfigure {%lxLABEL||%lxNUMBER} " sys_vgui(".x%lx.c itemconfigure {%lxLABEL||%lxNUMBER} "
"-fill $pd_colors(selection)\n", canvas, x, x); "-fill $pd_colors(selection)\n", canvas, x, x);
scalehandle_draw_select2(&x->x_gui,glist,"NUM"); scalehandle_draw_select2(&x->x_gui,glist,"NUM",
x->x_numwidth-1,x->x_gui.x_h-1);
} }
sys_vgui(".x%lx.c addtag selected withtag %lxNUM\n", canvas, x); sys_vgui(".x%lx.c addtag selected withtag %lxNUM\n", canvas, x);
} }
......
...@@ -259,7 +259,8 @@ void toggle_draw_select(t_toggle* x, t_glist* glist) ...@@ -259,7 +259,8 @@ void toggle_draw_select(t_toggle* x, t_glist* glist)
"-stroke $pd_colors(selection)\n", canvas, x); "-stroke $pd_colors(selection)\n", canvas, x);
sys_vgui(".x%lx.c itemconfigure %lxLABEL " sys_vgui(".x%lx.c itemconfigure %lxLABEL "
"-fill $pd_colors(selection)\n", canvas, x); "-fill $pd_colors(selection)\n", canvas, x);
scalehandle_draw_select2(&x->x_gui,glist,"TGL"); scalehandle_draw_select2(&x->x_gui,glist,"TGL",
x->x_gui.x_w-1,x->x_gui.x_h-1);
} }
sys_vgui(".x%lx.c addtag selected withtag %lxTGL\n", canvas, x); sys_vgui(".x%lx.c addtag selected withtag %lxTGL\n", canvas, x);
} }
......
...@@ -259,7 +259,8 @@ void vradio_draw_select(t_vradio* x, t_glist* glist) ...@@ -259,7 +259,8 @@ void vradio_draw_select(t_vradio* x, t_glist* glist)
} }
sys_vgui(".x%lx.c itemconfigure %lxLABEL " sys_vgui(".x%lx.c itemconfigure %lxLABEL "
"-fill $pd_colors(selection)\n", canvas, x); "-fill $pd_colors(selection)\n", canvas, x);
scalehandle_draw_select2(&x->x_gui,glist,"VRDO"); scalehandle_draw_select2(&x->x_gui,glist,"VRDO",
x->x_gui.x_w-1,x->x_gui.x_h*x->x_number-1);
} }
sys_vgui(".x%lx.c addtag selected withtag %lxVRDO\n", canvas, x); sys_vgui(".x%lx.c addtag selected withtag %lxVRDO\n", canvas, x);
......
...@@ -254,7 +254,8 @@ static void vslider_draw_select(t_vslider *x, t_glist *glist) ...@@ -254,7 +254,8 @@ static void vslider_draw_select(t_vslider *x, t_glist *glist)
"-stroke $pd_colors(selection)\n", canvas, x); "-stroke $pd_colors(selection)\n", canvas, x);
sys_vgui(".x%lx.c itemconfigure %lxLABEL " sys_vgui(".x%lx.c itemconfigure %lxLABEL "
"-fill $pd_colors(selection)\n", canvas, x); "-fill $pd_colors(selection)\n", canvas, x);
scalehandle_draw_select2(&x->x_gui,glist,"VSLDR"); scalehandle_draw_select2(&x->x_gui,glist,"VSLDR",
x->x_gui.x_w-1,x->x_gui.x_h+5-1);
} }
sys_vgui(".x%lx.c addtag selected withtag %lxVSLDR\n", canvas, x); sys_vgui(".x%lx.c addtag selected withtag %lxVSLDR\n", canvas, x);
} }
......
...@@ -442,7 +442,8 @@ static void vu_draw_select(t_vu* x,t_glist* glist) ...@@ -442,7 +442,8 @@ static void vu_draw_select(t_vu* x,t_glist* glist)
} }
sys_vgui(".x%lx.c itemconfigure %lxLABEL " sys_vgui(".x%lx.c itemconfigure %lxLABEL "
"-fill $pd_colors(selection)\n", canvas, x); "-fill $pd_colors(selection)\n", canvas, x);
scalehandle_draw_select2(&x->x_gui,glist,"BNG"); scalehandle_draw_select2(&x->x_gui,glist,"BNG",
x->x_gui.x_w+2-1,x->x_gui.x_h+4-1);
} }
sys_vgui(".x%lx.c addtag selected withtag %lxVU\n", canvas, x); sys_vgui(".x%lx.c addtag selected withtag %lxVU\n", canvas, x);
......
Supports Markdown
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