From 28febf2d93a99fbc87dd093fc613790cdc2ff5a9 Mon Sep 17 00:00:00 2001 From: Guenter Geiger Date: Wed, 5 Nov 2003 09:22:51 +0000 Subject: minor code cleanup svn path=/trunk/externals/ggee/; revision=1157 --- gui/fatom.h | 24 ++++++++++++------------ gui/slider.c | 13 ++----------- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/gui/fatom.h b/gui/fatom.h index 82d804f..40d362a 100644 --- a/gui/fatom.h +++ b/gui/fatom.h @@ -9,18 +9,18 @@ typedef struct _fatom { t_object x_obj; - t_atom a_pos; - - t_glist * x_glist; - int x_rect_width; - int x_rect_height; - t_symbol* x_sym; - t_symbol* x_type; - - t_symbol* x_text; - int x_max; - int x_min; - int x_width; + t_atom a_pos; /* the value of the fatom */ + + t_glist * x_glist; /* value of the current canvas, intialized in _new */ + int x_rect_width; /* width of the widget */ + int x_rect_height; /* height of the widget */ + t_symbol* x_sym; /* symbol for receiving callbacks from GUI */ + t_symbol* x_type; /* type of fatom (vslider, hslider, checkbutton) */ + + t_symbol* x_text; /* associated widget text */ + int x_max; /* maximum value of a_pos (x_val) */ + int x_min; /* minimum value of a_pos (x_val) */ + int x_width; /* width of widget (e.g x_rect_height + 15 for hslider, x_rect_width + 15 for slider) */ } t_fatom; /* widget helper functions */ diff --git a/gui/slider.c b/gui/slider.c index 076df57..06dedb9 100755 --- a/gui/slider.c +++ b/gui/slider.c @@ -1,21 +1,12 @@ -#include -#include "g_canvas.h" - -#ifdef NT -#pragma warning( disable : 4244 ) -#pragma warning( disable : 4305 ) -#endif - #include +#include +#include "g_canvas.h" /* for widgetbehaviour */ #include "fatom.h" -/* can we use the normal text save function ?? */ - static t_class *slider_class; static void slider_save(t_gobj *z, t_binbuf *b) { - t_fatom *x = (t_fatom *)z; binbuf_addv(b, "ssiisiii", gensym("#X"),gensym("obj"), -- cgit v1.2.1