Update of /cvsroot/pure-data/externals/iem/iemgui/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15448
Modified Files:
sym_dial.c
Log Message:
new add method
Index: sym_dial.c
===================================================================
RCS file: /cvsroot/pure-data/externals/iem/iemgui/src/sym_dial.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** sym_dial.c 31 Oct 2007 11:37:45 -0000 1.3
--- sym_dial.c 8 Nov 2007 15:27:26 -0000 1.4
***************
*** 2,6 ****
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
! iemgui written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */
#include "m_pd.h"
--- 2,6 ----
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
! iemgui written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2007 */
#include "m_pd.h"
***************
*** 313,318 ****
binbuf_addv(b, "ssiisiiiisssiiiiiiiii", gensym("#X"),gensym("obj"),
(t_int)x->x_gui.x_obj.te_xpix, (t_int)x->x_gui.x_obj.te_ypix,
! atom_getsymbol(binbuf_getvec(x->x_gui.x_obj.te_binbuf)),
! x->x_gui.x_w, x->x_gui.x_h,
iem_symargstoint(&x->x_gui.x_isa), x->x_snd_flt0_sym1,
srl[0], srl[1], srl[2],
--- 313,317 ----
binbuf_addv(b, "ssiisiiiisssiiiiiiiii", gensym("#X"),gensym("obj"),
(t_int)x->x_gui.x_obj.te_xpix, (t_int)x->x_gui.x_obj.te_ypix,
! gensym("sdl"), x->x_gui.x_w, x->x_gui.x_h,
iem_symargstoint(&x->x_gui.x_isa), x->x_snd_flt0_sym1,
srl[0], srl[1], srl[2],
***************
*** 340,345 ****
binbuf_addv(b, "ssiisiiiisssiiiiiiiii", gensym("#X"),gensym("obj"),
(t_int)x->x_gui.x_obj.te_xpix, (t_int)x->x_gui.x_obj.te_ypix,
! atom_getsymbol(binbuf_getvec(x->x_gui.x_obj.te_binbuf)),
! x->x_gui.x_w, x->x_gui.x_h,
(*ip1)&IEM_INIT_ARGS_ALL, x->x_snd_flt0_sym1,
srl[0], srl[1], srl[2],
--- 339,343 ----
binbuf_addv(b, "ssiisiiiisssiiiiiiiii", gensym("#X"),gensym("obj"),
(t_int)x->x_gui.x_obj.te_xpix, (t_int)x->x_gui.x_obj.te_ypix,
! gensym("sdl"), x->x_gui.x_w, x->x_gui.x_h,
(*ip1)&IEM_INIT_ARGS_ALL, x->x_snd_flt0_sym1,
srl[0], srl[1], srl[2],
***************
*** 608,611 ****
--- 606,635 ----
}
+ static void sym_dial_add(t_sym_dial *x, t_float findex, t_symbol *name)
+ {
+ int i = (int)findex;
+
+ if(i < 0)
+ i = 0;
+ else if(i >= x->x_max_ac)
+ {
+ x->x_syms = (t_symbol **)t_resizebytes(x->x_syms, x->x_max_ac * sizeof(t_symbol *),
+ x->x_max_ac * (2*sizeof(t_symbol *)));
+ x->x_max_ac *= 2;
+ }
+ if(i >= x->x_ac)
+ {
+ t_symbol *default_sym=gensym("no_entry");
+ int j;
+
+ for(j=x->x_ac; j<i; j++)
+ x->x_syms[j] = default_sym;
+ x->x_ac++;
+ }
+ x->x_syms[i] = gensym(name->s_name);
+ if(i == x->x_index)
+ (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_UPDATE);
+ }
+
/*static void sym_dial_list(t_sym_dial *x, t_symbol *s, int ac, t_atom *av)
{
***************
*** 911,914 ****
--- 935,939 ----
class_addmethod(sym_dial_class, (t_method)sym_dial_init, gensym("init"), A_FLOAT, 0);
class_addmethod(sym_dial_class, (t_method)sym_dial_set_item_name, gensym("set_item_name"), A_SYMBOL, A_FLOAT, 0);
+ class_addmethod(sym_dial_class, (t_method)sym_dial_add, gensym("add"), A_FLOAT, A_SYMBOL, 0);
// if(!iemgui_key_sym2)
// iemgui_key_sym2 = gensym("#keyname");