Commit 06784403 authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

all gop widgets (at least ones in vanilla release) have their nlets hidden...

all gop widgets (at least ones in vanilla release) have their nlets hidden when displayed inside GOP, as having them is entirely superfluous in that view
parent 355e1d7c
......@@ -87,13 +87,13 @@ void bng_draw_new(t_bng *x, t_glist *glist)
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);
if(!x->x_gui.x_fsf.x_snd_able) {
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",
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);
}
if(!x->x_gui.x_fsf.x_rcv_able) {
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",
canvas, xpos, ypos,
xpos + IOWIDTH, ypos+1, x, nlet_tag, 0, nlet_tag, 0, x);
......@@ -132,12 +132,12 @@ void bng_draw_move(t_bng *x, t_glist *glist)
x->x_flashed?x->x_gui.x_fcol:x->x_gui.x_bcol);
sys_vgui(".x%lx.c coords %lxLABEL %d %d\n",
canvas, x, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy);
if(!x->x_gui.x_fsf.x_snd_able)
if(!x->x_gui.x_fsf.x_snd_able && canvas == x->x_gui.x_glist)
sys_vgui(".x%lx.c coords %lxBNG%so%d %d %d %d %d\n",
canvas, x, nlet_tag, 0, xpos,
ypos + x->x_gui.x_h-1, xpos + IOWIDTH,
ypos + x->x_gui.x_h);
if(!x->x_gui.x_fsf.x_rcv_able)
if(!x->x_gui.x_fsf.x_rcv_able && canvas == x->x_gui.x_glist)
sys_vgui(".x%lx.c coords %lxBNG%si%d %d %d %d %d\n",
canvas, x, nlet_tag, 0, xpos, ypos,
xpos + IOWIDTH, ypos+1);
......@@ -205,7 +205,7 @@ void bng_draw_io(t_bng* x, t_glist* glist, int old_snd_rcv_flags)
int ypos=text_ypix(&x->x_gui.x_obj, glist);
t_canvas *canvas=glist_getcanvas(glist);
if (glist_isvisible(canvas)) {
if (glist_isvisible(canvas) && canvas == x->x_gui.x_glist) {
t_gobj *y = (t_gobj *)x;
t_object *ob = pd_checkobject(&y->g_pd);
......
......@@ -104,10 +104,10 @@ void hradio_draw_new(t_hradio *x, t_glist *glist)
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);
if(!x->x_gui.x_fsf.x_snd_able)
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);
if(!x->x_gui.x_fsf.x_rcv_able)
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);
//}
......@@ -152,10 +152,10 @@ void hradio_draw_move(t_hradio *x, t_glist *glist)
}
sys_vgui(".x%lx.c coords %lxLABEL %d %d\n",
canvas, x, xx11b+x->x_gui.x_ldx, yy11+x->x_gui.x_ldy);
if(!x->x_gui.x_fsf.x_snd_able)
if(!x->x_gui.x_fsf.x_snd_able && canvas == x->x_gui.x_glist)
sys_vgui(".x%lx.c coords %lxHRDO%so%d %d %d %d %d\n",
canvas, x, nlet_tag, 0, xx11b, yy12-1, xx11b + IOWIDTH, yy12);
if(!x->x_gui.x_fsf.x_rcv_able)
if(!x->x_gui.x_fsf.x_rcv_able && canvas == x->x_gui.x_glist)
sys_vgui(".x%lx.c coords %lxHRDO%si%d %d %d %d %d\n",
canvas, x, nlet_tag, 0, xx11b, yy11, xx11b + IOWIDTH, yy11+1);
/* redraw scale handle rectangle if selected */
......@@ -233,7 +233,7 @@ void hradio_draw_io(t_hradio* x, t_glist* glist, int old_snd_rcv_flags)
int xpos=text_xpix(&x->x_gui.x_obj, glist);
int ypos=text_ypix(&x->x_gui.x_obj, glist);
if (glist_isvisible(canvas)) {
if (glist_isvisible(canvas) && canvas == x->x_gui.x_glist) {
t_gobj *y = (t_gobj *)x;
t_object *ob = pd_checkobject(&y->g_pd);
......
......@@ -110,11 +110,11 @@ static void hslider_draw_new(t_hslider *x, t_glist *glist)
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);
if(!x->x_gui.x_fsf.x_snd_able)
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",
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);
if(!x->x_gui.x_fsf.x_rcv_able)
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",
canvas, xpos, ypos,
xpos+7, ypos+1, x, nlet_tag, 0, nlet_tag, 0, x);
......@@ -152,12 +152,12 @@ static void hslider_draw_move(t_hslider *x, t_glist *glist)
r, ypos + x->x_gui.x_h-1);
sys_vgui(".x%lx.c coords %lxLABEL %d %d\n",
canvas, x, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy);
if(!x->x_gui.x_fsf.x_snd_able)
if(!x->x_gui.x_fsf.x_snd_able && canvas == x->x_gui.x_glist)
sys_vgui(".x%lx.c coords %lxHSLDR%so%d %d %d %d %d\n",
canvas, x, nlet_tag, 0,
xpos, ypos + x->x_gui.x_h-1,
xpos+7, ypos + x->x_gui.x_h);
if(!x->x_gui.x_fsf.x_rcv_able)
if(!x->x_gui.x_fsf.x_rcv_able && canvas == x->x_gui.x_glist)
sys_vgui(".x%lx.c coords %lxHSLDR%si%d %d %d %d %d\n",
canvas, x, nlet_tag, 0,
xpos, ypos,
......@@ -226,7 +226,7 @@ static void hslider_draw_io(t_hslider* x,t_glist* glist, int old_snd_rcv_flags)
int ypos=text_ypix(&x->x_gui.x_obj, glist);
t_canvas *canvas=glist_getcanvas(glist);
if (glist_isvisible(canvas)) {
if (glist_isvisible(canvas) && canvas == x->x_gui.x_glist) {
t_gobj *y = (t_gobj *)x;
t_object *ob = pd_checkobject(&y->g_pd);
......
......@@ -223,13 +223,13 @@ static void my_numbox_draw_new(t_my_numbox *x, t_glist *glist)
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);
if(!x->x_gui.x_fsf.x_snd_able)
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",
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);
if(!x->x_gui.x_fsf.x_rcv_able)
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",
canvas,
xpos, ypos,
......@@ -297,12 +297,12 @@ static void my_numbox_draw_move(t_my_numbox *x, t_glist *glist)
xpos + x->x_numwidth, ypos + x->x_gui.x_h,
xpos, ypos + x->x_gui.x_h);
if (x->x_hide_frame <= 1) {
if(!x->x_gui.x_fsf.x_snd_able)
if(!x->x_gui.x_fsf.x_snd_able && canvas == x->x_gui.x_glist)
sys_vgui(".x%lx.c coords %lxNUM%so%d %d %d %d %d\n",
canvas, x, nlet_tag, 0,
xpos, ypos + x->x_gui.x_h-1,
xpos+IOWIDTH, ypos + x->x_gui.x_h);
if(!x->x_gui.x_fsf.x_rcv_able)
if(!x->x_gui.x_fsf.x_rcv_able && canvas == x->x_gui.x_glist)
sys_vgui(".x%lx.c coords %lxNUM%si%d %d %d %d %d\n",
canvas, x, nlet_tag, 0,
xpos, ypos,
......@@ -401,7 +401,7 @@ static void my_numbox_draw_io(t_my_numbox* x,t_glist* glist, int old_snd_rcv_fla
int ypos=text_ypix(&x->x_gui.x_obj, glist);
t_canvas *canvas=glist_getcanvas(glist);
if (glist_isvisible(canvas)) {
if (glist_isvisible(canvas) && canvas == x->x_gui.x_glist) {
t_gobj *y = (t_gobj *)x;
t_object *ob = pd_checkobject(&y->g_pd);
......
......@@ -1638,7 +1638,8 @@ static t_widgetbehavior gatom_widgetbehavior =
void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime,
char *tag, int x1, int y1, int x2, int y2)
{
if (pd_class(&ob->te_pd) == text_class)
//if this is a comment or we are drawing inside gop on one of our parents return
if (pd_class(&ob->te_pd) == text_class || glist_getcanvas(glist) != glist)
return;
//fprintf(stderr,"glist_drawiofor\n");
int n = obj_noutlets(ob), nplus = (n == 1 ? 1 : n-1), i;
......
......@@ -95,10 +95,10 @@ void toggle_draw_new(t_toggle *x, t_glist *glist)
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);
if(!x->x_gui.x_fsf.x_snd_able)
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);
if(!x->x_gui.x_fsf.x_rcv_able)
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);
//}
......@@ -139,10 +139,10 @@ void toggle_draw_move(t_toggle *x, t_glist *glist)
canvas, x, xx+w+1, yy + x->x_gui.x_h-w-1, xx + x->x_gui.x_w-w, yy+w);
sys_vgui(".x%lx.c coords %lxLABEL %d %d\n",
canvas, x, xx+x->x_gui.x_ldx, yy+x->x_gui.x_ldy);
if(!x->x_gui.x_fsf.x_snd_able)
if(!x->x_gui.x_fsf.x_snd_able && canvas == x->x_gui.x_glist)
sys_vgui(".x%lx.c coords %lxTGL%so%d %d %d %d %d\n",
canvas, x, nlet_tag, 0, xx, yy + x->x_gui.x_h-1, xx + IOWIDTH, yy + x->x_gui.x_h);
if(!x->x_gui.x_fsf.x_rcv_able)
if(!x->x_gui.x_fsf.x_rcv_able && canvas == x->x_gui.x_glist)
sys_vgui(".x%lx.c coords %lxTGL%si%d %d %d %d %d\n",
canvas, x, nlet_tag, 0, xx, yy, xx + IOWIDTH, yy+1);
/* redraw scale handle rectangle if selected */
......@@ -223,7 +223,7 @@ void toggle_draw_io(t_toggle* x, t_glist* glist, int old_snd_rcv_flags)
int ypos=text_ypix(&x->x_gui.x_obj, glist);
t_canvas *canvas=glist_getcanvas(glist);
if (glist_isvisible(canvas)) {
if (glist_isvisible(canvas) && canvas == x->x_gui.x_glist) {
t_gobj *y = (t_gobj *)x;
t_object *ob = pd_checkobject(&y->g_pd);
......
......@@ -103,10 +103,10 @@ void vradio_draw_new(t_vradio *x, t_glist *glist)
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);
if(!x->x_gui.x_fsf.x_snd_able)
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);
if(!x->x_gui.x_fsf.x_rcv_able)
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);
//}
......@@ -150,10 +150,10 @@ void vradio_draw_move(t_vradio *x, t_glist *glist)
}
sys_vgui(".x%lx.c coords %lxLABEL %d %d\n",
canvas, x, xx11+x->x_gui.x_ldx, yy11b+x->x_gui.x_ldy);
if(!x->x_gui.x_fsf.x_snd_able)
if(!x->x_gui.x_fsf.x_snd_able && canvas == x->x_gui.x_glist)
sys_vgui(".x%lx.c coords %lxVRDO%so%d %d %d %d %d\n",
canvas, x, nlet_tag, 0, xx11, yy11-1, xx11 + IOWIDTH, yy11);
if(!x->x_gui.x_fsf.x_rcv_able)
if(!x->x_gui.x_fsf.x_rcv_able && canvas == x->x_gui.x_glist)
sys_vgui(".x%lx.c coords %lxVRDO%si%d %d %d %d %d\n",
canvas, x, nlet_tag, 0, xx11, yy11b, xx11 + IOWIDTH, yy11b+1);
/* redraw scale handle rectangle if selected */
......@@ -232,7 +232,7 @@ void vradio_draw_io(t_vradio* x, t_glist* glist, int old_snd_rcv_flags)
int xpos=text_xpix(&x->x_gui.x_obj, glist);
int ypos=text_ypix(&x->x_gui.x_obj, glist);
if (glist_isvisible(canvas)) {
if (glist_isvisible(canvas) && canvas == x->x_gui.x_glist) {
t_gobj *y = (t_gobj *)x;
t_object *ob = pd_checkobject(&y->g_pd);
......
......@@ -109,13 +109,13 @@ static void vslider_draw_new(t_vslider *x, t_glist *glist)
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);
if(!x->x_gui.x_fsf.x_snd_able)
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",
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);
if(!x->x_gui.x_fsf.x_rcv_able)
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",
canvas,
xpos, ypos,
......@@ -155,12 +155,12 @@ static void vslider_draw_move(t_vslider *x, t_glist *glist)
xpos + x->x_gui.x_w-1, r);
sys_vgui(".x%lx.c coords %lxLABEL %d %d\n",
canvas, x, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy);
if(!x->x_gui.x_fsf.x_snd_able)
if(!x->x_gui.x_fsf.x_snd_able && canvas == x->x_gui.x_glist)
sys_vgui(".x%lx.c coords %lxVSLDR%so%d %d %d %d %d\n",
canvas, x, nlet_tag, 0,
xpos, ypos + x->x_gui.x_h+4,
xpos+7, ypos + x->x_gui.x_h+5);
if(!x->x_gui.x_fsf.x_rcv_able)
if(!x->x_gui.x_fsf.x_rcv_able && canvas == x->x_gui.x_glist)
sys_vgui(".x%lx.c coords %lxVSLDR%si%d %d %d %d %d\n",
canvas, x, nlet_tag, 0,
xpos, ypos,
......@@ -230,7 +230,7 @@ static void vslider_draw_io(t_vslider* x,t_glist* glist, int old_snd_rcv_flags)
int ypos=text_ypix(&x->x_gui.x_obj, glist);
t_canvas *canvas=glist_getcanvas(glist);
if (glist_isvisible(canvas)) {
if (glist_isvisible(canvas) && canvas == x->x_gui.x_glist) {
t_gobj *y = (t_gobj *)x;
t_object *ob = pd_checkobject(&y->g_pd);
......
......@@ -170,7 +170,7 @@ static void vu_draw_new(t_vu *x, t_glist *glist)
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);
if(!x->x_gui.x_fsf.x_snd_able)
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",
canvas,
......@@ -183,7 +183,7 @@ static void vu_draw_new(t_vu *x, t_glist *glist)
xpos+x->x_gui.x_w+2, ypos + x->x_gui.x_h+4,
x, nlet_tag, 1, nlet_tag, 1, x);
}
if(!x->x_gui.x_fsf.x_rcv_able)
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",
canvas,
......@@ -253,7 +253,7 @@ static void vu_draw_move(t_vu *x, t_glist *glist)
sys_vgui(".x%lx.c coords %lxLABEL %d %d\n",
canvas, x, xpos+x->x_gui.x_ldx,
ypos+x->x_gui.x_ldy);
if(!x->x_gui.x_fsf.x_snd_able)
if(!x->x_gui.x_fsf.x_snd_able && canvas == x->x_gui.x_glist)
{
sys_vgui(".x%lx.c coords %lxVU%so%d %d %d %d %d\n",
canvas, x, nlet_tag, 0,
......@@ -264,7 +264,7 @@ static void vu_draw_move(t_vu *x, t_glist *glist)
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);
}
if(!x->x_gui.x_fsf.x_rcv_able)
if(!x->x_gui.x_fsf.x_rcv_able && canvas == x->x_gui.x_glist)
{
sys_vgui(".x%lx.c coords %lxVU%si%d %d %d %d %d\n",
canvas, x, nlet_tag, 0,
......@@ -393,7 +393,7 @@ static void vu_draw_io(t_vu* x, t_glist* glist, int old_snd_rcv_flags)
int ypos=text_ypix(&x->x_gui.x_obj, glist);
t_canvas *canvas=glist_getcanvas(glist);
if (glist_isvisible(canvas)) {
if (glist_isvisible(canvas) && canvas == x->x_gui.x_glist) {
t_gobj *y = (t_gobj *)x;
t_object *ob = pd_checkobject(&y->g_pd);
......
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