From bf3b411929e54fc69aaee784b8b1572a12621f4a Mon Sep 17 00:00:00 2001 From: Guenter Geiger Date: Fri, 6 Feb 2004 17:03:34 +0000 Subject: fixed widgetbehaviour for MS compiler svn path=/trunk/externals/ggee/; revision=1314 --- gui/fatom.h | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'gui/fatom.h') diff --git a/gui/fatom.h b/gui/fatom.h index 40d362a..8b2c457 100644 --- a/gui/fatom.h +++ b/gui/fatom.h @@ -93,7 +93,7 @@ static void create_widget(t_fatom *x, t_glist *glist) if (!strcmp(x->x_type->s_name,"vslider")) { x->x_rect_width = x->x_width+15; - x->x_rect_height = x->x_max-x->x_min+24; + x->x_rect_height = x->x_max-x->x_min+26; sys_vgui("scale .x%x.c.s%x \ -sliderlength 10 \ @@ -312,19 +312,9 @@ static void fatom_vis(t_gobj *z, t_glist *glist, int vis) static void fatom_save(t_gobj *z, t_binbuf *b); -t_widgetbehavior fatom_widgetbehavior = { - w_getrectfn: fatom_getrect, - w_displacefn: fatom_displace, - w_selectfn: fatom_select, - w_activatefn: fatom_activate, - w_deletefn: fatom_delete, - w_visfn: fatom_vis, -#if PD_MINOR_VERSION < 37 - w_savefn: fatom_save, - w_propertiesfn: NULL, -#endif - w_clickfn: NULL, -}; +t_widgetbehavior fatom_widgetbehavior; + + void fatom_size(t_fatom* x,t_floatarg w,t_floatarg h) { @@ -420,6 +410,18 @@ static void *fatom_new(t_fatom* x,t_floatarg max, t_floatarg min, t_floatarg h,t void fatom_setup_common(t_class* class) { + fatom_widgetbehavior.w_getrectfn = fatom_getrect; + fatom_widgetbehavior.w_displacefn = fatom_displace; + fatom_widgetbehavior.w_selectfn = fatom_select; + fatom_widgetbehavior.w_activatefn = fatom_activate; + fatom_widgetbehavior.w_deletefn = fatom_delete; + fatom_widgetbehavior.w_visfn = fatom_vis; +#if PD_MINOR_VERSION < 37 + fatom_widgetbehavior.w_savefn = fatom_save; + fatom_widgetbehavior.w_propertiesfn = NULL, +#endif + fatom_widgetbehavior.w_clickfn = NULL, + class_addfloat(class, (t_method)fatom_float); class_addbang(class, (t_method)fatom_bang); class_addmethod(class, (t_method)fatom_f, gensym("f"), -- cgit v1.2.1