Update of /cvsroot/pure-data/externals/ggee/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27493
Modified Files:
button.c fatom.c fatom.h ticker.c toddle.c
Log Message:
Finally fixed the GOP behaviour
Index: fatom.h
===================================================================
RCS file: /cvsroot/pure-data/externals/ggee/gui/fatom.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** fatom.h 6 Feb 2004 17:03:34 -0000 1.12
--- fatom.h 25 Jul 2004 15:01:14 -0000 1.13
***************
*** 22,25 ****
--- 22,27 ----
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_symbol* x_color;
+ t_symbol* x_bgcolor;
} t_fatom;
***************
*** 104,107 ****
--- 106,112 ----
-from %d -to %d \
-width %d \
+ -bg %s \
+ -activebackground %s \
+ -troughcolor %s \
-command fatom_cb%x\n",canvas,x,
x->x_max-x->x_min+14,
***************
*** 109,112 ****
--- 114,120 ----
x->x_min,
x->x_width,
+ x->x_color->s_name,
+ x->x_color->s_name,
+ x->x_bgcolor->s_name,
x);
} else if (!strcmp(x->x_type->s_name,"hslider")) {
***************
*** 122,125 ****
--- 130,136 ----
-from %d -to %d \
-width %d \
+ -bg %s \
+ -activebackground %s \
+ -troughcolor %s \
-command fatom_cb%x\n",canvas,x,
x->x_max-x->x_min+14,
***************
*** 127,130 ****
--- 138,144 ----
x->x_max,
x->x_width,
+ x->x_color->s_name,
+ x->x_color->s_name,
+ x->x_bgcolor->s_name,
x);
} else if (!strcmp(x->x_type->s_name,"checkbutton")) {
***************
*** 132,136 ****
x->x_rect_height = 28;
sys_vgui("checkbutton .x%x.c.s%x \
! -command { fatom_cb%x $fatom_val%x} -variable fatom_val%x -text \"%s\"\n",canvas,x,x,x,x,x->x_text->s_name);
} else if (!strcmp(x->x_type->s_name,"hradio")) {
int i;
--- 146,156 ----
x->x_rect_height = 28;
sys_vgui("checkbutton .x%x.c.s%x \
! -command { fatom_cb%x $fatom_val%x} -variable fatom_val%x -text \"%s\" \
! -bg %s \
! -activebackground %s \
! \n",canvas,x,x,x,x,
! x->x_text->s_name,
! x->x_color->s_name,
! x->x_bgcolor->s_name);
} else if (!strcmp(x->x_type->s_name,"hradio")) {
int i;
***************
*** 179,188 ****
static void fatom_drawme(t_fatom *x, t_glist *glist, int firsttime)
{
! t_canvas *canvas=x->x_glist;//glist_getcanvas(glist);
DEBUG(post("drawme %d",firsttime);)
if (firsttime) {
DEBUG(post("glist %x canvas %x",x->x_glist,canvas));
create_widget(x,glist);
!
sys_vgui(".x%x.c create window %d %d -anchor nw -window .x%x.c.s%x -tags %xS\n",
canvas,text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist)+2,x->x_glist,x,x);
--- 199,208 ----
static void fatom_drawme(t_fatom *x, t_glist *glist, int firsttime)
{
! t_canvas *canvas=glist_getcanvas(glist);// x->x_glist;//glist_getcanvas(glist);
DEBUG(post("drawme %d",firsttime);)
if (firsttime) {
DEBUG(post("glist %x canvas %x",x->x_glist,canvas));
create_widget(x,glist);
! x->x_glist = canvas;
sys_vgui(".x%x.c create window %d %d -anchor nw -window .x%x.c.s%x -tags %xS\n",
canvas,text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist)+2,x->x_glist,x,x);
***************
*** 391,395 ****
if (h) x->x_width = h;
else x->x_width = 15;
!
/* bind to a symbol for slider callback (later make this based on the
--- 411,418 ----
if (h) x->x_width = h;
else x->x_width = 15;
!
!
! x->x_color = gensym("grey");
! x->x_bgcolor = gensym("grey");
/* bind to a symbol for slider callback (later make this based on the
Index: toddle.c
===================================================================
RCS file: /cvsroot/pure-data/externals/ggee/gui/toddle.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** toddle.c 21 Jul 2003 15:50:49 -0000 1.3
--- toddle.c 25 Jul 2004 15:01:14 -0000 1.4
***************
*** 324,332 ****
toddle_widgetbehavior.w_deletefn = toddle_delete;
toddle_widgetbehavior.w_visfn = toddle_vis;
- #if (PD_VERSION_MINOR > 31)
toddle_widgetbehavior.w_clickfn = toddle_newclick;
toddle_widgetbehavior.w_propertiesfn = NULL;
- #endif
toddle_widgetbehavior.w_savefn = toddle_save;
}
--- 324,337 ----
toddle_widgetbehavior.w_deletefn = toddle_delete;
toddle_widgetbehavior.w_visfn = toddle_vis;
toddle_widgetbehavior.w_clickfn = toddle_newclick;
+ #if (PD_MINOR_VERSION < 37)
toddle_widgetbehavior.w_propertiesfn = NULL;
toddle_widgetbehavior.w_savefn = toddle_save;
+ #endif
+
+ #if PD_MINOR_VERSION >= 37
+ class_setsavefn(toddle_class,&toddle_save);
+ #endif
+
}
Index: ticker.c
===================================================================
RCS file: /cvsroot/pure-data/externals/ggee/gui/ticker.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** ticker.c 6 Feb 2004 17:03:34 -0000 1.7
--- ticker.c 25 Jul 2004 15:01:14 -0000 1.8
***************
*** 21,25 ****
binbuf_addv(b, "ssiiss", gensym("#X"),gensym("obj"),
x->x_obj.te_xpix, x->x_obj.te_ypix ,
! gensym("ticker"),x->x_text);
binbuf_addv(b, ";");
}
--- 21,25 ----
binbuf_addv(b, "ssiiss", gensym("#X"),gensym("obj"),
x->x_obj.te_xpix, x->x_obj.te_ypix ,
! gensym("ticker"),x->x_text,x->x_max,x->x_width);
binbuf_addv(b, ";");
}
Index: button.c
===================================================================
RCS file: /cvsroot/pure-data/externals/ggee/gui/button.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** button.c 6 Feb 2004 17:03:34 -0000 1.13
--- button.c 25 Jul 2004 15:01:14 -0000 1.14
***************
*** 128,135 ****
if (firsttime) {
DEBUG(post("glist %x canvas %x",x->x_glist,canvas);)
! if (x->x_glist != canvas) {
create_widget(x,glist);
x->x_glist = canvas;
! }
sys_vgui(".x%x.c create window %d %d -anchor nw -window .x%x.c.s%x -tags %xS\n",
canvas,text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist),x->x_glist,x,x);
--- 128,135 ----
if (firsttime) {
DEBUG(post("glist %x canvas %x",x->x_glist,canvas);)
! // if (x->x_glist != canvas) {
create_widget(x,glist);
x->x_glist = canvas;
! // }
sys_vgui(".x%x.c create window %d %d -anchor nw -window .x%x.c.s%x -tags %xS\n",
canvas,text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist),x->x_glist,x,x);
Index: fatom.c
===================================================================
RCS file: /cvsroot/pure-data/externals/ggee/gui/fatom.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** fatom.c 30 Jul 2002 19:20:23 -0000 1.5
--- fatom.c 25 Jul 2004 15:01:14 -0000 1.6
***************
*** 1,19 ****
#include <m_pd.h>
#include "g_canvas.h"
- #include <ggee.h>
-
- #ifdef NT
- #pragma warning( disable : 4244 )
- #pragma warning( disable : 4305 )
- #endif
-
#include "fatom.h"
-
static t_class *fatom_class;
-
-
-
void fatom_setup() {
post("fatom setup");
--- 1,8 ----