Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2650
Modified Files: Tag: impd_0_37 g_bang.c g_toggle.c Log Message: ditto
Index: g_toggle.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_toggle.c,v retrieving revision 1.1.1.3.2.2.2.20 retrieving revision 1.1.1.3.2.2.2.21 diff -C2 -d -r1.1.1.3.2.2.2.20 -r1.1.1.3.2.2.2.21 *** g_toggle.c 7 May 2004 19:04:16 -0000 1.1.1.3.2.2.2.20 --- g_toggle.c 8 May 2004 19:49:26 -0000 1.1.1.3.2.2.2.21 *************** *** 26,39 **** static t_class *toggle_class;
- void toggle_draw(t_toggle *x, t_glist *glist, int mode) { - if (mode==IEM_GUI_DRAW_MODE_ERASE) sys_mgui((t_iemgui *)x,"toggle","erase",""); - else if (mode==IEM_GUI_DRAW_MODE_SELECT) - sys_mgui((t_iemgui *)x,"toggle","select","i",x->x_gui.x_selected); - else { - pd_upload((t_gobj *)x,glist); - sys_mgui((t_iemgui *)x,"toggle","draw",""); - if(glist_isvisible(glist)) sys_mgui((t_iemgui *)x,"toggle","set","i",x->x_on!=0.0); - }} - /* ------------------------ tgl widgetbehaviour----------------------------- */
--- 26,29 ---- *************** *** 53,65 **** t_symbol *srl[3]; iemgui_save(&x->x_gui, srl, 0); ! binbuf_addv(b, "ssiisiisssiiiiiiiff", gensym("#X"),gensym("obj"), ! (t_int)x->x_gui.x_obj.te_xpix, ! (t_int)x->x_gui.x_obj.te_ypix, ! gensym("tgl"), x->x_gui.x_w, iem_symargstoint(&x->x_gui), ! srl[0], srl[1], srl[2], x->x_gui.x_ldx, x->x_gui.x_ldy, ! x->x_gui.x_font_style, x->x_gui.x_fontsize, convert_color2(y->x_bcol), convert_color2(y->x_fcol), convert_color2(y->x_lcol), x->x_on, x->x_nonzero); - binbuf_addv(b, ";"); }
--- 43,53 ---- t_symbol *srl[3]; iemgui_save(&x->x_gui, srl, 0); ! binbuf_addv(b, "ssiisiisssiiiiiiiff;", gensym("#X"),gensym("obj"), ! (t_int)y->x_obj.te_xpix, (t_int)y->x_obj.te_ypix, ! gensym("tgl"), y->x_w, iem_symargstoint(y), ! srl[0], srl[1], srl[2], y->x_ldx, y->x_ldy, ! y->x_font_style, y->x_fontsize, convert_color2(y->x_bcol), convert_color2(y->x_fcol), convert_color2(y->x_lcol), x->x_on, x->x_nonzero); }
*************** *** 72,77 **** static void toggle_bang(t_toggle *x) { ! x->x_on = (x->x_on==0.0)?x->x_nonzero:0.0; ! x->x_gui.x_draw(x, x->x_gui.x_glist, 0); toggle_action(x); } --- 60,65 ---- static void toggle_bang(t_toggle *x) { ! x->x_on = x->x_on?0.0:x->x_nonzero; ! iemgui_dodraw((t_iemgui *)x); toggle_action(x); } *************** *** 79,85 **** static void toggle_set(t_toggle *x, t_floatarg f) { ! x->x_on = f; ! if(f != 0.0) x->x_nonzero = f; ! x->x_gui.x_draw(x, x->x_gui.x_glist, 0); }
--- 67,73 ---- static void toggle_set(t_toggle *x, t_floatarg f) { ! x->x_on=f; ! if(f) x->x_nonzero=f; ! iemgui_dodraw((t_iemgui *)x); }
*************** *** 99,103 **** }
- static void toggle_init(t_toggle *x, t_floatarg f) {x->x_gui.x_loadinit = !!f;} static void toggle_nonzero(t_toggle *x, t_floatarg f) {if (f) x->x_nonzero = f;}
--- 87,90 ---- *************** *** 119,123 **** y->x_rcv_able = y->x_rcv!=sym_empty; if (y->x_rcv_able) pd_bind((t_pd *)x, y->x_rcv); ! if (glist_isvisible(glist_getcanvas(y->x_glist))) x->x_gui.x_draw(x, y->x_glist, 0); }
--- 106,110 ---- y->x_rcv_able = y->x_rcv!=sym_empty; if (y->x_rcv_able) pd_bind((t_pd *)x, y->x_rcv); ! if (glist_isvisible(glist_getcanvas(y->x_glist))) iemgui_dodraw((t_iemgui *)x); }
*************** *** 126,130 **** t_iemgui *y = iemgui_new(toggle_class); t_toggle *x = (t_toggle *)y; - y->x_draw = (t_iemfunptr)toggle_draw; y->x_binbufindex = 2; x->x_on=0.0; --- 113,116 ---- *************** *** 154,158 **** class_addmethod(c, (t_method)toggle_set, gensym("set"), A_FLOAT, 0); class_addmethod(c, (t_method)toggle_size, gensym("size"), A_GIMME, 0); ! class_addmethod(c, (t_method)toggle_init, gensym("init"), A_FLOAT, 0); class_addmethod(c, (t_method)toggle_nonzero, gensym("nonzero"), A_FLOAT, 0); wb.w_getrectfn = toggle_getrect; --- 140,144 ---- class_addmethod(c, (t_method)toggle_set, gensym("set"), A_FLOAT, 0); class_addmethod(c, (t_method)toggle_size, gensym("size"), A_GIMME, 0); ! class_addmethod(c, (t_method)iemgui_init, gensym("init"), A_FLOAT, 0); class_addmethod(c, (t_method)toggle_nonzero, gensym("nonzero"), A_FLOAT, 0); wb.w_getrectfn = toggle_getrect;
Index: g_bang.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/g_bang.c,v retrieving revision 1.1.1.3.2.2.2.23 retrieving revision 1.1.1.3.2.2.2.24 diff -C2 -d -r1.1.1.3.2.2.2.23 -r1.1.1.3.2.2.2.24 *** g_bang.c 4 May 2004 07:15:49 -0000 1.1.1.3.2.2.2.23 --- g_bang.c 8 May 2004 19:49:26 -0000 1.1.1.3.2.2.2.24 *************** *** 26,33 **** static t_class *bng_class;
- void bng_draw(t_bng *x, t_glist *glist, int mode) { - iemgui_draw((t_iemgui *)x,glist,mode,"bang"); - } - /* ------------------------ bng widgetbehaviour----------------------------- */
--- 26,29 ---- *************** *** 69,73 **** } else { t_canvas *glist = ((t_iemgui *)x)->x_glist; ! if (glist_isvisible(glist_getcanvas(glist))) sys_mgui((t_iemgui *)x,"bang","bang",""); } x->x_flashed = 1; --- 65,69 ---- } else { t_canvas *glist = ((t_iemgui *)x)->x_glist; ! if (glist_isvisible(glist_getcanvas(glist))) sys_mgui((t_iemgui *)x,"bang",""); } x->x_flashed = 1; *************** *** 96,105 **** }
- static void bng_float(t_bng *x, t_floatarg f) {bng_bang2(x);} - static void bng_symbol(t_bng *x, t_symbol *s) {bng_bang2(x);} - static void bng_pointer(t_bng *x, t_gpointer *gp) {bng_bang2(x);} - static void bng_list(t_bng *x, t_symbol *s, int ac, t_atom *av) {bng_bang2(x);} - static void bng_anything(t_bng *x, t_symbol *s, int argc, t_atom *argv) {bng_bang2(x);} - static void bng_loadbang(t_bng *x) {if(!sys_noloadbang && x->x_gui.x_loadinit) {bng_set(x); bng_bout2(x);}} --- 92,95 ---- *************** *** 118,122 **** }
- static void bng_init(t_bng *x, t_floatarg f) {x->x_gui.x_loadinit = !!f;} static void bng_tick_hld(t_bng *x) {x->x_flashed = 0;} static void bng_tick_brk(t_bng *x) {} --- 108,111 ---- *************** *** 133,137 **** &y->x_bcol,&y->x_fcol,&y->x_lcol)) return; iem_inttosymargs(y,isa); - y->x_h = y->x_w; bng_check_minmax(x, x->x_flashtime_break, x->x_flashtime_hold); --- 122,125 ---- *************** *** 140,144 **** if (y->x_rcv_able) pd_bind((t_pd *)x, y->x_rcv); iemgui_constrain(y); ! if (glist_isvisible(glist_getcanvas(y->x_glist))) x->x_gui.x_draw(x, y->x_glist, 0); }
--- 128,132 ---- if (y->x_rcv_able) pd_bind((t_pd *)x, y->x_rcv); iemgui_constrain(y); ! if (glist_isvisible(glist_getcanvas(y->x_glist))) iemgui_dodraw((t_iemgui *)x); }
*************** *** 151,155 **** bng_check_minmax(x, x->x_flashtime_break, x->x_flashtime_hold); x->x_flashed = 0; - y->x_draw = (t_iemfunptr)bng_draw; y->x_locked = 0; x->x_clock_hld = clock_new(x, (t_method)bng_tick_hld); --- 139,142 ---- *************** *** 177,190 **** iemgui_subclass(c); class_addbang(c, bng_bang); ! class_addfloat(c, bng_float); ! class_addsymbol(c, bng_symbol); ! class_addpointer(c, bng_pointer); ! class_addlist(c, bng_list); ! class_addanything(c, bng_anything); class_addmethod(c, (t_method)bng_reload, gensym("reload"), A_GIMME, 0); class_addmethod(c, (t_method)bng_loadbang, gensym("loadbang"), 0); class_addmethod(c, (t_method)bng_size, gensym("size"), A_GIMME, 0); class_addmethod(c, (t_method)bng_flashtime, gensym("flashtime"), A_GIMME, 0); ! class_addmethod(c, (t_method)bng_init, gensym("init"), A_FLOAT, 0); wb.w_getrectfn = bng_getrect; wb.w_displacefn = iemgui_displace; --- 164,177 ---- iemgui_subclass(c); class_addbang(c, bng_bang); ! class_addfloat(c, bng_bang2); ! class_addsymbol(c, bng_bang2); ! class_addpointer(c, bng_bang2); ! class_addlist(c, bng_bang2); ! class_addanything(c, bng_bang2); class_addmethod(c, (t_method)bng_reload, gensym("reload"), A_GIMME, 0); class_addmethod(c, (t_method)bng_loadbang, gensym("loadbang"), 0); class_addmethod(c, (t_method)bng_size, gensym("size"), A_GIMME, 0); class_addmethod(c, (t_method)bng_flashtime, gensym("flashtime"), A_GIMME, 0); ! class_addmethod(c, (t_method)iemgui_init, gensym("init"), A_FLOAT, 0); wb.w_getrectfn = bng_getrect; wb.w_displacefn = iemgui_displace;