diff options
author | Guenter Geiger <ggeiger@users.sourceforge.net> | 2003-06-12 12:33:50 +0000 |
---|---|---|
committer | Guenter Geiger <ggeiger@users.sourceforge.net> | 2003-06-12 12:33:50 +0000 |
commit | ddbaa86f0063473a995caa2435e0cae955385f61 (patch) | |
tree | f53279e1936e62487ce9e25cfa929b9d513096c3 /gui | |
parent | 2f385d0e87ef427782fa82f240821dc30ece57da (diff) |
slider: added bang message, button width ajustment (still wrong)
svn path=/trunk/externals/ggee/; revision=697
Diffstat (limited to 'gui')
-rw-r--r-- | gui/button.c | 9 | ||||
-rw-r--r-- | gui/fatom.h | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gui/button.c b/gui/button.c index 311f49c..c658fcd 100644 --- a/gui/button.c +++ b/gui/button.c @@ -61,14 +61,14 @@ static void draw_inlets(t_button *x, t_glist *glist, int firsttime, int nin, int if (firsttime) sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %xi%d\n", glist_getcanvas(glist), - onset, text_ypix(&x->x_obj, glist)-2, - onset + IOWIDTH, text_ypix(&x->x_obj, glist)-1, + onset, text_ypix(&x->x_obj, glist), + onset + IOWIDTH, text_ypix(&x->x_obj, glist)+5, x, i); else sys_vgui(".x%x.c coords %xi%d %d %d %d %d\n", glist_getcanvas(glist), x, i, - onset, text_ypix(&x->x_obj, glist)-2, - onset + IOWIDTH, text_ypix(&x->x_obj, glist)-1); + onset, text_ypix(&x->x_obj, glist), + onset + IOWIDTH, text_ypix(&x->x_obj, glist)+5); } DEBUG(post("draw inlet end");) @@ -108,6 +108,7 @@ static void create_widget(t_button *x, t_glist *glist) sys_vgui("button .x%x.c.s%x \ -height %d \ + -font -text \"%s\" \ -command button_cb%x\n",canvas,x, x->x_height,text, diff --git a/gui/fatom.h b/gui/fatom.h index 6cba41c..8c0854e 100644 --- a/gui/fatom.h +++ b/gui/fatom.h @@ -334,6 +334,11 @@ static void fatom_float(t_fatom* x,t_floatarg f) outlet_float(x->x_obj.ob_outlet,f); } +static void fatom_bang(t_fatom* x,t_floatarg f) +{ + outlet_float(x->x_obj.ob_outlet,x->x_val); +} + static void fatom_f(t_fatom* x,t_floatarg f) { x->x_val = f; @@ -396,6 +401,7 @@ void fatom_setup_common(t_class* class) { class_addfloat(class, (t_method)fatom_float); + class_addbang(class, (t_method)fatom_bang); class_addmethod(class, (t_method)fatom_f, gensym("f"), A_FLOAT, 0); |