Update of /cvsroot/pure-data/externals/ffext/tracker In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13923
Modified Files: tracker.c tracker.h tracker.tk Removed Files: demo1.pd Log Message: new release: added load/save/more options
Index: tracker.tk =================================================================== RCS file: /cvsroot/pure-data/externals/ffext/tracker/tracker.tk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tracker.tk 20 Sep 2007 08:25:26 -0000 1.1 --- tracker.tk 21 Sep 2007 21:42:17 -0000 1.2 *************** *** 1,76 **** proc tracker_apply {id} { # strip "." from the TK id to make a variable name suffix ! set vid [string trimleft $id .] # for each variable, make a local variable to hold its name... ! set var_graph_width [concat graph_width_$vid] ! global $var_graph_width ! set var_graph_height [concat graph_height_$vid] ! global $var_graph_height
! set cmd [concat $id dialog \ ! [eval concat $$var_graph_width] \ ! [eval concat $$var_graph_height] \ ! ;] ! #puts stderr $cmd ! pd $cmd }
proc tracker_cancel {id} { ! set cmd [concat $id cancel ;] ! #puts stderr $cmd ! pd $cmd }
proc tracker_ok {id} { ! tracker_apply $id ! tracker_cancel $id }
! proc pdtk_tracker_dialog {id width height} { ! set vid [string trimleft $id .]
! set var_graph_width [concat graph_width_$vid] ! global $var_graph_width ! set var_graph_height [concat graph_height_$vid] ! global $var_graph_height
! set $var_graph_width $width ! set $var_graph_height $height
! toplevel $id ! wm title $id {tracker} ! wm protocol $id WM_DELETE_WINDOW [concat tracker_cancel $id]
! label $id.label -text {GRID PROPERTIES} ! pack $id.label -side top
! frame $id.buttonframe ! pack $id.buttonframe -side bottom -fill x -pady 2m ! button $id.buttonframe.cancel -text {Cancel}\ ! -command "tracker_cancel $id" ! button $id.buttonframe.apply -text {Apply}\ ! -command "tracker_apply $id" ! button $id.buttonframe.ok -text {OK}\ ! -command "tracker_ok $id" ! pack $id.buttonframe.cancel -side left -expand 1 ! pack $id.buttonframe.apply -side left -expand 1 ! pack $id.buttonframe.ok -side left -expand 1
! frame $id.1rangef ! pack $id.1rangef -side top ! label $id.1rangef.lwidth -text "Width :" ! #entry $id.1rangef.width -textvar $var_graph_width -width 7 ! spinbox $id.1rangef.width -textvariable $var_graph_width -width 7 -from 1 -to 99 -increment 1 ! pack $id.1rangef.lwidth $id.1rangef.width -side left
! frame $id.2rangef ! pack $id.2rangef -side top ! label $id.2rangef.lheight -text "Height :" ! #entry $id.2rangef.height -textvar $var_graph_height -width 7 ! spinbox $id.2rangef.height -textvariable $var_graph_height -width 7 -from 1 -to 99 -increment 1 ! pack $id.2rangef.lheight $id.2rangef.height -side left
! bind $id.1rangef.width <KeyPress-Return> [concat tracker_ok $id] ! bind $id.2rangef.height <KeyPress-Return> [concat tracker_ok $id] ! focus $id.1rangef.width } --- 1,91 ---- proc tracker_apply {id} { # strip "." from the TK id to make a variable name suffix ! set vid [string trimleft $id .] # for each variable, make a local variable to hold its name... ! set var_graph_width [concat graph_width_$vid] ! global $var_graph_width ! set var_graph_height [concat graph_height_$vid] ! global $var_graph_height ! set var_saveflag [concat saveflag_$vid] ! global $var_saveflag
! set cmd [concat $id resize \ ! [eval concat $$var_graph_height] \ ! [eval concat $$var_graph_width] \ ! ;] ! pd $cmd ! ! set cmd [concat $id set_saveflag \ ! [eval concat $$var_saveflag] \ ! ;] ! pd $cmd }
proc tracker_cancel {id} { ! set cmd [concat $id cancel ;] ! #puts stderr $cmd ! pd $cmd }
proc tracker_ok {id} { ! tracker_apply $id ! tracker_cancel $id }
! proc pdtk_tracker_dialog {id width height saveflag} { ! set vid [string trimleft $id .]
! set var_graph_width [concat graph_width_$vid] ! global $var_graph_width ! set var_graph_height [concat graph_height_$vid] ! global $var_graph_height ! set var_saveflag [concat saveflag_$vid] ! global $var_saveflag
! set $var_graph_width $width ! set $var_graph_height $height ! set $var_saveflag $saveflag
! toplevel $id ! wm title $id {tracker} ! wm protocol $id WM_DELETE_WINDOW [concat tracker_cancel $id]
! label $id.label -text {GRID PROPERTIES} ! pack $id.label -side top
! frame $id.buttonframe ! pack $id.buttonframe -side bottom -fill x -pady 2m ! button $id.buttonframe.cancel -text {Cancel}\ ! -command "tracker_cancel $id" ! button $id.buttonframe.apply -text {Apply}\ ! -command "tracker_apply $id" ! button $id.buttonframe.ok -text {OK}\ ! -command "tracker_ok $id" ! pack $id.buttonframe.cancel -side left -expand 1 ! pack $id.buttonframe.apply -side left -expand 1 ! pack $id.buttonframe.ok -side left -expand 1
! frame $id.1rangef ! pack $id.1rangef -side top ! label $id.1rangef.lwidth -text "Width :" ! #entry $id.1rangef.width -textvar $var_graph_width -width 7 ! spinbox $id.1rangef.width -textvariable $var_graph_width -width 7 -from 1 -to 99 -increment 1 ! pack $id.1rangef.lwidth $id.1rangef.width -side left
! frame $id.2rangef ! pack $id.2rangef -side top ! label $id.2rangef.lheight -text "Height :" ! #entry $id.2rangef.height -textvar $var_graph_height -width 7 ! spinbox $id.2rangef.height -textvariable $var_graph_height -width 7 -from 1 -to 99 -increment 1 ! pack $id.2rangef.lheight $id.2rangef.height -side left ! ! frame $id.3rangef ! pack $id.3rangef -side top ! label $id.3rangef.lsaveflag -text "" ! checkbutton $id.3rangef.saveflag -variable $var_saveflag -text "save contents" ! pack $id.3rangef.lsaveflag $id.3rangef.saveflag -side left
! bind $id.1rangef.width <KeyPress-Return> [concat tracker_ok $id] ! bind $id.2rangef.height <KeyPress-Return> [concat tracker_ok $id] ! focus $id.1rangef.width }
--- demo1.pd DELETED ---
Index: tracker.h =================================================================== RCS file: /cvsroot/pure-data/externals/ffext/tracker/tracker.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tracker.h 20 Sep 2007 08:25:26 -0000 1.1 --- tracker.h 21 Sep 2007 21:42:17 -0000 1.2 *************** *** 28,31 **** --- 28,33 ---- t_int x_ndigits; // cell width (+1 of margin added automatically) t_int x_cursor_pos; // visual cursor position (row indicator) + t_int b_cursor; // track cursor? + t_int b_save_data; // save data? char x_buf[MAX_BUF+1]; // edit buffer t_int x_cell_width; // cell width in pixels (auto computed)
Index: tracker.c =================================================================== RCS file: /cvsroot/pure-data/externals/ffext/tracker/tracker.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tracker.c 20 Sep 2007 08:25:26 -0000 1.1 --- tracker.c 21 Sep 2007 21:42:17 -0000 1.2 *************** *** 27,30 **** --- 27,31 ----
#include <stdlib.h> + #include <string.h> #include "tracker.h"
*************** *** 95,99 **** static void tracker_draw_update_cursor_pos(t_tracker* x) { t_canvas* canvas = glist_getcanvas(x->x_glist); ! if(x->x_cursor_pos >= 0) { sys_vgui(".x%x.c coords %xCURSOR %d %d %d %d\n", canvas, x, text_xpix(&x->x_obj, x->x_glist)+MARGIN_X-1, text_ypix(&x->x_obj, x->x_glist)+x->x_cursor_pos*x->x_cell_height+MARGIN_Y-1, text_xpix(&x->x_obj, x->x_glist)+x->x_columns*x->x_cell_width+MARGIN_X+1, text_ypix(&x->x_obj, x->x_glist)+(x->x_cursor_pos+1)*x->x_cell_height+MARGIN_Y+1); } else { --- 96,100 ---- static void tracker_draw_update_cursor_pos(t_tracker* x) { t_canvas* canvas = glist_getcanvas(x->x_glist); ! if(x->x_cursor_pos >= 0 && x->b_cursor) { sys_vgui(".x%x.c coords %xCURSOR %d %d %d %d\n", canvas, x, text_xpix(&x->x_obj, x->x_glist)+MARGIN_X-1, text_ypix(&x->x_obj, x->x_glist)+x->x_cursor_pos*x->x_cell_height+MARGIN_Y-1, text_xpix(&x->x_obj, x->x_glist)+x->x_columns*x->x_cell_width+MARGIN_X+1, text_ypix(&x->x_obj, x->x_glist)+(x->x_cursor_pos+1)*x->x_cell_height+MARGIN_Y+1); } else { *************** *** 155,173 **** static void tracker_save(t_gobj* z, t_binbuf* b) { t_tracker* x = (t_tracker*)z; - int ei,gi;
! binbuf_addv(b, "ssiisii", gensym("#X"), gensym("obj"), (t_int)x->x_obj.te_xpix, (t_int)x->x_obj.te_ypix, ! gensym("tracker"), x->x_columns, x->x_rows);
! /* save data: */ ! int tmp; ! for (ei = 0; ei < x->x_rows; ei++) { ! for (gi = 0; gi < x->x_columns; gi++) { ! tmp = (int)x->x_data[ei][gi]; ! binbuf_addv(b, "i", tmp); } }
binbuf_addv(b, ";"); } --- 156,181 ---- static void tracker_save(t_gobj* z, t_binbuf* b) { t_tracker* x = (t_tracker*)z;
! binbuf_addv(b, "ssiis", gensym("#X"), gensym("obj"), (t_int)x->x_obj.te_xpix, (t_int)x->x_obj.te_ypix, ! gensym("tracker"));
! if(x->b_save_data) { ! int ei,gi; ! binbuf_addv(b, "sii", gensym("-data"), x->x_columns, x->x_rows); ! /* save data: */ ! for (ei = 0; ei < x->x_rows; ei++) { ! for (gi = 0; gi < x->x_columns; gi++) { ! binbuf_addv(b, "i", (int)x->x_data[ei][gi]); ! } } + } else { + binbuf_addv(b, "sisi", + gensym("-rows"), x->x_rows, + gensym("-cols"), x->x_columns + ); }
+ binbuf_addv(b, ";"); } *************** *** 177,187 **** t_tracker* x = (t_tracker*)z;
! sprintf(buf, "pdtk_tracker_dialog %%s %d %d\n", ! (int)x->x_columns, (int)x->x_rows); //post("buf=%s", buf); gfxstub_new(&x->x_obj.ob_pd, x, buf); }
! static void tracker_dialog(t_tracker* x, t_symbol* s, int argc, t_atom* argv) { t_canvas* canvas = glist_getcanvas(x->x_glist); int ei; --- 185,197 ---- t_tracker* x = (t_tracker*)z;
! sprintf(buf, "pdtk_tracker_dialog %%s %d %d %d\n", ! (int)x->x_columns, (int)x->x_rows, ! (int)x->b_save_data ! ); //post("buf=%s", buf); gfxstub_new(&x->x_obj.ob_pd, x, buf); }
! /*static void tracker_dialog(t_tracker* x, t_symbol* s, int argc, t_atom* argv) { t_canvas* canvas = glist_getcanvas(x->x_glist); int ei; *************** *** 201,216 **** tracker_draw_erase(x, x->x_glist);
- /* - x->x_columns = argv[0].a_w.w_float; - if(x->x_columns <= 0) x->x_columns = 100; - x->x_rows = argv[1].a_w.w_float; - if(x->x_rows <= 0) x->x_rows = 100; - */ - tracker_resize(x, (int)argv[1].a_w.w_float, (int)argv[0].a_w.w_float);
tracker_draw_new(x, x->x_glist); canvas_fixlinesfor(canvas, (t_text*)x); ! }
static void tracker_select(t_gobj* z, t_glist* glist, int selected) { --- 211,219 ---- tracker_draw_erase(x, x->x_glist);
tracker_resize(x, (int)argv[1].a_w.w_float, (int)argv[0].a_w.w_float);
tracker_draw_new(x, x->x_glist); canvas_fixlinesfor(canvas, (t_text*)x); ! }*/
static void tracker_select(t_gobj* z, t_glist* glist, int selected) { *************** *** 222,226 ****
static void tracker_activate(t_gobj* z, t_glist* glist, int state) { ! post("tracker: activate(%d)", state); }
--- 225,229 ----
static void tracker_activate(t_gobj* z, t_glist* glist, int state) { ! //post("tracker: activate(%d)", state); }
*************** *** 271,281 **** } } else if(k == '\n') { ! n = atoi(x->x_buf); ! if(x->x_active_row >= 0 && x->x_active_column >= 0) { ! int oldr,oldc; ! tracker_setitem(x, x->x_active_row, x->x_active_column, n); ! tracker_reset_buffer(x); ! tracker_draw_update_single(x, x->x_active_row, x->x_active_column); ! //tracker_select_item(x, -1, -1); } } else if(k == '\x7f' || k == 8) { --- 274,286 ---- } } else if(k == '\n') { ! if(x->x_buf[0]) { ! n = atoi(x->x_buf); ! if(x->x_active_row >= 0 && x->x_active_column >= 0) { ! int oldr,oldc; ! tracker_setitem(x, x->x_active_row, x->x_active_column, n); ! tracker_reset_buffer(x); ! tracker_draw_update_single(x, x->x_active_row, x->x_active_column); ! //tracker_select_item(x, -1, -1); ! } } } else if(k == '\x7f' || k == 8) { *************** *** 378,387 ****
static void tracker_resize(t_tracker* x, int newrows, int newcols) { - int ei,ej; - - t_float** oldbuf = x->x_data; int oldrows = x->x_rows; int oldcols = x->x_columns;
x->x_data = (t_float**)getbytes(newrows*sizeof(t_float*)); for(ei = 0; ei < newrows; ei++) { --- 383,392 ----
static void tracker_resize(t_tracker* x, int newrows, int newcols) { int oldrows = x->x_rows; int oldcols = x->x_columns; + if(oldrows == newrows && oldcols == newcols) return;
+ int ei,ej; + t_float** oldbuf = x->x_data; x->x_data = (t_float**)getbytes(newrows*sizeof(t_float*)); for(ei = 0; ei < newrows; ei++) { *************** *** 401,404 **** --- 406,417 ---- }
+ static void tracker_gresize(t_tracker* x, t_floatarg newrows, t_floatarg newcols) { + t_canvas* canvas = glist_getcanvas(x->x_glist); + tracker_draw_erase(x, x->x_glist); + tracker_resize(x, (int)newrows, (int)newcols); + tracker_draw_new(x, x->x_glist); + canvas_fixlinesfor(canvas, (t_text*)x); + } + static void tracker_free(t_tracker* x) { int ei; *************** *** 431,456 **** x->x_ndigits = 3; x->x_cursor_pos = -1;
! int cols,rows; if(argc == 0) { // set default values cols = 10; rows = 10; } else { ! if(argc <= 2) { ! post("tracker: error: wrong # of arguments (<2)"); return NULL; } ! cols = argv[0].a_w.w_float; ! rows = argv[1].a_w.w_float; } ! tracker_resize(x, rows, cols);
! if(argc == (2+cols*rows)) { // restore saved data for(ei = 2; ei < argc; ei++) { x->x_data[(ei-2)/cols][(ei-2)%cols] = argv[ei].a_w.w_float; } ! } x->x_glist = (t_glist*)canvas_getcurrent();
--- 444,527 ---- x->x_ndigits = 3; x->x_cursor_pos = -1; + x->b_cursor = 0; + x->b_save_data = 0;
! int cols = 0, rows = 0; ! int got_data = 0; if(argc == 0) { // set default values cols = 10; rows = 10; + tracker_resize(x, rows, cols); + x->b_save_data = 1; } else { ! //if(argc <= 2) { ! // post("tracker: error: wrong # of arguments (<2)"); ! // return NULL; ! //} ! #define ARG_CHECK_LOOP_BEGIN while(ei < argc) { if(0) {} ! #define ARG_CHECK_LOOP_END } ! #define MATCH_ARG(sz) else if(argv[ei].a_type == A_SYMBOL && \ ! strcmp(sz, argv[ei].a_w.w_symbol->s_name) == 0) ! #define MATCH_ARG_T(sz,t) else if(argv[ei].a_type == A_SYMBOL && \ ! strcmp(sz, argv[ei].a_w.w_symbol->s_name) == 0 && (ei + 1) < \ ! argc && argv[ei+1].a_type == t) ! #define MATCH_FAILED else ! ei = 0; ! /*----------------*/ARG_CHECK_LOOP_BEGIN ! MATCH_ARG_T("-rows", A_FLOAT) { ! ei++; ! rows = (int)argv[ei++].a_w.w_float; ! } ! MATCH_ARG_T("-cols", A_FLOAT) { ! ei++; ! cols = (int)argv[ei++].a_w.w_float; ! } ! MATCH_ARG_T("-bg", A_FLOAT) { ei++; ei++; } ! MATCH_ARG_T("-bg", A_SYMBOL) { ei++; ei++; } ! MATCH_ARG_T("-fg", A_FLOAT) { ei++; ei++; } ! MATCH_ARG_T("-fg", A_SYMBOL) { ei++; ei++; } ! MATCH_ARG_T("-sl", A_FLOAT) { ei++; ei++; } ! MATCH_ARG_T("-sl", A_SYMBOL) { ei++; ei++; } ! MATCH_ARG_T("-bd", A_FLOAT) { ei++; ei++; } ! MATCH_ARG_T("-bd", A_SYMBOL) { ei++; ei++; } ! MATCH_ARG("-data") { ! ei++; ! if((argc - ei) < 2) { ! post("tracker: too few arguments to option -data"); ! post("tracker: expeting: -data <rows> <cols> #rows*cols ..."); ! return NULL; ! } ! cols = argv[ei++].a_w.w_float; ! rows = argv[ei++].a_w.w_float; ! if((argc - ei) < (rows * cols)) { ! post("tracker: too few arguments to option -data"); ! post("tracker: expeting: -data %d %d followed by %d floats", ! rows, cols, rows * cols); ! return NULL; ! } ! tracker_resize(x, rows, cols); ! int j; ! for(j = 0; j < (rows * cols); j++) { ! x->x_data[j / cols][j % cols] = argv[ei++].a_w.w_float; ! } ! got_data = 1; ! x->b_save_data = 1; ! } ! MATCH_FAILED { ! post("tracker: argument error: w_float=%f, w_symbol=%s", ! argv[ei].a_w.w_float, argv[ei].a_w.w_symbol->s_name); return NULL; } ! /*----------------*/ARG_CHECK_LOOP_END } ! if(!got_data) tracker_resize(x, rows, cols);
! /*if(argc == (2+cols*rows)) { // restore saved data for(ei = 2; ei < argc; ei++) { x->x_data[(ei-2)/cols][(ei-2)%cols] = argv[ei].a_w.w_float; } ! }*/ x->x_glist = (t_glist*)canvas_getcurrent();
*************** *** 465,469 **** }
! static void tracker_getrow(t_tracker* x, t_float row) { int ei,introw;
--- 536,589 ---- }
! static void tracker_file_load(t_tracker* x, t_symbol* f) { ! void* binbuf = binbuf_new(); ! t_canvas* canvas = glist_getcanvas(x->x_glist); ! if(binbuf_read_via_canvas(binbuf, f->s_name, canvas, 0)) ! error("tracker: %s: read failed", f->s_name); ! ! int argc = binbuf_getnatom(binbuf); ! t_atom* argv = binbuf_getvec(binbuf); ! ! if(argc < 2) { ! error("tracker: empty or invalid file"); ! } ! ! int j = 0; ! int rows = (int)argv[j++].a_w.w_float, ! cols = (int)argv[j++].a_w.w_float; ! tracker_gresize(x, rows, cols); ! ! int r,c; ! for(r = 0; r < x->x_rows; r++) { ! for(c = 0; c < x->x_columns; c++) { ! //x->x_data[r][c] = argv[2+r*cols+c].a_w.w_float; ! x->x_data[r][c] = argv[j++].a_w.w_float; ! } ! } ! tracker_gresize(x, rows, cols); ! ! binbuf_free(binbuf); ! } ! ! static void tracker_file_save(t_tracker* x, t_symbol* f) { ! void* binbuf = binbuf_new(); ! t_canvas* canvas = glist_getcanvas(x->x_glist); ! char buf[MAXPDSTRING]; ! canvas_makefilename(canvas, f->s_name, buf, MAXPDSTRING); ! ! int r,c; ! binbuf_addv(binbuf, "ii", x->x_rows, x->x_columns); ! for(r = 0; r < x->x_rows; r++) { ! for(c = 0; c < x->x_columns; c++) { ! binbuf_addv(binbuf, "i", (int)x->x_data[r][c]); ! } ! } ! ! if(binbuf_write(binbuf, buf, "", 0)) ! error("%s: write failed", f->s_name); ! binbuf_free(binbuf); ! } ! ! static void tracker_getrow(t_tracker* x, t_floatarg row) { int ei,introw;
*************** *** 479,483 **** freebytes(atombuf, sizeof(t_atom)*x->x_columns);
! if(1) { x->x_cursor_pos = ((t_int)row) % x->x_rows; if(x->x_cursor_pos < 0) x->x_cursor_pos = 0; --- 599,603 ---- freebytes(atombuf, sizeof(t_atom)*x->x_columns);
! if(x->b_cursor) { x->x_cursor_pos = ((t_int)row) % x->x_rows; if(x->x_cursor_pos < 0) x->x_cursor_pos = 0; *************** *** 486,489 **** --- 606,618 ---- }
+ static void tracker_set_saveflag(t_tracker* x, t_floatarg b) { + x->b_save_data = (int)(b == 0 ? 0 : 1); + } + + static void tracker_toggle_cursor(t_tracker* x, t_floatarg b) { + x->b_cursor = (int)(b == 0 ? 0 : 1); + tracker_draw_update_cursor_pos(x); + } + static void tracker_setrow(t_tracker* x, t_symbol* s, int argc, t_atom* argv) { if(argc < 2) { *************** *** 561,570 **** ); class_addlist(tracker_class, tracker_list); class_addmethod(tracker_class, (t_method)tracker_update, gensym("update"), A_GIMME, 0); ! class_addmethod(tracker_class, (t_method)tracker_dialog, gensym("dialog"), A_GIMME, 0); class_addmethod(tracker_class, (t_method)tracker_setrow, gensym("setrow"), A_GIMME, 0); class_addmethod(tracker_class, (t_method)tracker_getrow, gensym("getrow"), A_FLOAT, 0); class_addmethod(tracker_class, (t_method)tracker_setitem, gensym("set"), A_FLOAT, A_FLOAT, A_FLOAT, 0); class_addmethod(tracker_class, (t_method)tracker_getitem, gensym("get"), A_FLOAT, A_FLOAT, 0);
tracker_widgetbehavior.w_getrectfn = tracker_getrect; --- 690,704 ---- ); class_addlist(tracker_class, tracker_list); + class_addmethod(tracker_class, (t_method)tracker_toggle_cursor, gensym("trackrow"), A_FLOAT, 0); class_addmethod(tracker_class, (t_method)tracker_update, gensym("update"), A_GIMME, 0); ! //class_addmethod(tracker_class, (t_method)tracker_dialog, gensym("dialog"), A_GIMME, 0); class_addmethod(tracker_class, (t_method)tracker_setrow, gensym("setrow"), A_GIMME, 0); class_addmethod(tracker_class, (t_method)tracker_getrow, gensym("getrow"), A_FLOAT, 0); class_addmethod(tracker_class, (t_method)tracker_setitem, gensym("set"), A_FLOAT, A_FLOAT, A_FLOAT, 0); class_addmethod(tracker_class, (t_method)tracker_getitem, gensym("get"), A_FLOAT, A_FLOAT, 0); + class_addmethod(tracker_class, (t_method)tracker_gresize, gensym("resize"), A_FLOAT, A_FLOAT, 0); + class_addmethod(tracker_class, (t_method)tracker_set_saveflag, gensym("set_saveflag"), A_FLOAT, 0); + class_addmethod(tracker_class, (t_method)tracker_file_load, gensym("load"), A_SYMBOL, 0); + class_addmethod(tracker_class, (t_method)tracker_file_save, gensym("save"), A_SYMBOL, 0);
tracker_widgetbehavior.w_getrectfn = tracker_getrect;