Esempio n. 1
0
void iemgui_receive(t_iemgui *x, t_symbol *s)
{
    t_symbol *rcv;
    if (s == &s_) s = s_empty; //tb: fix for empty label
    int oldsndrcvable=0;
    if(iemgui_has_rcv(x)) oldsndrcvable += IEM_GUI_OLD_RCV_FLAG;
    if(iemgui_has_snd(x)) oldsndrcvable += IEM_GUI_OLD_SND_FLAG;

    rcv = iemgui_raute2dollar(s);
    x->x_rcv_unexpanded = rcv;
    rcv = canvas_realizedollar(x->x_glist, rcv);
    if(s!=s_empty)
    {
        if(rcv!=x->x_rcv)
        {
            if(iemgui_has_rcv(x))
                pd_unbind((t_pd *)x, x->x_rcv);
            x->x_rcv = rcv;
            pd_bind((t_pd *)x, x->x_rcv);
        }
    }
    else if(s==s_empty && iemgui_has_rcv(x))
    {
        pd_unbind((t_pd *)x, x->x_rcv);
        x->x_rcv = rcv;
    }
    iemgui_verify_snd_ne_rcv(x);
    iemgui_draw_io(x, oldsndrcvable);
}
Esempio n. 2
0
static void *iem_event_new(t_symbol *s, int argc, t_atom *argv)
{
  t_iem_event *x = (t_iem_event *)pd_new(iem_event_class);
  t_int w=32, h=32;
  
  x->x_gui.x_snd = gensym("empty");
  x->x_gui.x_rcv = gensym("empty");
  x->x_gui.x_lab = gensym("empty");
  x->x_gui.x_fsf.x_font_style = 0;
  if((argc >= 6)&&IS_A_FLOAT(argv,0)&&IS_A_FLOAT(argv,1)
    &&IS_A_FLOAT(argv,2)&&IS_A_FLOAT(argv,3)
    &&(IS_A_SYMBOL(argv,4)||IS_A_FLOAT(argv,4))
    &&(IS_A_SYMBOL(argv,5)||IS_A_FLOAT(argv,5)))
  {
    w = (int)atom_getintarg(0, argc, argv);
    h = (int)atom_getintarg(1, argc, argv);
    iem_inttosymargs(&x->x_gui.x_isa, atom_getintarg(2, argc, argv));
    iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(3, argc, argv));
    iemgui_new_getnames(&x->x_gui, 4, argv);
  }
  else if((argc >= 2)&&IS_A_FLOAT(argv,0)&&IS_A_FLOAT(argv,1))
  {
    w = (int)atom_getintarg(0, argc, argv);
    h = (int)atom_getintarg(1, argc, argv);
  }
  x->x_gui.x_draw = (t_iemfunptr)iem_event_draw;
  x->x_gui.x_fsf.x_snd_able = 1;
  x->x_gui.x_fsf.x_rcv_able = 1;
  x->x_gui.x_glist = (t_glist *)canvas_getcurrent();
  if(!strcmp(x->x_gui.x_snd->s_name, "empty"))
    x->x_gui.x_fsf.x_snd_able = 0;
  if(!strcmp(x->x_gui.x_rcv->s_name, "empty"))
    x->x_gui.x_fsf.x_rcv_able = 0;
  if(x->x_gui.x_fsf.x_rcv_able)
    pd_bind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv);
  if(w < 4)
    w = 4;
  x->x_gui.x_w = w;
  if(h < 4)
    h = 4;
  x->x_gui.x_h = h;
  iemgui_verify_snd_ne_rcv(&x->x_gui);
  outlet_new(&x->x_gui.x_obj, &s_list);
  x->x_mouse_shft_alt = gensym("mouse_shft_alt");
  x->x_dragg_x_y = gensym("dragg_x_y");
  x->x_key = gensym("key");
  x->x_move_x_y = gensym("move_x_y");
  x->x_x = 0;
  x->x_y = 0;
  x->x_doit = 0;
  return (x);
}
Esempio n. 3
0
void iemgui_send(t_iemgui *x, t_symbol *s)
{
    t_symbol *snd;
    if (s == &s_) s = s_empty; //tb: fix for empty label
    int oldsndrcvable=0;
    if(iemgui_has_rcv(x)) oldsndrcvable += IEM_GUI_OLD_RCV_FLAG;
    if(iemgui_has_snd(x)) oldsndrcvable += IEM_GUI_OLD_SND_FLAG;

    snd = iemgui_raute2dollar(s);
    x->x_snd_unexpanded = snd;
    x->x_snd = snd = canvas_realizedollar(x->x_glist, snd);
    iemgui_verify_snd_ne_rcv(x);
    iemgui_draw_io(x, oldsndrcvable);
}
Esempio n. 4
0
int iemgui_dialog(t_iemgui *x, int argc, t_atom *argv)
{
    t_symbol *srl[3];
    x->x_loadinit = !!atom_getintarg(5, argc, argv);
    srl[0] = iemgui_getfloatsymarg(7,argc,argv);
    srl[1] = iemgui_getfloatsymarg(8,argc,argv);
    srl[2] = iemgui_getfloatsymarg(9,argc,argv);
    x->x_ldx = atom_getintarg(10, argc, argv);
    x->x_ldy = atom_getintarg(11, argc, argv);
    int f = atom_getintarg(12, argc, argv);
    x->x_fontsize = maxi(atom_getintarg(13, argc, argv),4);
    x->x_bcol = atom_getintarg(14, argc, argv) & 0xffffff;
    x->x_fcol = atom_getintarg(15, argc, argv) & 0xffffff;
    x->x_lcol = atom_getintarg(16, argc, argv) & 0xffffff;
    int oldsndrcvable=0;
    if(iemgui_has_rcv(x)) oldsndrcvable |= IEM_GUI_OLD_RCV_FLAG;
    if(iemgui_has_snd(x)) oldsndrcvable |= IEM_GUI_OLD_SND_FLAG;
    iemgui_all_raute2dollar(srl);

    // replace ascii code 11 (\v or vertical tab) with spaces
    // we do this so that the string with spaces can survive argc,argv
    // conversion when coming from dialog side of things where it is parsed
    char *c;
    for(c = srl[2]->s_name; c != NULL && *c != '\0'; c++)
    {
        if(*c == '\v')
        {
            *c = ' ';
        }
    }

    x->x_snd_unexpanded=srl[0]; srl[0]=canvas_realizedollar(x->x_glist, srl[0]);
    x->x_rcv_unexpanded=srl[1]; srl[1]=canvas_realizedollar(x->x_glist, srl[1]);
    x->x_lab_unexpanded=srl[2]; srl[2]=canvas_realizedollar(x->x_glist, srl[2]);
    if(srl[1]!=x->x_rcv)
    {
        if(iemgui_has_rcv(x))
            pd_unbind((t_pd *)x, x->x_rcv);
        x->x_rcv = srl[1];
        pd_bind((t_pd *)x, x->x_rcv);
    }
    x->x_snd = srl[0];
    x->x_lab = srl[2];
    if(f<0 || f>2) f=0;
    x->x_font_style = f;
    iemgui_verify_snd_ne_rcv(x);
    canvas_dirty(x->x_glist, 1);
    return oldsndrcvable;
}
Esempio n. 5
0
static void *iem_image_new(t_symbol *s, int argc, t_atom *argv)
{
    t_iem_image *x = (t_iem_image *)pd_new(iem_image_class);
    t_symbol *gifsym=(t_symbol *)0;
    x->x_gui.x_snd = gensym("empty");
    x->x_gui.x_rcv = gensym("empty");
    x->x_gui.x_lab = gensym("empty");
    x->x_gui.x_fsf.x_font_style = 0;
    if(argc >= 1)
    {
        if(IS_A_SYMBOL(argv,0))
            gifsym = atom_getsymbolarg(0, argc, argv);
        else if(IS_A_FLOAT(argv,0))
            gifsym = (t_symbol *)0;
    }
    else if(argc >= 5)
    {
        if(IS_A_SYMBOL(argv,0))
            gifsym = atom_getsymbolarg(0, argc, argv);
        else if(IS_A_FLOAT(argv,0))
            gifsym = (t_symbol *)0;
        iem_inttosymargs(&x->x_gui.x_isa, atom_getintarg(1, argc, argv));
        iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(2, argc, argv));
        iemgui_new_getnames(&x->x_gui, 3, argv);
    }

    x->x_gui.x_draw = (t_iemfunptr)iem_image_draw;
    x->x_gui.x_fsf.x_snd_able = 1;
    x->x_gui.x_fsf.x_rcv_able = 1;
    x->x_gui.x_glist = (t_glist *)canvas_getcurrent();
    if(!strcmp(x->x_gui.x_snd->s_name, "empty"))
        x->x_gui.x_fsf.x_snd_able = 0;
    if(!strcmp(x->x_gui.x_rcv->s_name, "empty"))
        x->x_gui.x_fsf.x_rcv_able = 0;
    if(x->x_gui.x_fsf.x_rcv_able)
        pd_bind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv);
    x->x_gui.x_w = 100;
    x->x_gui.x_h = 60;
    x->x_gifsym = gifsym;
    x->x_have_image=0;
    x->x_gui.x_fsf.x_selected = 0;
    iemgui_verify_snd_ne_rcv(&x->x_gui);
    outlet_new(&x->x_gui.x_obj, &s_list);
    return(x);
}
Esempio n. 6
0
static void *iem_event_new(t_symbol *s, int argc, t_atom *argv)
{
  t_iem_event *x = (t_iem_event *)pd_new(iem_event_class);
  t_int w=32, h=32;
  t_int iinit=0, ifstyle=0;
  t_iem_init_symargs *init=(t_iem_init_symargs *)(&iinit);
  t_iem_fstyle_flags *fstyle=(t_iem_fstyle_flags *)(&ifstyle);
  t_symbol *srl[3];
  char str[144];
  
  x->x_gui.x_snd = gensym("empty");
  x->x_gui.x_rcv = gensym("empty");
  x->x_gui.x_lab = gensym("empty");
  srl[0] = gensym("empty");
  srl[1] = gensym("empty");
  srl[2] = gensym("empty");
  x->x_gui.x_fsf.x_font_style = 0;
  if((argc >= 6)&&IS_A_FLOAT(argv,0)&&IS_A_FLOAT(argv,1)
    &&IS_A_FLOAT(argv,2)&&IS_A_FLOAT(argv,3)
    &&(IS_A_SYMBOL(argv,4)||IS_A_FLOAT(argv,4))
    &&(IS_A_SYMBOL(argv,5)||IS_A_FLOAT(argv,5)))
  {
    w = (int)atom_getintarg(0, argc, argv);
    h = (int)atom_getintarg(1, argc, argv);
    iinit = (int)atom_getintarg(2, argc, argv);
    ifstyle = (int)atom_getintarg(3, argc, argv);
    if(IS_A_SYMBOL(argv,4))
      srl[0] = atom_getsymbolarg(4, argc, argv);
    else if(IS_A_FLOAT(argv,4))
    {
      sprintf(str, "%d", (int)atom_getintarg(4, argc, argv));
      srl[0] = gensym(str);
    }
    if(IS_A_SYMBOL(argv,5))
      srl[1] = atom_getsymbolarg(5, argc, argv);
    else if(IS_A_FLOAT(argv,5))
    {
      sprintf(str, "%d", (int)atom_getintarg(5, argc, argv));
      srl[1] = gensym(str);
    }
  }
  else if((argc >= 2)&&IS_A_FLOAT(argv,0)&&IS_A_FLOAT(argv,1))
  {
    w = (int)atom_getintarg(0, argc, argv);
    h = (int)atom_getintarg(1, argc, argv);
  }
  iinit &= IEM_INIT_ARGS_ALL;
  ifstyle &= IEM_FSTYLE_FLAGS_ALL;
  
  x->x_gui.x_draw = (t_iemfunptr)iem_event_draw;
  x->x_gui.x_fsf.x_snd_able = 1;
  x->x_gui.x_fsf.x_rcv_able = 1;
  x->x_gui.x_glist = (t_glist *)canvas_getcurrent();
  fstyle->x_snd_able = 1;
  fstyle->x_rcv_able = 1;
  if(!strcmp(srl[0]->s_name, "empty"))
    fstyle->x_snd_able = 0;
  if(!strcmp(srl[1]->s_name, "empty"))
    fstyle->x_rcv_able = 0;
  x->x_gui.x_unique_num = 0;
  x->x_gui.x_fsf = *fstyle;
  x->x_gui.x_isa = *init;
  iemgui_first_dollararg2sym(&x->x_gui, srl);
  if(x->x_gui.x_fsf.x_rcv_able)
    pd_bind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv);
  if(w < 4)
    w = 4;
  x->x_gui.x_w = w;
  if(h < 4)
    h = 4;
  x->x_gui.x_h = h;
  iemgui_verify_snd_ne_rcv(&x->x_gui);
  outlet_new(&x->x_gui.x_obj, &s_list);
  x->x_mouse_shft_alt = gensym("mouse_shft_alt");
  x->x_dragg_x_y = gensym("dragg_x_y");
  x->x_key = gensym("key");
  x->x_move_x_y = gensym("move_x_y");
  x->x_x = 0;
  x->x_y = 0;
  x->x_doit = 0;
  return (x);
}
Esempio n. 7
0
static void *iem_vu_new(t_symbol *s, int argc, t_atom *argv)
{
  t_iem_vu *x = (t_iem_vu *)pd_new(iem_vu_class);
  int bflcol[]={-66577, -1, -1};
  t_symbol *srl[3];
  int w=IEM_GUI_DEFAULTSIZE;
  int ldx=-1, ldy=-8, f=0, fs=8, scale=1;
  int iinit=0, ifstyle=0;
  int ftbreak=IEM_BNG_DEFAULTBREAKFLASHTIME, fthold=IEM_BNG_DEFAULTHOLDFLASHTIME;
  t_iem_init_symargs *init=(t_iem_init_symargs *)(&iinit);
  t_iem_fstyle_flags *fstyle=(t_iem_fstyle_flags *)(&ifstyle);
  char str[144];
  
  srl[0] = gensym("empty");
  srl[1] = gensym("empty");
  srl[2] = gensym("empty");
  
  if((argc >= 11)&&IS_A_FLOAT(argv,0)&&IS_A_FLOAT(argv,1)
    &&(IS_A_SYMBOL(argv,2)||IS_A_FLOAT(argv,2))
    &&(IS_A_SYMBOL(argv,3)||IS_A_FLOAT(argv,3))
    &&IS_A_FLOAT(argv,4)&&IS_A_FLOAT(argv,5)
    &&IS_A_FLOAT(argv,6)&&IS_A_FLOAT(argv,7)
    &&IS_A_FLOAT(argv,8)&&IS_A_FLOAT(argv,9)&&IS_A_FLOAT(argv,10))
  {
    w = (int)atom_getintarg(0, argc, argv);
    if(IS_A_SYMBOL(argv,2))
      srl[1] = atom_getsymbolarg(2, argc, argv);
    else if(IS_A_FLOAT(argv,2))
    {
      sprintf(str, "%d", (int)atom_getintarg(2, argc, argv));
      srl[1] = gensym(str);
    }
    if(IS_A_SYMBOL(argv,3))
      srl[2] = atom_getsymbolarg(3, argc, argv);
    else if(IS_A_FLOAT(argv,3))
    {
      sprintf(str, "%d", (int)atom_getintarg(3, argc, argv));
      srl[2] = gensym(str);
    }
    ldx = (int)atom_getintarg(4, argc, argv);
    ldy = (int)atom_getintarg(5, argc, argv);
    ifstyle = (int)atom_getintarg(6, argc, argv);
    fs = (int)atom_getintarg(7, argc, argv);
    bflcol[0] = (int)atom_getintarg(8, argc, argv);
    bflcol[2] = (int)atom_getintarg(9, argc, argv);
    scale = (int)atom_getintarg(10, argc, argv);
  }
  if((argc == 12)&&IS_A_FLOAT(argv,11))
    iinit = (int)atom_getintarg(11, argc, argv);
  x->x_gui.x_draw = (t_iemfunptr)iem_vu_draw;
  iinit &= IEM_INIT_ARGS_ALL;
  ifstyle &= IEM_FSTYLE_FLAGS_ALL;
  
  fstyle->x_snd_able = 0;
  fstyle->x_rcv_able = 1;
  x->x_gui.x_glist = (t_glist *)canvas_getcurrent();
  x->x_gui.x_isa = *init;
  if(!strcmp(srl[1]->s_name, "empty")) fstyle->x_rcv_able = 0;
  x->x_gui.x_unique_num = 0;
  if(fstyle->x_font_style == 1)
    strcpy(x->x_gui.x_font, "helvetica");
  else if(fstyle->x_font_style == 2)
    strcpy(x->x_gui.x_font, "times");
  else
  { 
    fstyle->x_font_style = 0;
    strcpy(x->x_gui.x_font, "courier");
  }
  x->x_gui.x_fsf = *fstyle;
  iemgui_first_dollararg2sym(&x->x_gui, srl);
  if(x->x_gui.x_fsf.x_rcv_able)
    pd_bind(&x->x_gui.x_obj.ob_pd, srl[1]);
  x->x_gui.x_snd = srl[0];
  x->x_gui.x_rcv = srl[1];
  x->x_gui.x_lab = srl[2];
  x->x_gui.x_ldx = ldx;
  x->x_gui.x_ldy = ldy;
  
  if(fs < 4)
    fs = 4;
  x->x_gui.x_fontsize = fs;
  //  x->x_gui.x_w = iem_vu_clip_width(w)-1;
  x->x_gui.x_w = iem_vu_clip_width(w+1);
  x->x_old_width = x->x_gui.x_w;
  x->x_gui.x_h = 120;
  
  iemgui_all_colfromload(&x->x_gui, bflcol);
  if(scale != 0)
    scale = 1;
  x->x_scale = scale;
  x->x_peak = 0;
  x->x_rms = 0;
  x->x_fp = -101.0;
  x->x_fr = -101.0;
  iemgui_verify_snd_ne_rcv(&x->x_gui);
  inlet_new(&x->x_gui.x_obj, &x->x_gui.x_obj.ob_pd, &s_float, gensym("ft1"));
  x->x_out_rms = outlet_new(&x->x_gui.x_obj, &s_float);
  x->x_out_peak = outlet_new(&x->x_gui.x_obj, &s_float);
  x->x_scale_w = 14;
  x->x_scale_h = 129;
  strcpy(x->x_scale_gif, my_iemgui_black_vscale_gif);
  x->x_gui.x_fsf.x_selected = 0;
  return (x);
}
Esempio n. 8
0
static void *iem_vu_new(t_symbol *s, int argc, t_atom *argv)
{
  t_iem_vu *x = (t_iem_vu *)pd_new(iem_vu_class);
  int bflcol[]={-66577, -1, -1};
  int w=IEM_GUI_DEFAULTSIZE;
  int ldx=-1, ldy=-8, f=0, fs=8, scale=1;
  int ftbreak=IEM_BNG_DEFAULTBREAKFLASHTIME, fthold=IEM_BNG_DEFAULTHOLDFLASHTIME;
  char str[144];
  
  iem_inttosymargs(&x->x_gui.x_isa, 0);
  iem_inttofstyle(&x->x_gui.x_fsf, 0);
  
  if((argc >= 11)&&IS_A_FLOAT(argv,0)&&IS_A_FLOAT(argv,1)
    &&(IS_A_SYMBOL(argv,2)||IS_A_FLOAT(argv,2))
    &&(IS_A_SYMBOL(argv,3)||IS_A_FLOAT(argv,3))
    &&IS_A_FLOAT(argv,4)&&IS_A_FLOAT(argv,5)
    &&IS_A_FLOAT(argv,6)&&IS_A_FLOAT(argv,7)
    &&IS_A_FLOAT(argv,8)&&IS_A_FLOAT(argv,9)&&IS_A_FLOAT(argv,10))
  {
    w = (int)atom_getintarg(0, argc, argv);
    iemgui_new_getnames(&x->x_gui, 1, argv);
    ldx = (int)atom_getintarg(4, argc, argv);
    ldy = (int)atom_getintarg(5, argc, argv);
    iem_inttofstyle(&x->x_gui.x_fsf, atom_getintarg(6, argc, argv));
    fs = (int)atom_getintarg(7, argc, argv);
    bflcol[0] = (int)atom_getintarg(8, argc, argv);
    bflcol[2] = (int)atom_getintarg(9, argc, argv);
    scale = (int)atom_getintarg(10, argc, argv);
  }
  else iemgui_new_getnames(&x->x_gui, 1, 0);
  if((argc == 12)&&IS_A_FLOAT(argv,11))
    iem_inttosymargs(&x->x_gui.x_isa, atom_getintarg(11, argc, argv));
  x->x_gui.x_draw = (t_iemfunptr)iem_vu_draw;
  
  x->x_gui.x_fsf.x_snd_able = 0;
  x->x_gui.x_fsf.x_rcv_able = 1;
  x->x_gui.x_glist = (t_glist *)canvas_getcurrent();
  if (!strcmp(x->x_gui.x_rcv->s_name, "empty"))
    x->x_gui.x_fsf.x_rcv_able = 0;
  if (x->x_gui.x_fsf.x_font_style == 1)
    strcpy(x->x_gui.x_font, "helvetica");
  else if(x->x_gui.x_fsf.x_font_style == 2)
    strcpy(x->x_gui.x_font, "times");
  else { x->x_gui.x_fsf.x_font_style = 0;
  strcpy(x->x_gui.x_font, "courier"); }
  if(x->x_gui.x_fsf.x_rcv_able)
    pd_bind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv);
  x->x_gui.x_ldx = ldx;
  x->x_gui.x_ldy = ldy;
  
  if(fs < 4)
    fs = 4;
  x->x_gui.x_fontsize = fs;
  //  x->x_gui.x_w = iem_vu_clip_width(w)-1;
  x->x_gui.x_w = iem_vu_clip_width(w+1);
  x->x_old_width = x->x_gui.x_w;
  x->x_gui.x_h = 120;
  
  iemgui_all_colfromload(&x->x_gui, bflcol);
  if(scale != 0)
    scale = 1;
  x->x_scale = scale;
  x->x_peak = 0;
  x->x_rms = 0;
  x->x_fp = -101.0;
  x->x_fr = -101.0;
  iemgui_verify_snd_ne_rcv(&x->x_gui);
  inlet_new(&x->x_gui.x_obj, &x->x_gui.x_obj.ob_pd, &s_float, gensym("ft1"));
  x->x_out_rms = outlet_new(&x->x_gui.x_obj, &s_float);
  x->x_out_peak = outlet_new(&x->x_gui.x_obj, &s_float);
  x->x_scale_w = 14;
  x->x_scale_h = 129;
  strcpy(x->x_scale_gif, my_iemgui_black_vscale_gif);
  x->x_gui.x_fsf.x_selected = 0;
  return (x);
}
Esempio n. 9
0
static void *iem_image_new(t_symbol *s, int argc, t_atom *argv)
{
    t_iem_image *x = (t_iem_image *)pd_new(iem_image_class);
    t_symbol *gifsym=(t_symbol *)0;
    t_int iinit=0, ifstyle=0;
    t_iem_init_symargs *init=(t_iem_init_symargs *)(&iinit);
    t_iem_fstyle_flags *fstyle=(t_iem_fstyle_flags *)(&ifstyle);
    t_symbol *srl[3];
    char str[144];

    x->x_gui.x_snd = gensym("empty");
    x->x_gui.x_rcv = gensym("empty");
    x->x_gui.x_lab = gensym("empty");
    srl[0] = gensym("empty");
    srl[1] = gensym("empty");
    srl[2] = gensym("empty");
    x->x_gui.x_fsf.x_font_style = 0;
    if(argc >= 1)
    {
        if(IS_A_SYMBOL(argv,0))
            gifsym = atom_getsymbolarg(0, argc, argv);
        else if(IS_A_FLOAT(argv,0))
            gifsym = (t_symbol *)0;
    }
    else if(argc >= 5)
    {
        if(IS_A_SYMBOL(argv,0))
            gifsym = atom_getsymbolarg(0, argc, argv);
        else if(IS_A_FLOAT(argv,0))
            gifsym = (t_symbol *)0;
        iinit = (int)atom_getintarg(1, argc, argv);
        ifstyle = (int)atom_getintarg(2, argc, argv);
        if(IS_A_SYMBOL(argv, 3))
            srl[0] = atom_getsymbolarg(3, argc, argv);
        else if(IS_A_FLOAT(argv,3))
        {
            sprintf(str, "%d", (int)atom_getintarg(3, argc, argv));
            srl[0] = gensym(str);
        }
        if(IS_A_SYMBOL(argv,4))
            srl[1] = atom_getsymbolarg(4, argc, argv);
        else if(IS_A_FLOAT(argv,4))
        {
            sprintf(str, "%d", (int)atom_getintarg(4, argc, argv));
            srl[1] = gensym(str);
        }
    }

    iinit &= IEM_INIT_ARGS_ALL;
    ifstyle &= IEM_FSTYLE_FLAGS_ALL;
    x->x_gui.x_draw = (t_iemfunptr)iem_image_draw;
    x->x_gui.x_fsf.x_snd_able = 1;
    x->x_gui.x_fsf.x_rcv_able = 1;
    x->x_gui.x_glist = (t_glist *)canvas_getcurrent();
    fstyle->x_snd_able = 1;
    fstyle->x_rcv_able = 1;
    if(!strcmp(srl[0]->s_name, "empty"))
        fstyle->x_snd_able = 0;
    if(!strcmp(srl[1]->s_name, "empty"))
        fstyle->x_rcv_able = 0;
    x->x_gui.x_unique_num = 0;
    x->x_gui.x_fsf = *fstyle;
    x->x_gui.x_isa = *init;
    iemgui_first_dollararg2sym(&x->x_gui, sr);
    if(x->x_gui.x_fsf.x_rcv_able)
        pd_bind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv);
    x->x_gui.x_w = 100;
    x->x_gui.x_h = 60;
    x->x_gifsym = gifsym;
    x->x_gui.x_fsf.x_selected = 0;
    iemgui_verify_snd_ne_rcv(&x->x_gui);
    outlet_new(&x->x_gui.x_obj, &s_list);
    return(x);
}