Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11201
Modified Files: Tag: impd_0_37 g_all_guis.c g_all_guis.h g_bang.c g_canvas.c g_editor.c g_hdial.c g_hslider.c g_numbox.c g_rtext.c g_text.c g_toggle.c g_vdial.c g_vslider.c g_vumeter.c Log Message: initial attempt at MatjuGUI. ;-)
Index: g_all_guis.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_all_guis.c,v retrieving revision 1.1.1.4.2.4 retrieving revision 1.1.1.4.2.4.2.1 diff -C2 -d -r1.1.1.4.2.4 -r1.1.1.4.2.4.2.1 *** g_all_guis.c 14 Jan 2004 15:50:28 -0000 1.1.1.4.2.4 --- g_all_guis.c 5 Mar 2004 19:27:51 -0000 1.1.1.4.2.4.2.1 *************** *** 124,127 **** --- 124,145 ---- /*------------------ global functions -------------------------*/
+ /*!@#$ should move that to Tcl */ + int pd_bluify(int colour) { + int r = (colour>>16) & 0xff; + int g = (colour>>8) & 0xff; + int b = (colour>>0) & 0xff; + r=(r*0xbb)>>8; + g=(g*0xe4)>>8; + return (r<<16)|(g<<8)|(b<<0); + } + + /*!@#$ should move that to Tcl */ + int pd_darker(int colour) { + int r = (colour>>16) & 0xff; + int g = (colour>>8) & 0xff; + int b = (colour>>0) & 0xff; + r=r*3/4; g=g*3/4; b=b*3/4; + return (r<<16)|(g<<8)|(b<<0); + }
int iemgui_clip_size(int size)
Index: g_all_guis.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_all_guis.h,v retrieving revision 1.1.1.4.2.2 retrieving revision 1.1.1.4.2.2.2.1 diff -C2 -d -r1.1.1.4.2.2 -r1.1.1.4.2.2.2.1 *** g_all_guis.h 18 Nov 2003 10:34:10 -0000 1.1.1.4.2.2 --- g_all_guis.h 5 Mar 2004 19:27:51 -0000 1.1.1.4.2.2.2.1 *************** *** 279,282 **** --- 279,284 ---- extern char *iemgui_vu_scale_str[];
+ EXTERN int pd_bluify(int colour); + EXTERN int pd_darker(int colour); EXTERN int iemgui_clip_size(int size); EXTERN int iemgui_clip_font(int size);
Index: g_bang.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_bang.c,v retrieving revision 1.1.1.3.2.2 retrieving revision 1.1.1.3.2.2.2.1 diff -C2 -d -r1.1.1.3.2.2 -r1.1.1.3.2.2.2.1 *** g_bang.c 18 Nov 2003 10:34:10 -0000 1.1.1.3.2.2 --- g_bang.c 5 Mar 2004 19:27:51 -0000 1.1.1.3.2.2.2.1 *************** *** 37,41 **** { sys_vgui(".x%x.c itemconfigure %xBUT -fill #%6.6x\n", glist_getcanvas(glist), x, ! x->x_flashed?x->x_gui.x_fcol:x->x_gui.x_bcol); } } --- 37,41 ---- { sys_vgui(".x%x.c itemconfigure %xBUT -fill #%6.6x\n", glist_getcanvas(glist), x, ! pd_bluify(x->x_flashed?x->x_gui.x_fcol:x->x_gui.x_bcol)); } } *************** *** 47,58 **** t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui(".x%x.c create rectangle %d %d %d %d -fill #%6.6x -tags %xBASE\n", ! canvas, xpos, ypos, ! xpos + x->x_gui.x_w, ypos + x->x_gui.x_h, ! x->x_gui.x_bcol, x); sys_vgui(".x%x.c create oval %d %d %d %d -fill #%6.6x -tags %xBUT\n", ! canvas, xpos+1, ypos+1, ! xpos + x->x_gui.x_w-1, ypos + x->x_gui.x_h-1, ! x->x_flashed?x->x_gui.x_fcol:x->x_gui.x_bcol, x); sys_vgui(".x%x.c create text %d %d -text {%s} -anchor w \ -font {%s %d bold} -fill #%6.6x -tags %xLABEL\n", --- 47,57 ---- t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui("bluebox_draw .x%x.c %xBASE %d %d %d %d %d %d #%6.6x\n", ! canvas, x, xpos, ypos, xpos + x->x_gui.x_w, ypos + x->x_gui.x_h, ! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able, x->x_gui.x_bcol); sys_vgui(".x%x.c create oval %d %d %d %d -fill #%6.6x -tags %xBUT\n", ! canvas, xpos+2, ypos+2, ! xpos + x->x_gui.x_w-2, ypos + x->x_gui.x_h-2, ! pd_bluify(x->x_flashed?x->x_gui.x_fcol:x->x_gui.x_bcol), x); sys_vgui(".x%x.c create text %d %d -text {%s} -anchor w \ -font {%s %d bold} -fill #%6.6x -tags %xLABEL\n", *************** *** 61,73 **** 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, x->x_gui.x_lcol, x); - if(!x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xOUT%d\n", - canvas, xpos, - ypos + x->x_gui.x_h-1, xpos + IOWIDTH, - ypos + x->x_gui.x_h, x, 0); - if(!x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xIN%d\n", - canvas, xpos, ypos, - xpos + IOWIDTH, ypos+1, x, 0); }
--- 60,63 ---- *************** *** 78,100 **** t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui(".x%x.c coords %xBASE %d %d %d %d\n", ! canvas, x, xpos, ypos, ! xpos + x->x_gui.x_w, ypos + x->x_gui.x_h); sys_vgui(".x%x.c coords %xBUT %d %d %d %d\n", ! canvas, x, xpos+1,ypos+1, ! xpos + x->x_gui.x_w-1, ypos + x->x_gui.x_h-1); sys_vgui(".x%x.c itemconfigure %xBUT -fill #%6.6x\n", canvas, x, ! x->x_flashed?x->x_gui.x_fcol:x->x_gui.x_bcol); sys_vgui(".x%x.c coords %xLABEL %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) - sys_vgui(".x%x.c coords %xOUT%d %d %d %d %d\n", - canvas, x, 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) - sys_vgui(".x%x.c coords %xIN%d %d %d %d %d\n", - canvas, x, 0, xpos, ypos, - xpos + IOWIDTH, ypos+1); }
--- 68,81 ---- t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui("bluebox_draw .x%x.c %xBASE %d %d %d %d %d %d #%6.6x\n", ! canvas, x, xpos, ypos, xpos + x->x_gui.x_w, ypos + x->x_gui.x_h, ! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able, x->x_gui.x_bcol); sys_vgui(".x%x.c coords %xBUT %d %d %d %d\n", ! canvas, x, xpos+2,ypos+2, ! xpos + x->x_gui.x_w-2, ypos + x->x_gui.x_h-2); sys_vgui(".x%x.c itemconfigure %xBUT -fill #%6.6x\n", canvas, x, ! pd_bluify(x->x_flashed?x->x_gui.x_fcol:x->x_gui.x_bcol)); sys_vgui(".x%x.c coords %xLABEL %d %d\n", canvas, x, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy); }
*************** *** 103,113 **** t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui(".x%x.c delete %xBASE\n", canvas, x); sys_vgui(".x%x.c delete %xBUT\n", canvas, x); sys_vgui(".x%x.c delete %xLABEL\n", canvas, x); - if(!x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%x.c delete %xOUT%d\n", canvas, x, 0); - if(!x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c delete %xIN%d\n", canvas, x, 0); }
--- 84,90 ---- t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui("bluebox_erase .x%x.c %xBASE\n", canvas, x); sys_vgui(".x%x.c delete %xBUT\n", canvas, x); sys_vgui(".x%x.c delete %xLABEL\n", canvas, x); }
*************** *** 120,147 **** x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); ! sys_vgui(".x%x.c itemconfigure %xBASE -fill #%6.6x\n", canvas, x, x->x_gui.x_bcol); sys_vgui(".x%x.c itemconfigure %xBUT -fill #%6.6x\n", canvas, x, ! x->x_flashed?x->x_gui.x_fcol:x->x_gui.x_bcol); ! } ! ! void bng_draw_io(t_bng* 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); ! t_canvas *canvas=glist_getcanvas(glist); ! ! if((old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && !x->x_gui.x_fsf.x_snd_able) ! sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xOUT%d\n", ! canvas, xpos, ! ypos + x->x_gui.x_h-1, xpos + IOWIDTH, ! ypos + x->x_gui.x_h, x, 0); ! if(!(old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && x->x_gui.x_fsf.x_snd_able) ! sys_vgui(".x%x.c delete %xOUT%d\n", canvas, x, 0); ! if((old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && !x->x_gui.x_fsf.x_rcv_able) ! sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xIN%d\n", ! canvas, xpos, ypos, ! xpos + IOWIDTH, ypos+1, x, 0); ! if(!(old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && x->x_gui.x_fsf.x_rcv_able) ! sys_vgui(".x%x.c delete %xIN%d\n", canvas, x, 0); }
--- 97,103 ---- x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); ! sys_vgui(".x%x.c itemconfigure %xBASE -fill #%6.6x\n", canvas, x, pd_bluify(x->x_gui.x_bcol)); sys_vgui(".x%x.c itemconfigure %xBUT -fill #%6.6x\n", canvas, x, ! pd_bluify(x->x_flashed?x->x_gui.x_fcol:x->x_gui.x_bcol)); }
*************** *** 166,183 **** void bng_draw(t_bng *x, t_glist *glist, int mode) { ! if(mode == IEM_GUI_DRAW_MODE_UPDATE) ! bng_draw_update(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_MOVE) ! bng_draw_move(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_NEW) ! bng_draw_new(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_SELECT) ! bng_draw_select(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_ERASE) ! bng_draw_erase(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_CONFIG) ! bng_draw_config(x, glist); ! else if(mode >= IEM_GUI_DRAW_MODE_IO) ! bng_draw_io(x, glist, mode - IEM_GUI_DRAW_MODE_IO); }
--- 122,132 ---- void bng_draw(t_bng *x, t_glist *glist, int mode) { ! if(mode == IEM_GUI_DRAW_MODE_UPDATE) bng_draw_update(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_MOVE) bng_draw_move(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_NEW) bng_draw_new(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_SELECT) bng_draw_select(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_ERASE) bng_draw_erase(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_CONFIG) bng_draw_config(x, glist); ! else if(mode >= IEM_GUI_DRAW_MODE_IO) bng_draw_move(x, glist); }
Index: g_canvas.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_canvas.c,v retrieving revision 1.1.1.4.2.7 retrieving revision 1.1.1.4.2.7.2.1 diff -C2 -d -r1.1.1.4.2.7 -r1.1.1.4.2.7.2.1 *** g_canvas.c 14 Jan 2004 15:50:28 -0000 1.1.1.4.2.7 --- g_canvas.c 5 Mar 2004 19:27:51 -0000 1.1.1.4.2.7.2.1 *************** *** 857,873 ****
/* ----------------- lines ---------- */ ! static void canvas_drawlines(t_canvas *x) { t_linetraverser t; t_outconnect *oc; { linetraverser_start(&t, x); ! while (oc = linetraverser_next(&t)) ! sys_vgui(".x%x.c create line %d %d %d %d -width %d -tags l%x\n", ! glist_getcanvas(x), ! t.tr_lx1, t.tr_ly1, t.tr_lx2, t.tr_ly2, ! (outlet_getsymbol(t.tr_outlet) == &s_signal ? 2:1), ! oc); } } --- 857,874 ----
/* ----------------- lines ---------- */ ! #include<math.h> static void canvas_drawlines(t_canvas *x) { t_linetraverser t; t_outconnect *oc; + // fprintf(stderr,".x%x.c\n",glist_getcanvas(x)); { linetraverser_start(&t, x); ! while (oc = linetraverser_next(&t)) { ! int x1=t.tr_lx1, y1=t.tr_ly1; ! int x2=t.tr_lx2, y2=t.tr_ly2; ! sys_vgui("wire_draw .x%x.c l%x %d %d %d %d %d\n", ! glist_getcanvas(x), oc, (outlet_getsymbol(t.tr_outlet) == &s_signal ? 2:1), x1, y1, x2, y2); ! } } } *************** *** 881,889 **** while (oc = linetraverser_next(&t)) { ! if (t.tr_ob == text || t.tr_ob2 == text) ! { ! sys_vgui(".x%x.c coords l%x %d %d %d %d\n", ! glist_getcanvas(x), oc, ! t.tr_lx1, t.tr_ly1, t.tr_lx2, t.tr_ly2); } } --- 882,890 ---- while (oc = linetraverser_next(&t)) { ! if (t.tr_ob == text || t.tr_ob2 == text) { ! int x1=t.tr_lx1, y1=t.tr_ly1; ! int x2=t.tr_lx2, y2=t.tr_ly2; ! sys_vgui("wire_draw .x%x.c l%x %d %d %d %d %d\n", ! glist_getcanvas(x), oc, (outlet_getsymbol(t.tr_outlet) == &s_signal ? 2:1), x1, y1, x2, y2); } } *************** *** 902,907 **** if (x->gl_editor) { ! sys_vgui(".x%x.c delete l%x\n", ! glist_getcanvas(x), oc); } obj_disconnect(t.tr_ob, t.tr_outno, t.tr_ob2, t.tr_inno); --- 903,907 ---- if (x->gl_editor) { ! sys_vgui("wire_erase .x%x.c l%x\n", glist_getcanvas(x), oc); } obj_disconnect(t.tr_ob, t.tr_outno, t.tr_ob2, t.tr_inno); *************** *** 924,929 **** if (x->gl_editor) { ! sys_vgui(".x%x.c delete l%x\n", ! glist_getcanvas(x), oc); } obj_disconnect(t.tr_ob, t.tr_outno, t.tr_ob2, t.tr_inno); --- 924,928 ---- if (x->gl_editor) { ! sys_vgui("wire_erase .x%x.c l%x\n", glist_getcanvas(x), oc); } obj_disconnect(t.tr_ob, t.tr_outno, t.tr_ob2, t.tr_inno); *************** *** 1375,1378 **** --- 1374,1379 ---- extern void glist_scalar(t_glist *canvas, t_symbol *s, int argc, t_atom *argv);
+ void canvas_guiext(t_glist *gl, t_symbol *guiobjname, int argc, t_atom *argv); + void g_graph_setup(void); void g_editor_setup(void); *************** *** 1435,1439 **** class_addmethod(canvas_class, (t_method)canvas_numbox, gensym("numbox"), A_GIMME, A_NULL); ! /* ------------------------ gui stuff --------------------------- */ class_addmethod(canvas_class, (t_method)canvas_pop, gensym("pop"), --- 1436,1442 ---- class_addmethod(canvas_class, (t_method)canvas_numbox, gensym("numbox"), A_GIMME, A_NULL); ! class_addmethod(canvas_class, (t_method)canvas_guiext, gensym("guiext"), ! A_GIMME, A_NULL); ! /* ------------------------ gui stuff --------------------------- */ class_addmethod(canvas_class, (t_method)canvas_pop, gensym("pop"), *************** *** 1449,1452 **** --- 1452,1457 ---- class_addmethod(canvas_class, (t_method)canvas_map, gensym("map"), A_FLOAT, A_NULL); + // class_addmethod(canvas_class, (t_method)canvas_redraw, + // gensym("redraw"), A_NULL); class_setpropertiesfn(canvas_class, graph_properties);
Index: g_editor.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_editor.c,v retrieving revision 1.1.1.4.2.3 retrieving revision 1.1.1.4.2.3.2.1 diff -C2 -d -r1.1.1.4.2.3 -r1.1.1.4.2.3.2.1 *** g_editor.c 25 Nov 2003 19:19:57 -0000 1.1.1.4.2.3 --- g_editor.c 5 Mar 2004 19:27:51 -0000 1.1.1.4.2.3.2.1 *************** *** 90,94 **** x->gl_editor->e_selectline_inno = inno; x->gl_editor->e_selectline_tag = oc; ! sys_vgui(".x%x.c itemconfigure l%x -fill blue\n", x, x->gl_editor->e_selectline_tag); } --- 90,94 ---- x->gl_editor->e_selectline_inno = inno; x->gl_editor->e_selectline_tag = oc; ! sys_vgui("wire_select .x%x.c l%x 1\n", x, x->gl_editor->e_selectline_tag); } *************** *** 100,105 **** { x->gl_editor->e_selectedline = 0; ! sys_vgui(".x%x.c itemconfigure l%x -fill black\n", ! x, x->gl_editor->e_selectline_tag); } } --- 100,104 ---- { x->gl_editor->e_selectedline = 0; ! sys_vgui("wire_select .x%x.c l%x 0\n", x, x->gl_editor->e_selectline_tag); } } *************** *** 1095,1101 **** x->gl_editor->e_ywas = ypos; sys_vgui( ! ".x%x.c create line %d %d %d %d -width %d -tags x\n", ! x, xpos, ypos, xpos, ypos, ! (issignal ? 2 : 1)); } else canvas_setcursor(x, CURSOR_EDITMODE_CONNECT); --- 1094,1099 ---- x->gl_editor->e_ywas = ypos; sys_vgui( ! "wire_draw .x%x.c x %d %d %d %d %d\n", ! x, (issignal ? 2 : 1), xpos, ypos, xpos, ypos); } else canvas_setcursor(x, CURSOR_EDITMODE_CONNECT); *************** *** 1229,1235 **** ywas = x->gl_editor->e_ywas; if (doit) sys_vgui(".x%x.c delete x\n", x); ! else sys_vgui(".x%x.c coords x %d %d %d %d\n", ! x, x->gl_editor->e_xwas, ! x->gl_editor->e_ywas, xpos, ypos);
if ((y1 = canvas_findhitbox(x, xwas, ywas, &x11, &y11, &x12, &y12)) --- 1227,1232 ---- ywas = x->gl_editor->e_ywas; if (doit) sys_vgui(".x%x.c delete x\n", x); ! else sys_vgui("wire_draw .x%x.c x 1 %d %d %d %d\n", ! x, x->gl_editor->e_xwas, x->gl_editor->e_ywas, xpos, ypos);
if ((y1 = canvas_findhitbox(x, xwas, ywas, &x11, &y11, &x12, &y12)) *************** *** 1293,1300 **** + IOMIDDLE; ly2 = y21; ! sys_vgui(".x%x.c create line %d %d %d %d -width %d -tags l%x\n", ! glist_getcanvas(x), ! lx1, ly1, lx2, ly2, ! (obj_issignaloutlet(ob1, closest1) ? 2 : 1), oc); canvas_setundo(x, canvas_undo_connect, canvas_undo_set_connect(x, --- 1290,1296 ---- + IOMIDDLE; ly2 = y21; ! sys_vgui("wire_draw .x%x.c l%x %d %d %d %d %d\n", ! glist_getcanvas(x), oc, (obj_issignaloutlet(ob1, closest1) ? 2 : 1), ! lx1, ly1, lx2, ly2); canvas_setundo(x, canvas_undo_connect, canvas_undo_set_connect(x,
Index: g_hdial.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_hdial.c,v retrieving revision 1.1.1.4.2.2 retrieving revision 1.1.1.4.2.2.2.1 diff -C2 -d -r1.1.1.4.2.2 -r1.1.1.4.2.2.2.1 *** g_hdial.c 18 Nov 2003 10:34:10 -0000 1.1.1.4.2.2 --- g_hdial.c 5 Mar 2004 19:27:51 -0000 1.1.1.4.2.2.2.1 *************** *** 55,74 **** int xx11b=text_xpix(&x->x_gui.x_obj, glist), xx11=xx11b, xx21=xx11b+s4; int xx22=xx11b+dx-s4;
! ! for(i=0; i<n; i++) ! { ! sys_vgui(".x%x.c create rectangle %d %d %d %d -fill #%6.6x -tags %xBASE%d\n", ! canvas, xx11, yy11, xx11+dx, yy12, ! x->x_gui.x_bcol, x, i); ! sys_vgui(".x%x.c create rectangle %d %d %d %d -fill #%6.6x -outline #%6.6x -tags %xBUT%d\n", ! canvas, xx21, yy21, xx22, yy22, ! (x->x_on==i)?x->x_gui.x_fcol:x->x_gui.x_bcol, ! (x->x_on==i)?x->x_gui.x_fcol:x->x_gui.x_bcol, x, i); ! xx11 += dx; ! xx21 += dx; ! xx22 += dx; ! } ! sys_vgui(".x%x.c create text %d %d -text {%s} -anchor w \ -font {%s %d bold} -fill #%6.6x -tags %xLABEL\n", canvas, xx11b+x->x_gui.x_ldx, yy11+x->x_gui.x_ldy, --- 55,67 ---- int xx11b=text_xpix(&x->x_gui.x_obj, glist), xx11=xx11b, xx21=xx11b+s4; int xx22=xx11b+dx-s4; + int xpos=text_xpix(&x->x_gui.x_obj, glist); + int ypos=text_ypix(&x->x_gui.x_obj, glist);
! sys_vgui("radio_draw .x%x.c %xBASE %d %d %d %d %d %d 0 %d #%6.6x\n", ! canvas, x, xx11, yy11, xx11+dx*x->x_number, yy12, ! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able, ! x->x_number,x->x_gui.x_bcol); ! sys_vgui("radio_set .x%x.c %x %d\n",canvas,x,x->x_on); ! sys_vgui(".x%x.c create text %d %d -text {%s} -anchor w \ -font {%s %d bold} -fill #%6.6x -tags %xLABEL\n", canvas, xx11b+x->x_gui.x_ldx, yy11+x->x_gui.x_ldy, *************** *** 76,86 **** x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_lcol, x); - if(!x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xOUT%d\n", - canvas, xx11b, yy12-1, xx11b + IOWIDTH, yy12, x, 0); - if(!x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xIN%d\n", - canvas, xx11b, yy11, xx11b + IOWIDTH, yy11+1, x, 0); - }
--- 69,72 ---- *************** *** 93,118 **** int xx11b=text_xpix(&x->x_gui.x_obj, glist), xx11=xx11b, xx21=xx11b+s4; int xx22=xx11b+dx-s4;
xx11 = xx11b; xx21=xx11b+s4; xx22=xx11b+dx-s4; - for(i=0; i<n; i++) - { - sys_vgui(".x%x.c coords %xBASE%d %d %d %d %d\n", - canvas, x, i, xx11, yy11, xx11+dx, yy12); - sys_vgui(".x%x.c coords %xBUT%d %d %d %d %d\n", - canvas, x, i, xx21, yy21, xx22, yy22); - xx11 += dx; - xx21 += dx; - xx22 += dx; - } sys_vgui(".x%x.c coords %xLABEL %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) - sys_vgui(".x%x.c coords %xOUT%d %d %d %d %d\n", - canvas, x, 0, xx11b, yy12-1, xx11b + IOWIDTH, yy12); - if(!x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c coords %xIN%d %d %d %d %d\n", - canvas, x, 0, xx11b, yy11, xx11b + IOWIDTH, yy11+1); }
--- 79,94 ---- int xx11b=text_xpix(&x->x_gui.x_obj, glist), xx11=xx11b, xx21=xx11b+s4; int xx22=xx11b+dx-s4; + int xpos=text_xpix(&x->x_gui.x_obj, glist); + int ypos=text_ypix(&x->x_gui.x_obj, glist);
+ sys_vgui("radio_draw .x%x.c %xBASE %d %d %d %d %d %d 0 %d #%6.6x\n", + canvas, x, xx11, yy11, xx11+dx*x->x_number, yy12, + !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able, + x->x_number,x->x_gui.x_bcol); xx11 = xx11b; xx21=xx11b+s4; xx22=xx11b+dx-s4; sys_vgui(".x%x.c coords %xLABEL %d %d\n", canvas, x, xx11b+x->x_gui.x_ldx, yy11+x->x_gui.x_ldy); }
*************** *** 124,135 **** for(i=0; i<n; i++) { ! sys_vgui(".x%x.c delete %xBASE%d\n", canvas, x, i); sys_vgui(".x%x.c delete %xBUT%d\n", canvas, x, i); } sys_vgui(".x%x.c delete %xLABEL\n", canvas, x); - if(!x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%x.c delete %xOUT%d\n", canvas, x, 0); - if(!x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c delete %xIN%d\n", canvas, x, 0); }
--- 100,107 ---- for(i=0; i<n; i++) { ! sys_vgui("bluebox_erase .x%x.c %xBASE%d\n", canvas, x, i); sys_vgui(".x%x.c delete %xBUT%d\n", canvas, x, i); } sys_vgui(".x%x.c delete %xLABEL\n", canvas, x); }
*************** *** 153,179 **** }
- void hradio_draw_io(t_hradio* x, t_glist* glist, int old_snd_rcv_flags) - { - t_canvas *canvas=glist_getcanvas(glist); - int xpos=text_xpix(&x->x_gui.x_obj, glist); - int ypos=text_ypix(&x->x_gui.x_obj, glist); - - if((old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && !x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xOUT%d\n", - canvas, - xpos, ypos + x->x_gui.x_w-1, - xpos + IOWIDTH, ypos + x->x_gui.x_w, - x, 0); - if(!(old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%x.c delete %xOUT%d\n", canvas, x, 0); - if((old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && !x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xIN%d\n", - canvas, - xpos, ypos, - xpos + IOWIDTH, ypos+1, x, 0); - if(!(old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c delete %xIN%d\n", canvas, x, 0); - } - void hradio_draw_select(t_hradio* x, t_glist* glist) { --- 125,128 ---- *************** *** 204,221 **** void hradio_draw(t_hradio *x, t_glist *glist, int mode) { ! if(mode == IEM_GUI_DRAW_MODE_UPDATE) ! hradio_draw_update(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_MOVE) ! hradio_draw_move(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_NEW) ! hradio_draw_new(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_SELECT) ! hradio_draw_select(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_ERASE) ! hradio_draw_erase(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_CONFIG) ! hradio_draw_config(x, glist); ! else if(mode >= IEM_GUI_DRAW_MODE_IO) ! hradio_draw_io(x, glist, mode - IEM_GUI_DRAW_MODE_IO); }
--- 153,163 ---- void hradio_draw(t_hradio *x, t_glist *glist, int mode) { ! if(mode == IEM_GUI_DRAW_MODE_UPDATE) hradio_draw_update(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_MOVE) hradio_draw_move(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_NEW) hradio_draw_new(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_SELECT) hradio_draw_select(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_ERASE) hradio_draw_erase(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_CONFIG) hradio_draw_config(x, glist); ! else if(mode >= IEM_GUI_DRAW_MODE_IO) hradio_draw_move(x, glist); }
Index: g_hslider.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_hslider.c,v retrieving revision 1.1.1.3.2.2 retrieving revision 1.1.1.3.2.2.2.1 diff -C2 -d -r1.1.1.3.2.2 -r1.1.1.3.2.2.2.1 *** g_hslider.c 18 Nov 2003 10:34:10 -0000 1.1.1.3.2.2 --- g_hslider.c 5 Mar 2004 19:27:52 -0000 1.1.1.3.2.2.2.1 *************** *** 68,75 **** t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui(".x%x.c create rectangle %d %d %d %d -fill #%6.6x -tags %xBASE\n", ! canvas, xpos-3, ypos, ! xpos + x->x_gui.x_w+2, ypos + x->x_gui.x_h, ! x->x_gui.x_bcol, x); sys_vgui(".x%x.c create line %d %d %d %d -width 3 -fill #%6.6x -tags %xKNOB\n", canvas, r, ypos+1, r, --- 68,74 ---- t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui("bluebox_draw .x%x.c %xBASE %d %d %d %d %d %d #%6.6x\n", ! canvas, x, xpos, ypos, xpos+x->x_gui.x_w, ypos+x->x_gui.x_h, ! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,x->x_gui.x_bcol); sys_vgui(".x%x.c create line %d %d %d %d -width 3 -fill #%6.6x -tags %xKNOB\n", canvas, r, ypos+1, r, *************** *** 81,92 **** 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, x->x_gui.x_lcol, x); - if(!x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xOUT%d\n", - canvas, xpos-3, ypos + x->x_gui.x_h-1, - xpos+4, ypos + x->x_gui.x_h, x, 0); - if(!x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xIN%d\n", - canvas, xpos-3, ypos, - xpos+4, ypos+1, x, 0); }
--- 80,83 ---- *************** *** 98,105 **** t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui(".x%x.c coords %xBASE %d %d %d %d\n", ! canvas, x, ! xpos-3, ypos, ! xpos + x->x_gui.x_w+2, ypos + x->x_gui.x_h); sys_vgui(".x%x.c coords %xKNOB %d %d %d %d\n", canvas, x, r, ypos+1, --- 89,95 ---- t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui("bluebox_draw .x%x.c %xBASE %d %d %d %d %d %d #%6.6x\n", ! canvas, x, xpos, ypos, xpos+x->x_gui.x_w, ypos+x->x_gui.x_h, ! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,x->x_gui.x_bcol); sys_vgui(".x%x.c coords %xKNOB %d %d %d %d\n", canvas, x, r, ypos+1, *************** *** 107,120 **** sys_vgui(".x%x.c coords %xLABEL %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) - sys_vgui(".x%x.c coords %xOUT%d %d %d %d %d\n", - canvas, x, 0, - xpos-3, ypos + x->x_gui.x_h-1, - xpos+4, ypos + x->x_gui.x_h); - if(!x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c coords %xIN%d %d %d %d %d\n", - canvas, x, 0, - xpos-3, ypos, - xpos+4, ypos+1); }
--- 97,100 ---- *************** *** 123,133 **** t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui(".x%x.c delete %xBASE\n", canvas, x); sys_vgui(".x%x.c delete %xKNOB\n", canvas, x); sys_vgui(".x%x.c delete %xLABEL\n", canvas, x); - if(!x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%x.c delete %xOUT%d\n", canvas, x, 0); - if(!x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c delete %xIN%d\n", canvas, x, 0); }
--- 103,109 ---- t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui("bluebox_erase .x%x.c %xBASE\n", canvas, x); sys_vgui(".x%x.c delete %xKNOB\n", canvas, x); sys_vgui(".x%x.c delete %xLABEL\n", canvas, x); }
*************** *** 141,165 **** strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); sys_vgui(".x%x.c itemconfigure %xKNOB -fill #%6.6x\n", canvas, x, x->x_gui.x_fcol); ! sys_vgui(".x%x.c itemconfigure %xBASE -fill #%6.6x\n", canvas, x, x->x_gui.x_bcol); ! } ! ! static void hslider_draw_io(t_hslider* 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); ! t_canvas *canvas=glist_getcanvas(glist); ! ! if((old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && !x->x_gui.x_fsf.x_snd_able) ! sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xOUT%d\n", ! canvas, xpos-3, ypos + x->x_gui.x_h-1, ! xpos+4, ypos + x->x_gui.x_h, x, 0); ! if(!(old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && x->x_gui.x_fsf.x_snd_able) ! sys_vgui(".x%x.c delete %xOUT%d\n", canvas, x, 0); ! if((old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && !x->x_gui.x_fsf.x_rcv_able) ! sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xIN%d\n", ! canvas, xpos-3, ypos, ! xpos+4, ypos+1, x, 0); ! if(!(old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && x->x_gui.x_fsf.x_rcv_able) ! sys_vgui(".x%x.c delete %xIN%d\n", canvas, x, 0); }
--- 117,121 ---- strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); sys_vgui(".x%x.c itemconfigure %xKNOB -fill #%6.6x\n", canvas, x, x->x_gui.x_fcol); ! sys_vgui("slider_select .x%x.c %xBASE %d\n", canvas, x, x->x_gui.x_fsf.x_selected); }
*************** *** 170,179 **** if(x->x_gui.x_fsf.x_selected) { ! sys_vgui(".x%x.c itemconfigure %xBASE -outline #%6.6x\n", canvas, x, IEM_GUI_COLOR_SELECTED); sys_vgui(".x%x.c itemconfigure %xLABEL -fill #%6.6x\n", canvas, x, IEM_GUI_COLOR_SELECTED); } else { ! sys_vgui(".x%x.c itemconfigure %xBASE -outline #%6.6x\n", canvas, x, IEM_GUI_COLOR_NORMAL); sys_vgui(".x%x.c itemconfigure %xLABEL -fill #%6.6x\n", canvas, x, x->x_gui.x_lcol); } --- 126,135 ---- if(x->x_gui.x_fsf.x_selected) { ! sys_vgui("slider_select .x%x.c %xBASE %d\n", canvas, x, x->x_gui.x_fsf.x_selected); sys_vgui(".x%x.c itemconfigure %xLABEL -fill #%6.6x\n", canvas, x, IEM_GUI_COLOR_SELECTED); } else { ! sys_vgui("slider_select .x%x.c %xBASE %d\n", canvas, x, x->x_gui.x_fsf.x_selected); sys_vgui(".x%x.c itemconfigure %xLABEL -fill #%6.6x\n", canvas, x, x->x_gui.x_lcol); } *************** *** 182,204 **** void hslider_draw(t_hslider *x, t_glist *glist, int mode) { ! if(mode == IEM_GUI_DRAW_MODE_UPDATE) ! hslider_draw_update(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_MOVE) ! hslider_draw_move(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_NEW) ! hslider_draw_new(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_SELECT) ! hslider_draw_select(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_ERASE) ! hslider_draw_erase(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_CONFIG) ! hslider_draw_config(x, glist); ! else if(mode >= IEM_GUI_DRAW_MODE_IO) ! hslider_draw_io(x, glist, mode - IEM_GUI_DRAW_MODE_IO); }
/* ------------------------ hsl widgetbehaviour----------------------------- */
- static void hslider_getrect(t_gobj *z, t_glist *glist, int *xp1, int *yp1, int *xp2, int *yp2) --- 138,152 ---- void hslider_draw(t_hslider *x, t_glist *glist, int mode) { ! if(mode == IEM_GUI_DRAW_MODE_UPDATE) hslider_draw_update(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_MOVE) hslider_draw_move(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_NEW) hslider_draw_new(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_SELECT) hslider_draw_select(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_ERASE) hslider_draw_erase(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_CONFIG) hslider_draw_config(x, glist); ! else if(mode >= IEM_GUI_DRAW_MODE_IO) hslider_draw_move(x, glist); }
/* ------------------------ hsl widgetbehaviour----------------------------- */
static void hslider_getrect(t_gobj *z, t_glist *glist, int *xp1, int *yp1, int *xp2, int *yp2)
Index: g_numbox.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_numbox.c,v retrieving revision 1.1.1.4.2.2 retrieving revision 1.1.1.4.2.2.2.1 diff -C2 -d -r1.1.1.4.2.2 -r1.1.1.4.2.2.2.1 *** g_numbox.c 18 Nov 2003 10:34:10 -0000 1.1.1.4.2.2 --- g_numbox.c 5 Mar 2004 19:27:52 -0000 1.1.1.4.2.2.2.1 *************** *** 21,27 **** #endif
- /*------------------ global varaibles -------------------------*/ - - /*------------------ global functions -------------------------*/
--- 21,24 ---- *************** *** 179,191 **** t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui( ! ".x%x.c create polygon %d %d %d %d %d %d %d %d %d %d -outline #%6.6x \ ! -fill #%6.6x -tags %xBASE1\n", ! canvas, xpos, ypos, ! xpos + x->x_numwidth-4, ypos, ! xpos + x->x_numwidth, ypos+4, ! 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); sys_vgui( ".x%x.c create line %d %d %d %d %d %d -fill #%6.6x -tags %xBASE2\n", --- 176,183 ---- t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui("numbox_draw .x%x.c %xBASE %d %d %d %d %d %d #%6.6x #%6.6x\n", ! canvas, x, xpos, ypos, xpos + x->x_numwidth, ypos + x->x_gui.x_h, ! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able, ! IEM_GUI_COLOR_NORMAL, x->x_gui.x_bcol); sys_vgui( ".x%x.c create line %d %d %d %d %d %d -fill #%6.6x -tags %xBASE2\n", *************** *** 204,219 **** canvas, xpos+half+2, ypos+half+d, x->x_buf, x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_fcol, x); - if(!x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xOUT%d\n", - canvas, - xpos, ypos + x->x_gui.x_h-1, - xpos+IOWIDTH, ypos + x->x_gui.x_h, - x, 0); - if(!x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xIN%d\n", - canvas, - xpos, ypos, - xpos+IOWIDTH, ypos+1, - x, 0); }
--- 196,199 ---- *************** *** 225,234 **** t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui(".x%x.c coords %xBASE1 %d %d %d %d %d %d %d %d %d %d\n", ! canvas, x, xpos, ypos, ! xpos + x->x_numwidth-4, ypos, ! xpos + x->x_numwidth, ypos+4, ! xpos + x->x_numwidth, ypos + x->x_gui.x_h, ! xpos, ypos + x->x_gui.x_h); sys_vgui(".x%x.c coords %xBASE2 %d %d %d %d %d %d\n", canvas, x, xpos, ypos, --- 205,212 ---- t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui("numbox_draw .x%x.c %xBASE %d %d %d %d %d %d #%6.6x #%6.6x\n", ! canvas, x, xpos, ypos, xpos + x->x_numwidth, ypos + x->x_gui.x_h, ! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able, ! IEM_GUI_COLOR_NORMAL, x->x_gui.x_bcol); sys_vgui(".x%x.c coords %xBASE2 %d %d %d %d %d %d\n", canvas, x, xpos, ypos, *************** *** 239,252 **** sys_vgui(".x%x.c coords %xNUMBER %d %d\n", canvas, x, xpos+half+2, ypos+half+d); - if(!x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%x.c coords %xOUT%d %d %d %d %d\n", - canvas, x, 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) - sys_vgui(".x%x.c coords %xIN%d %d %d %d %d\n", - canvas, x, 0, - xpos, ypos, - xpos+IOWIDTH, ypos+1); }
--- 217,220 ---- *************** *** 255,266 **** t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui(".x%x.c delete %xBASE1\n", canvas, x); sys_vgui(".x%x.c delete %xBASE2\n", canvas, x); sys_vgui(".x%x.c delete %xLABEL\n", canvas, x); sys_vgui(".x%x.c delete %xNUMBER\n", canvas, x); - if(!x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%x.c delete %xOUT%d\n", canvas, x, 0); - if(!x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c delete %xIN%d\n", canvas, x, 0); }
--- 223,230 ---- t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui("numbox_erase .x%x.c %xBASE\n", canvas, x); sys_vgui(".x%x.c delete %xBASE2\n", canvas, x); sys_vgui(".x%x.c delete %xLABEL\n", canvas, x); sys_vgui(".x%x.c delete %xNUMBER\n", canvas, x); }
*************** *** 276,280 **** canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_fcol); ! sys_vgui(".x%x.c itemconfigure %xBASE1 -fill #%6.6x\n", canvas, x, x->x_gui.x_bcol); sys_vgui(".x%x.c itemconfigure %xBASE2 -fill #%6.6x\n", canvas, --- 240,244 ---- canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_fcol); ! sys_vgui(".x%x.c itemconfigure %xBASE -fill #%6.6x\n", canvas, x, x->x_gui.x_bcol); sys_vgui(".x%x.c itemconfigure %xBASE2 -fill #%6.6x\n", canvas, *************** *** 282,309 **** }
- static void my_numbox_draw_io(t_my_numbox* 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); - t_canvas *canvas=glist_getcanvas(glist); - - if((old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && !x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xOUT%d\n", - canvas, - xpos, ypos + x->x_gui.x_h-1, - xpos+IOWIDTH, ypos + x->x_gui.x_h, - x, 0); - if(!(old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%x.c delete %xOUT%d\n", canvas, x, 0); - if((old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && !x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xIN%d\n", - canvas, - xpos, ypos, - xpos+IOWIDTH, ypos+1, - x, 0); - if(!(old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c delete %xIN%d\n", canvas, x, 0); - } - static void my_numbox_draw_select(t_my_numbox *x, t_glist *glist) { --- 246,249 ---- *************** *** 319,323 **** (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE); } ! sys_vgui(".x%x.c itemconfigure %xBASE1 -outline #%6.6x\n", canvas, x, IEM_GUI_COLOR_SELECTED); sys_vgui(".x%x.c itemconfigure %xBASE2 -fill #%6.6x\n", --- 259,263 ---- (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE); } ! sys_vgui(".x%x.c itemconfigure %xBASE -outline #%6.6x\n", canvas, x, IEM_GUI_COLOR_SELECTED); sys_vgui(".x%x.c itemconfigure %xBASE2 -fill #%6.6x\n", *************** *** 330,334 **** else { ! sys_vgui(".x%x.c itemconfigure %xBASE1 -outline #%6.6x\n", canvas, x, IEM_GUI_COLOR_NORMAL); sys_vgui(".x%x.c itemconfigure %xBASE2 -fill #%6.6x\n", --- 270,274 ---- else { ! sys_vgui(".x%x.c itemconfigure %xBASE -outline #%6.6x\n", canvas, x, IEM_GUI_COLOR_NORMAL); sys_vgui(".x%x.c itemconfigure %xBASE2 -fill #%6.6x\n", *************** *** 343,360 **** void my_numbox_draw(t_my_numbox *x, t_glist *glist, int mode) { ! if(mode == IEM_GUI_DRAW_MODE_UPDATE) ! my_numbox_draw_update(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_MOVE) ! my_numbox_draw_move(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_NEW) ! my_numbox_draw_new(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_SELECT) ! my_numbox_draw_select(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_ERASE) ! my_numbox_draw_erase(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_CONFIG) ! my_numbox_draw_config(x, glist); ! else if(mode >= IEM_GUI_DRAW_MODE_IO) ! my_numbox_draw_io(x, glist, mode - IEM_GUI_DRAW_MODE_IO); }
--- 283,293 ---- void my_numbox_draw(t_my_numbox *x, t_glist *glist, int mode) { ! if(mode == IEM_GUI_DRAW_MODE_UPDATE) my_numbox_draw_update(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_MOVE) my_numbox_draw_move(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_NEW) my_numbox_draw_new(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_SELECT) my_numbox_draw_select(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_ERASE) my_numbox_draw_erase(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_CONFIG) my_numbox_draw_config(x, glist); ! else if(mode >= IEM_GUI_DRAW_MODE_IO) my_numbox_draw_move(x, glist); }
*************** *** 407,435 **** if(x->x_lin0_log1) { ! if((min == 0.0)&&(max == 0.0)) ! max = 1.0; ! if(max > 0.0) ! { ! if(min <= 0.0) ! min = 0.01*max; ! } ! else ! { ! if(min > 0.0) ! max = 0.01*min; } } x->x_min = min; x->x_max = max; ! if(x->x_val < x->x_min) ! { ! x->x_val = x->x_min; ! ret = 1; ! } ! if(x->x_val > x->x_max) ! { ! x->x_val = x->x_max; ! ret = 1; ! } if(x->x_lin0_log1) x->x_k = exp(log(x->x_max/x->x_min)/(double)(x->x_log_height)); --- 340,354 ---- if(x->x_lin0_log1) { ! if((min == 0.0)&&(max == 0.0)) max = 1.0; ! if(max > 0.0) { ! if(min <= 0.0) min = 0.01*max; ! } else { ! if(min > 0.0) max = 0.01*min; } } x->x_min = min; x->x_max = max; ! if(x->x_val < x->x_min) { x->x_val = x->x_min; ret = 1; } ! if(x->x_val > x->x_max) { x->x_val = x->x_max; ret = 1; } if(x->x_lin0_log1) x->x_k = exp(log(x->x_max/x->x_min)/(double)(x->x_log_height));
Index: g_rtext.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_rtext.c,v retrieving revision 1.1.1.2.2.6 retrieving revision 1.1.1.2.2.6.2.1 diff -C2 -d -r1.1.1.2.2.6 -r1.1.1.2.2.6.2.1 *** g_rtext.c 18 Nov 2003 10:34:10 -0000 1.1.1.2.2.6 --- g_rtext.c 5 Mar 2004 19:27:52 -0000 1.1.1.2.2.6.2.1 *************** *** 215,224 ****
if (action == SEND_FIRST) ! sys_vgui("pdtk_text_new .x%x.c %s %f %f {%.*s} %d %s\n", canvas, x->x_tag, dispx + LMARGIN, dispy + TMARGIN, outchars, tempbuf, sys_hostfontsize(font), (glist_isselected(x->x_glist, ! &x->x_glist->gl_gobj)? "blue" : "black")); else if (action == SEND_UPDATE) { --- 215,224 ----
if (action == SEND_FIRST) ! sys_vgui("global look; pdtk_text_new .x%x.c %s %f %f {%.*s} %d %s\n", canvas, x->x_tag, dispx + LMARGIN, dispy + TMARGIN, outchars, tempbuf, sys_hostfontsize(font), (glist_isselected(x->x_glist, ! &x->x_glist->gl_gobj)? "$look(objectfgsel)" : "$look(objectfg)")); else if (action == SEND_UPDATE) {
Index: g_text.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_text.c,v retrieving revision 1.1.1.4.2.2 retrieving revision 1.1.1.4.2.2.2.1 diff -C2 -d -r1.1.1.4.2.2 -r1.1.1.4.2.2.2.1 *** g_text.c 12 Sep 2003 20:55:31 -0000 1.1.1.4.2.2 --- g_text.c 5 Mar 2004 19:27:52 -0000 1.1.1.4.2.2.2.1 *************** *** 88,91 **** --- 88,92 ---- t_text *x; int argc; + int broken = 0; t_atom *argv; newest = 0; *************** *** 110,114 **** if (!x) { - /* LATER make the color reflect this */ x = (t_text *)pd_new(text_class); --- 111,114 ---- *************** *** 177,180 **** --- 177,187 ---- }
+ void canvas_guiext(t_glist *gl, t_symbol *guiobjname, int argc, t_atom *argv) + { + if (argc<1) {post("canvas_guiext: argc<1 -> SHOO"); return;} + if (argv[0].a_type!=A_SYMBOL) {post("canvas_guiext: arg is not a symbol"); return;} + canvas_iemguis(gl, atom_getsymbol(&argv[0])); + } + void canvas_bng(t_glist *gl, t_symbol *s, int argc, t_atom *argv) { *************** *** 744,753 **** int x1, y1; gatom_getwherelabel(x, glist, &x1, &y1); ! sys_vgui("pdtk_text_new .x%x.c %x.l %f %f {%s} %d %s\n", glist_getcanvas(glist), x, (double)x1, (double)y1, canvas_realizedollar(x->a_glist, x->a_label)->s_name, sys_hostfontsize(glist_getfont(glist)), ! "black"); } else sys_vgui(".x%x.c delete %x.l\n", glist_getcanvas(glist), x); --- 751,760 ---- int x1, y1; gatom_getwherelabel(x, glist, &x1, &y1); ! sys_vgui("global look; pdtk_text_new .x%x.c %x.l %f %f {%s} %d %s\n", glist_getcanvas(glist), x, (double)x1, (double)y1, canvas_realizedollar(x->a_glist, x->a_label)->s_name, sys_hostfontsize(glist_getfont(glist)), ! "$look(objectfg)"); } else sys_vgui(".x%x.c delete %x.l\n", glist_getcanvas(glist), x); *************** *** 865,868 **** --- 872,892 ---- /* -------------------- widget behavior for text objects ------------ */
+ static const char *text_classname(t_text *x) { + switch (x->te_type) { + case T_TEXT: return "comment"; + case T_OBJECT: + /* if (x->te_g.g_pd==text_class && glist_findrtext(glist, x)->x_active) { */ + if (x->te_g.g_pd==text_class) { + return "brokenbox"; + } else { + return "objectbox"; + } + // case T_OBJECT: return "objectbox"; + case T_MESSAGE: return "message"; + case T_ATOM: return "atom"; + default: return "platypus"; /*???*/ + } + } + static void text_getrect(t_gobj *z, t_glist *glist, int *xp1, int *yp1, int *xp2, int *yp2) *************** *** 929,935 **** t_rtext *y = glist_findrtext(glist, x); rtext_select(y, state); ! if (glist_isvisible(glist) && text_shouldvis(x, glist)) ! sys_vgui(".x%x.c itemconfigure %sR -fill %s\n", glist, ! rtext_gettag(y), (state? "blue" : "black")); }
--- 953,959 ---- t_rtext *y = glist_findrtext(glist, x); rtext_select(y, state); ! if (glist_isvisible(glist) && text_shouldvis(x, glist)) { ! sys_vgui("%s_select .x%x.c %sR %d\n", text_classname(x), glist, rtext_gettag(y), state); ! } }
*************** *** 1107,1144 **** char *tag, int x1, int y1, int x2, int y2) { ! int n = obj_noutlets(ob), nplus = (n == 1 ? 1 : n-1), i; ! int width = x2 - x1; ! for (i = 0; i < n; i++) ! { ! int onset = x1 + (width - IOWIDTH) * i / nplus; ! if (firsttime) ! sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %so%d\n", ! glist_getcanvas(glist), ! onset, y2 - 1, ! onset + IOWIDTH, y2, ! tag, i); ! else ! sys_vgui(".x%x.c coords %so%d %d %d %d %d\n", ! glist_getcanvas(glist), tag, i, ! onset, y2 - 1, ! onset + IOWIDTH, y2); ! } ! n = obj_ninlets(ob); ! nplus = (n == 1 ? 1 : n-1); ! for (i = 0; i < n; i++) ! { ! int onset = x1 + (width - IOWIDTH) * i / nplus; ! if (firsttime) ! sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %si%d\n", ! glist_getcanvas(glist), ! onset, y1, ! onset + IOWIDTH, y1 + EXTRAPIX, ! tag, i); ! else ! sys_vgui(".x%x.c coords %si%d %d %d %d %d\n", ! glist_getcanvas(glist), tag, i, ! onset, y1, ! onset + IOWIDTH, y1 + EXTRAPIX); ! } }
--- 1131,1137 ---- char *tag, int x1, int y1, int x2, int y2) { ! sys_vgui("io_draw .x%x.cBASE %s %d %d %d %d %d %d\n", ! glist_getcanvas(glist), tag, x1, y1, x2, y2, ! obj_ninlets(ob), obj_noutlets(ob)); }
*************** *** 1151,1221 **** width = x2 - x1; height = y2 - y1; ! if (x->te_type == T_OBJECT) ! { ! if (firsttime) ! sys_vgui(".x%x.c create line\ ! %d %d %d %d %d %d %d %d %d %d -tags %sR\n", ! glist_getcanvas(glist), ! x1, y1, x2, y1, x2, y2, x1, y2, x1, y1, tag); ! else ! sys_vgui(".x%x.c coords %sR\ ! %d %d %d %d %d %d %d %d %d %d\n", ! glist_getcanvas(glist), tag, ! x1, y1, x2, y1, x2, y2, x1, y2, x1, y1); ! } ! else if (x->te_type == T_MESSAGE) ! { ! if (firsttime) ! sys_vgui(".x%x.c create line\ ! %d %d %d %d %d %d %d %d %d %d %d %d %d %d -tags %sR\n", ! glist_getcanvas(glist), ! x1, y1, x2+4, y1, x2, y1+4, x2, y2-4, x2+4, y2, ! x1, y2, x1, y1, ! tag); ! else ! sys_vgui(".x%x.c coords %sR\ ! %d %d %d %d %d %d %d %d %d %d %d %d %d %d\n", ! glist_getcanvas(glist), tag, ! x1, y1, x2+4, y1, x2, y1+4, x2, y2-4, x2+4, y2, ! x1, y2, x1, y1); ! } ! else if (x->te_type == T_ATOM) ! { ! if (firsttime) ! sys_vgui(".x%x.c create line\ ! %d %d %d %d %d %d %d %d %d %d %d %d -tags %sR\n", ! glist_getcanvas(glist), ! x1, y1, x2-4, y1, x2, y1+4, x2, y2, x1, y2, x1, y1, ! tag); ! else ! sys_vgui(".x%x.c coords %sR\ ! %d %d %d %d %d %d %d %d %d %d %d %d\n", ! glist_getcanvas(glist), tag, ! x1, y1, x2-4, y1, x2, y1+4, x2, y2, x1, y2, x1, y1); ! } ! /* draw inlets/outlets */ ! ! if (ob = pd_checkobject(&x->te_pd)) ! glist_drawiofor(glist, ob, firsttime, tag, x1, y1, x2, y2); }
void glist_eraseiofor(t_glist *glist, t_object *ob, char *tag) { ! int i, n; ! n = obj_noutlets(ob); ! for (i = 0; i < n; i++) ! sys_vgui(".x%x.c delete %so%d\n", ! glist_getcanvas(glist), tag, i); ! n = obj_ninlets(ob); ! for (i = 0; i < n; i++) ! sys_vgui(".x%x.c delete %si%d\n", ! glist_getcanvas(glist), tag, i); }
void text_eraseborder(t_text *x, t_glist *glist, char *tag) { ! if (x->te_type == T_TEXT) return; ! sys_vgui(".x%x.c delete %sR\n", ! glist_getcanvas(glist), tag); glist_eraseiofor(glist, x, tag); } --- 1144,1161 ---- width = x2 - x1; height = y2 - y1; ! ob = pd_checkobject(&x->te_pd); ! sys_vgui("%s_draw .x%x.c %sR %d %d %d %d %d %d\n", ! text_classname(x),glist,tag,x1,y1,x2,y2, ! ob?obj_ninlets(ob):0, ob?obj_noutlets(ob):0); }
void glist_eraseiofor(t_glist *glist, t_object *ob, char *tag) { ! sys_vgui("io_erase .x%x.c %sBASE\n",glist_getcanvas(glist),tag); }
void text_eraseborder(t_text *x, t_glist *glist, char *tag) { ! sys_vgui("%s_erase .x%x.c %sR\n", text_classname(x), glist_getcanvas(glist), tag); glist_eraseiofor(glist, x, tag); }
Index: g_toggle.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_toggle.c,v retrieving revision 1.1.1.3.2.2 retrieving revision 1.1.1.3.2.2.2.1 diff -C2 -d -r1.1.1.3.2.2 -r1.1.1.3.2.2.2.1 *** g_toggle.c 18 Nov 2003 10:34:10 -0000 1.1.1.3.2.2 --- g_toggle.c 5 Mar 2004 19:27:52 -0000 1.1.1.3.2.2.2.1 *************** *** 37,43 ****
sys_vgui(".x%x.c itemconfigure %xX1 -fill #%6.6x\n", canvas, x, ! (x->x_on!=0.0)?x->x_gui.x_fcol:x->x_gui.x_bcol); sys_vgui(".x%x.c itemconfigure %xX2 -fill #%6.6x\n", canvas, x, ! (x->x_on!=0.0)?x->x_gui.x_fcol:x->x_gui.x_bcol); } } --- 37,43 ----
sys_vgui(".x%x.c itemconfigure %xX1 -fill #%6.6x\n", canvas, x, ! (x->x_on!=0.0)?x->x_gui.x_fcol:pd_bluify(x->x_gui.x_bcol)); sys_vgui(".x%x.c itemconfigure %xX2 -fill #%6.6x\n", canvas, x, ! (x->x_on!=0.0)?x->x_gui.x_fcol:pd_bluify(x->x_gui.x_bcol)); } } *************** *** 47,64 **** t_canvas *canvas=glist_getcanvas(glist); int w=1, xx=text_xpix(&x->x_gui.x_obj, glist), yy=text_ypix(&x->x_gui.x_obj, glist); ! if(x->x_gui.x_w >= 30) w = 2; if(x->x_gui.x_w >= 60) w = 3; ! sys_vgui(".x%x.c create rectangle %d %d %d %d -fill #%6.6x -tags %xBASE\n", ! canvas, xx, yy, xx + x->x_gui.x_w, yy + x->x_gui.x_h, ! x->x_gui.x_bcol, x); sys_vgui(".x%x.c create line %d %d %d %d -width %d -fill #%6.6x -tags %xX1\n", ! canvas, xx+w+1, yy+w+1, xx + x->x_gui.x_w-w, yy + x->x_gui.x_h-w, w, ! (x->x_on!=0.0)?x->x_gui.x_fcol:x->x_gui.x_bcol, x); sys_vgui(".x%x.c create line %d %d %d %d -width %d -fill #%6.6x -tags %xX2\n", ! canvas, xx+w+1, yy + x->x_gui.x_h-w-1, xx + x->x_gui.x_w-w, yy+w, w, ! (x->x_on!=0.0)?x->x_gui.x_fcol:x->x_gui.x_bcol, x); sys_vgui(".x%x.c create text %d %d -text {%s} -anchor w \ -font {%s %d bold} -fill #%6.6x -tags %xLABEL\n", --- 47,64 ---- t_canvas *canvas=glist_getcanvas(glist); int w=1, xx=text_xpix(&x->x_gui.x_obj, glist), yy=text_ypix(&x->x_gui.x_obj, glist); ! int x1=xx,y1=yy,x2=xx+x->x_gui.x_w,y2=yy+x->x_gui.x_h; if(x->x_gui.x_w >= 30) w = 2; if(x->x_gui.x_w >= 60) w = 3; ! sys_vgui("bluebox_draw .x%x.c %xBASE %d %d %d %d %d %d #%6.6x\n", ! canvas,x, x1,y1,x2,y2, ! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,x->x_gui.x_bcol); sys_vgui(".x%x.c create line %d %d %d %d -width %d -fill #%6.6x -tags %xX1\n", ! canvas, xx+w+3, yy+w+3, xx + x->x_gui.x_w-w-1, yy + x->x_gui.x_h-w-1, w, ! (x->x_on!=0.0)?x->x_gui.x_fcol:pd_bluify(x->x_gui.x_bcol), x); sys_vgui(".x%x.c create line %d %d %d %d -width %d -fill #%6.6x -tags %xX2\n", ! canvas, xx+w+3, yy + x->x_gui.x_h-w-2, xx + x->x_gui.x_w-w-1, yy+w+2, w, ! (x->x_on!=0.0)?x->x_gui.x_fcol:pd_bluify(x->x_gui.x_bcol), x); sys_vgui(".x%x.c create text %d %d -text {%s} -anchor w \ -font {%s %d bold} -fill #%6.6x -tags %xLABEL\n", *************** *** 67,76 **** 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, x->x_gui.x_lcol, x); - if(!x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xOUT%d\n", - canvas, xx, yy + x->x_gui.x_h-1, xx + IOWIDTH, yy + x->x_gui.x_h, x, 0); - if(!x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xIN%d\n", - canvas, xx, yy, xx + IOWIDTH, yy+1, x, 0); }
--- 67,70 ---- *************** *** 79,82 **** --- 73,77 ---- t_canvas *canvas=glist_getcanvas(glist); int w=1, xx=text_xpix(&x->x_gui.x_obj, glist), yy=text_ypix(&x->x_gui.x_obj, glist); + int x1=xx,y1=yy,x2=xx+x->x_gui.x_w,y2=yy+x->x_gui.x_h;
if(x->x_gui.x_w >= 30) *************** *** 85,90 **** if(x->x_gui.x_w >= 60) w = 3; ! sys_vgui(".x%x.c coords %xBASE %d %d %d %d\n", ! canvas, x, xx, yy, xx + x->x_gui.x_w, yy + x->x_gui.x_h); sys_vgui(".x%x.c itemconfigure %xX1 -width %d\n", canvas, x, w); sys_vgui(".x%x.c coords %xX1 %d %d %d %d\n", --- 80,86 ---- if(x->x_gui.x_w >= 60) w = 3; ! sys_vgui("bluebox_draw .x%x.c %xBASE %d %d %d %d %d %d #%6.6x\n", ! canvas,x, x1,y1,x2,y2, ! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,x->x_gui.x_bcol); sys_vgui(".x%x.c itemconfigure %xX1 -width %d\n", canvas, x, w); sys_vgui(".x%x.c coords %xX1 %d %d %d %d\n", *************** *** 95,104 **** sys_vgui(".x%x.c coords %xLABEL %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) - sys_vgui(".x%x.c coords %xOUT%d %d %d %d %d\n", - canvas, x, 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) - sys_vgui(".x%x.c coords %xIN%d %d %d %d %d\n", - canvas, x, 0, xx, yy, xx + IOWIDTH, yy+1); }
--- 91,94 ---- *************** *** 107,118 **** t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui(".x%x.c delete %xBASE\n", canvas, x); sys_vgui(".x%x.c delete %xX1\n", canvas, x); sys_vgui(".x%x.c delete %xX2\n", canvas, x); sys_vgui(".x%x.c delete %xLABEL\n", canvas, x); - if(!x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%x.c delete %xOUT%d\n", canvas, x, 0); - if(!x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c delete %xIN%d\n", canvas, x, 0); }
--- 97,104 ---- t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui("bluebox_erase .x%x.c %xBASE\n", canvas, x); sys_vgui(".x%x.c delete %xX1\n", canvas, x); sys_vgui(".x%x.c delete %xX2\n", canvas, x); sys_vgui(".x%x.c delete %xLABEL\n", canvas, x); }
Index: g_vdial.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_vdial.c,v retrieving revision 1.1.1.4.2.2 retrieving revision 1.1.1.4.2.2.2.1 diff -C2 -d -r1.1.1.4.2.2 -r1.1.1.4.2.2.2.1 *** g_vdial.c 18 Nov 2003 10:34:10 -0000 1.1.1.4.2.2 --- g_vdial.c 5 Mar 2004 19:27:52 -0000 1.1.1.4.2.2.2.1 *************** *** 18,29 **** #include <math.h>
- /*------------------ global variables -------------------------*/ - - - /*------------------ global functions -------------------------*/ - - - - /* ------------- vdl gui-vertical radio button ---------------------- */
--- 18,21 ---- *************** *** 57,66 **** int xx11=text_xpix(&x->x_gui.x_obj, glist), xx12=xx11+dy; int xx21=xx11+s4, xx22=xx12-s4;
! for(i=0; i<n; i++) { - sys_vgui(".x%x.c create rectangle %d %d %d %d -fill #%6.6x -tags %xBASE%d\n", - canvas, xx11, yy11, xx12, yy12, - x->x_gui.x_bcol, x, i); sys_vgui(".x%x.c create rectangle %d %d %d %d -fill #%6.6x -outline #%6.6x -tags %xBUT%d\n", canvas, xx21, yy21, xx22, yy22, --- 49,63 ---- int xx11=text_xpix(&x->x_gui.x_obj, glist), xx12=xx11+dy; int xx21=xx11+s4, xx22=xx12-s4; + int xpos=text_xpix(&x->x_gui.x_obj, glist); + int ypos=text_ypix(&x->x_gui.x_obj, glist);
! sys_vgui("radio_draw .x%x.c %xBASE %d %d %d %d %d %d 0 %d #%6.6x\n", ! canvas, x, xx11, yy11, xx12, yy11+dy*x->x_number, ! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able, ! x->x_number,x->x_gui.x_bcol); ! sys_vgui("radio_set .x%x.c %x %d\n",canvas,x,x->x_on); ! /* ! for(i=0; i<n; i++) { sys_vgui(".x%x.c create rectangle %d %d %d %d -fill #%6.6x -outline #%6.6x -tags %xBUT%d\n", canvas, xx21, yy21, xx22, yy22, *************** *** 72,75 **** --- 69,74 ---- yy22 += dy; } + */ + //sys_vgui("radio_set .x%x.c %x %d\n",canvas,x,x->x_on); sys_vgui(".x%x.c create text %d %d -text {%s} -anchor w \ -font {%s %d bold} -fill #%6.6x -tags %xLABEL\n", *************** *** 78,87 **** x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_lcol, x); - if(!x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xOUT%d\n", - canvas, xx11, yy11-1, xx11 + IOWIDTH, yy11, x, 0); - if(!x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xIN%d\n", - canvas, xx11, yy11b, xx11 + IOWIDTH, yy11b+1, x, 0); }
--- 77,80 ---- *************** *** 95,118 **** int xx11=text_xpix(&x->x_gui.x_obj, glist), xx12=xx11+dy; int xx21=xx11+s4, xx22=xx12-s4;
! for(i=0; i<n; i++) ! { ! sys_vgui(".x%x.c coords %xBASE%d %d %d %d %d\n", ! canvas, x, i, xx11, yy11, xx12, yy12); ! sys_vgui(".x%x.c coords %xBUT%d %d %d %d %d\n", ! canvas, x, i, xx21, yy21, xx22, yy22); ! yy11 += dy; ! yy12 += dy; ! yy21 += dy; ! yy22 += dy; ! } sys_vgui(".x%x.c coords %xLABEL %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) - sys_vgui(".x%x.c coords %xOUT%d %d %d %d %d\n", - canvas, x, 0, xx11, yy11-1, xx11 + IOWIDTH, yy11); - if(!x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c coords %xIN%d %d %d %d %d\n", - canvas, x, 0, xx11, yy11b, xx11 + IOWIDTH, yy11b+1); }
--- 88,101 ---- int xx11=text_xpix(&x->x_gui.x_obj, glist), xx12=xx11+dy; int xx21=xx11+s4, xx22=xx12-s4; + int xpos=text_xpix(&x->x_gui.x_obj, glist); + int ypos=text_ypix(&x->x_gui.x_obj, glist);
! sys_vgui("radio_draw .x%x.c %xBASE %d %d %d %d %d %d 0 %d #%6.6x\n", ! canvas, x, xx11, yy11, xx12, yy12+dy*x->x_number, ! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able, ! x->x_number,x->x_gui.x_bcol); ! sys_vgui("radio_set .x%x.c %x %d\n",canvas,x,x->x_on); sys_vgui(".x%x.c coords %xLABEL %d %d\n", canvas, x, xx11+x->x_gui.x_ldx, yy11b+x->x_gui.x_ldy); }
*************** *** 124,135 **** for(i=0; i<n; i++) { ! sys_vgui(".x%x.c delete %xBASE%d\n", canvas, x, i); sys_vgui(".x%x.c delete %xBUT%d\n", canvas, x, i); } sys_vgui(".x%x.c delete %xLABEL\n", canvas, x); - if(!x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%x.c delete %xOUT%d\n", canvas, x, 0); - if(!x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c delete %xIN%d\n", canvas, x, 0); }
--- 107,114 ---- for(i=0; i<n; i++) { ! sys_vgui("bluebox_erase .x%x.c %xBASE%d\n", canvas, x, i); sys_vgui(".x%x.c delete %xBUT%d\n", canvas, x, i); } sys_vgui(".x%x.c delete %xLABEL\n", canvas, x); }
*************** *** 153,179 **** }
- void vradio_draw_io(t_vradio* x, t_glist* glist, int old_snd_rcv_flags) - { - t_canvas *canvas=glist_getcanvas(glist); - int xpos=text_xpix(&x->x_gui.x_obj, glist); - int ypos=text_ypix(&x->x_gui.x_obj, glist); - - if((old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && !x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xOUT%d\n", - canvas, xpos, - ypos+(x->x_number*x->x_gui.x_h)-1, - xpos+ IOWIDTH, - ypos+(x->x_number*x->x_gui.x_h), x, 0); - if(!(old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%x.c delete %xOUT%d\n", canvas, x, 0); - if((old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && !x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xIN%d\n", - canvas, xpos, ypos, - xpos+ IOWIDTH, ypos+1, - x, 0); - if(!(old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c delete %xIN%d\n", canvas, x, 0); - } - void vradio_draw_select(t_vradio* x, t_glist* glist) { --- 132,135 ---- *************** *** 204,221 **** void vradio_draw(t_vradio *x, t_glist *glist, int mode) { ! if(mode == IEM_GUI_DRAW_MODE_UPDATE) ! vradio_draw_update(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_MOVE) ! vradio_draw_move(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_NEW) ! vradio_draw_new(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_SELECT) ! vradio_draw_select(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_ERASE) ! vradio_draw_erase(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_CONFIG) ! vradio_draw_config(x, glist); ! else if(mode >= IEM_GUI_DRAW_MODE_IO) ! vradio_draw_io(x, glist, mode - IEM_GUI_DRAW_MODE_IO); }
--- 160,170 ---- void vradio_draw(t_vradio *x, t_glist *glist, int mode) { ! if(mode == IEM_GUI_DRAW_MODE_UPDATE) vradio_draw_update(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_MOVE) vradio_draw_move(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_NEW) vradio_draw_new(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_SELECT) vradio_draw_select(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_ERASE) vradio_draw_erase(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_CONFIG) vradio_draw_config(x, glist); ! else if(mode >= IEM_GUI_DRAW_MODE_IO) vradio_draw_move(x, glist); }
Index: g_vslider.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_vslider.c,v retrieving revision 1.1.1.3.2.2 retrieving revision 1.1.1.3.2.2.2.1 diff -C2 -d -r1.1.1.3.2.2 -r1.1.1.3.2.2.2.1 *** g_vslider.c 18 Nov 2003 10:34:10 -0000 1.1.1.3.2.2 --- g_vslider.c 5 Mar 2004 19:27:52 -0000 1.1.1.3.2.2.2.1 *************** *** 49,58 **** int ypos=text_ypix(&x->x_gui.x_obj, glist); int r = ypos + x->x_gui.x_h - (x->x_val + 50)/100; t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui(".x%x.c create rectangle %d %d %d %d -fill #%6.6x -tags %xBASE\n", ! canvas, xpos, ypos-2, ! xpos + x->x_gui.x_w, ypos + x->x_gui.x_h+3, ! x->x_gui.x_bcol, x); sys_vgui(".x%x.c create line %d %d %d %d -width 3 -fill #%6.6x -tags %xKNOB\n", canvas, xpos+1, r, --- 49,59 ---- int ypos=text_ypix(&x->x_gui.x_obj, glist); int r = ypos + x->x_gui.x_h - (x->x_val + 50)/100; + int x1=xpos,y1=ypos,x2=xpos+x->x_gui.x_w, y2=ypos+x->x_gui.x_h+2; t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui("bluebox_draw .x%x.c %xBASE %d %d %d %d %d %d #%6.6x\n", ! canvas, x, xpos, ypos, xpos+x->x_gui.x_w, ypos+x->x_gui.x_h, ! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,x->x_gui.x_bcol); ! sys_vgui(".x%x.c create line %d %d %d %d -width 3 -fill #%6.6x -tags %xKNOB\n", canvas, xpos+1, r, *************** *** 63,78 **** 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, x->x_gui.x_lcol, x); - if(!x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xOUT%d\n", - canvas, - xpos, ypos + x->x_gui.x_h+2, - xpos+7, ypos + x->x_gui.x_h+3, - x, 0); - if(!x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xIN%d\n", - canvas, - xpos, ypos-2, - xpos+7, ypos-1, - x, 0); }
--- 64,67 ---- *************** *** 83,91 **** int r = ypos + x->x_gui.x_h - (x->x_val + 50)/100; t_canvas *canvas=glist_getcanvas(glist); ! ! sys_vgui(".x%x.c coords %xBASE %d %d %d %d\n", ! canvas, x, ! xpos, ypos-2, ! xpos + x->x_gui.x_w, ypos + x->x_gui.x_h+3); sys_vgui(".x%x.c coords %xKNOB %d %d %d %d\n", canvas, x, xpos+1, r, --- 72,78 ---- int r = ypos + x->x_gui.x_h - (x->x_val + 50)/100; t_canvas *canvas=glist_getcanvas(glist); ! sys_vgui("bluebox_draw .x%x.c %xBASE %d %d %d %d %d %d #%6.6x\n", ! canvas, x, xpos, ypos, xpos+x->x_gui.x_w, ypos+x->x_gui.x_h, ! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,x->x_gui.x_bcol); sys_vgui(".x%x.c coords %xKNOB %d %d %d %d\n", canvas, x, xpos+1, r, *************** *** 93,106 **** sys_vgui(".x%x.c coords %xLABEL %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) - sys_vgui(".x%x.c coords %xOUT%d %d %d %d %d\n", - canvas, x, 0, - xpos, ypos + x->x_gui.x_h+2, - xpos+7, ypos + x->x_gui.x_h+3); - if(!x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c coords %xIN%d %d %d %d %d\n", - canvas, x, 0, - xpos, ypos-2, - xpos+7, ypos-1); }
--- 80,83 ---- *************** *** 109,119 **** t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui(".x%x.c delete %xBASE\n", canvas, x); sys_vgui(".x%x.c delete %xKNOB\n", canvas, x); sys_vgui(".x%x.c delete %xLABEL\n", canvas, x); - if(!x->x_gui.x_fsf.x_snd_able) - sys_vgui(".x%x.c delete %xOUT%d\n", canvas, x, 0); - if(!x->x_gui.x_fsf.x_rcv_able) - sys_vgui(".x%x.c delete %xIN%d\n", canvas, x, 0); }
--- 86,92 ---- t_canvas *canvas=glist_getcanvas(glist);
! sys_vgui("bluebox_erase .x%x.c %xBASE\n", canvas, x); sys_vgui(".x%x.c delete %xKNOB\n", canvas, x); sys_vgui(".x%x.c delete %xLABEL\n", canvas, x); }
*************** *** 121,124 **** --- 94,99 ---- { t_canvas *canvas=glist_getcanvas(glist); + int xpos=text_xpix(&x->x_gui.x_obj, glist); + int ypos=text_ypix(&x->x_gui.x_obj, glist);
sys_vgui(".x%x.c itemconfigure %xLABEL -font {%s %d bold} -fill #%6.6x -text {%s} \n", *************** *** 128,157 **** sys_vgui(".x%x.c itemconfigure %xKNOB -fill #%6.6x\n", canvas, x, x->x_gui.x_fcol); ! sys_vgui(".x%x.c itemconfigure %xBASE -fill #%6.6x\n", canvas, ! x, x->x_gui.x_bcol); ! } ! ! static void vslider_draw_io(t_vslider* 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); ! t_canvas *canvas=glist_getcanvas(glist); ! ! if((old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && !x->x_gui.x_fsf.x_snd_able) ! sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xOUT%d\n", ! canvas, ! xpos, ypos + x->x_gui.x_h+2, ! xpos+7, ypos + x->x_gui.x_h+3, ! x, 0); ! if(!(old_snd_rcv_flags & IEM_GUI_OLD_SND_FLAG) && x->x_gui.x_fsf.x_snd_able) ! sys_vgui(".x%x.c delete %xOUT%d\n", canvas, x, 0); ! if((old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && !x->x_gui.x_fsf.x_rcv_able) ! sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xIN%d\n", ! canvas, ! xpos, ypos-2, ! xpos+7, ypos-1, ! x, 0); ! if(!(old_snd_rcv_flags & IEM_GUI_OLD_RCV_FLAG) && x->x_gui.x_fsf.x_rcv_able) ! sys_vgui(".x%x.c delete %xIN%d\n", canvas, x, 0); }
--- 103,109 ---- sys_vgui(".x%x.c itemconfigure %xKNOB -fill #%6.6x\n", canvas, x, x->x_gui.x_fcol); ! sys_vgui("bluebox_draw .x%x.c %xBASE %d %d %d %d %d %d #%6.6x\n", ! canvas, x, xpos, ypos, xpos+x->x_gui.x_w, ypos+x->x_gui.x_h, ! !x->x_gui.x_fsf.x_rcv_able, !x->x_gui.x_fsf.x_snd_able,x->x_gui.x_bcol); }
*************** *** 174,191 **** void vslider_draw(t_vslider *x, t_glist *glist, int mode) { ! if(mode == IEM_GUI_DRAW_MODE_UPDATE) ! vslider_draw_update(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_MOVE) ! vslider_draw_move(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_NEW) ! vslider_draw_new(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_SELECT) ! vslider_draw_select(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_ERASE) ! vslider_draw_erase(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_CONFIG) ! vslider_draw_config(x, glist); ! else if(mode >= IEM_GUI_DRAW_MODE_IO) ! vslider_draw_io(x, glist, mode - IEM_GUI_DRAW_MODE_IO); }
--- 126,136 ---- void vslider_draw(t_vslider *x, t_glist *glist, int mode) { ! if(mode == IEM_GUI_DRAW_MODE_UPDATE) vslider_draw_update(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_MOVE) vslider_draw_move(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_NEW) vslider_draw_new(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_SELECT) vslider_draw_select(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_ERASE) vslider_draw_erase(x, glist); ! else if(mode == IEM_GUI_DRAW_MODE_CONFIG) vslider_draw_config(x, glist); ! else if(mode >= IEM_GUI_DRAW_MODE_IO) vslider_draw_move(x, glist); }
Index: g_vumeter.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_vumeter.c,v retrieving revision 1.1.1.3.2.2 retrieving revision 1.1.1.3.2.2.2.1 diff -C2 -d -r1.1.1.3.2.2 -r1.1.1.3.2.2.2.1 *** g_vumeter.c 18 Nov 2003 10:34:10 -0000 1.1.1.3.2.2 --- g_vumeter.c 5 Mar 2004 19:27:52 -0000 1.1.1.3.2.2.2.1 *************** *** 126,155 **** 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, x->x_gui.x_lcol, x); ! if(!x->x_gui.x_fsf.x_snd_able) ! { ! sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xOUT%d\n", ! canvas, ! xpos-1, ypos + x->x_gui.x_h+1, ! xpos + IOWIDTH-1, ypos + x->x_gui.x_h+2, ! x, 0); ! sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xOUT%d\n", ! canvas, ! xpos+x->x_gui.x_w+1-IOWIDTH, ypos + x->x_gui.x_h+1, ! xpos+x->x_gui.x_w+1, ypos + x->x_gui.x_h+2, ! x, 1); ! } ! if(!x->x_gui.x_fsf.x_rcv_able) ! { ! sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xIN%d\n", ! canvas, ! xpos-1, ypos-2, ! xpos + IOWIDTH-1, ypos-1, ! x, 0); ! sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xIN%d\n", ! canvas, ! xpos+x->x_gui.x_w+1-IOWIDTH, ypos-2, ! xpos+x->x_gui.x_w+1, ypos-1, ! x, 1); ! } }
--- 126,132 ---- 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, x->x_gui.x_lcol, x); ! sys_vgui("io_draw .x%x.c %x %d %d %d %d %d %d\n", ! canvas, x, xpos-1, ypos-2, xpos+x->x_gui.x_w+1, ypos+x->x_gui.x_h+2, ! 2*!x->x_gui.x_fsf.x_rcv_able, 2*!x->x_gui.x_fsf.x_snd_able); }
*************** *** 191,216 **** canvas, x, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy); ! if(!x->x_gui.x_fsf.x_snd_able) ! { ! sys_vgui(".x%x.c coords %xOUT%d %d %d %d %d\n", ! canvas, x, 0, ! xpos-1, ypos + x->x_gui.x_h+1, ! xpos + IOWIDTH-1, ypos + x->x_gui.x_h+2); ! sys_vgui(".x%x.c coords %xOUT%d %d %d %d %d\n", ! canvas, x, 1, ! xpos+x->x_gui.x_w+1-IOWIDTH, ypos + x->x_gui.x_h+1, ! xpos+x->x_gui.x_w+1, ypos + x->x_gui.x_h+2); ! } ! if(!x->x_gui.x_fsf.x_rcv_able) ! { ! sys_vgui(".x%x.c coords %xIN%d %d %d %d %d\n", ! canvas, x, 0, ! xpos-1, ypos-2, ! xpos + IOWIDTH-1, ypos-1); ! sys_vgui(".x%x.c coords %xIN%d %d %d %d %d\n", ! canvas, x, 1, ! xpos+x->x_gui.x_w+1-IOWIDTH, ypos-2, ! xpos+x->x_gui.x_w+1, ypos-1); ! } }
--- 168,174 ---- canvas, x, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy); ! sys_vgui("io_draw .x%x.c %x %d %d %d %d %d %d\n", ! canvas, x, xpos-1, ypos-2, xpos+x->x_gui.x_w+1, ypos+x->x_gui.x_h+2, ! 2*!x->x_gui.x_fsf.x_rcv_able, 2*!x->x_gui.x_fsf.x_snd_able); }