Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6662
Modified Files: Tag: devel_0_39 desire.c desire.h Log Message: removing gobj_displace and stuff.
Index: desire.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.h,v retrieving revision 1.1.2.10 retrieving revision 1.1.2.11 diff -C2 -d -r1.1.2.10 -r1.1.2.11 *** desire.h 2 Sep 2006 07:23:13 -0000 1.1.2.10 --- desire.h 2 Sep 2006 08:08:25 -0000 1.1.2.11 *************** *** 371,376 **** EXTERN void gobj_getrect(t_gobj *x, t_glist *owner, int *x1, int *y1, int *x2, int *y2); - */ EXTERN void gobj_displace(t_gobj *x, t_glist *owner, int dx, int dy); EXTERN void gobj_select(t_gobj *x, t_glist *owner, int state); EXTERN void gobj_activate(t_gobj *x, t_glist *owner, int state); --- 371,376 ---- EXTERN void gobj_getrect(t_gobj *x, t_glist *owner, int *x1, int *y1, int *x2, int *y2); EXTERN void gobj_displace(t_gobj *x, t_glist *owner, int dx, int dy); + */ EXTERN void gobj_select(t_gobj *x, t_glist *owner, int state); EXTERN void gobj_activate(t_gobj *x, t_glist *owner, int state);
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.134 retrieving revision 1.1.2.135 diff -C2 -d -r1.1.2.134 -r1.1.2.135 *** desire.c 2 Sep 2006 07:23:12 -0000 1.1.2.134 --- desire.c 2 Sep 2006 08:08:24 -0000 1.1.2.135 *************** *** 638,642 **** { int heightwas = y2 - y1; - int heightchange = y2 - y1 - (x->gl_screeny2 - x->gl_screeny1); if (x->gl_screenx1 == x1 && x->gl_screeny1 == y1 && x->gl_screenx2 == x2 && x->gl_screeny2 == y2) --- 638,641 ---- *************** *** 652,663 **** parent. */ float diff = x->gl_y1 - x->gl_y2; - t_gobj *y; x->gl_y1 = heightwas * diff; x->gl_y2 = x->gl_y1 - diff; - /* and move text objects accordingly; they should stick - to the bottom, not the top. */ - for (y = x->gl_list; y; y = y->g_next) - if (pd_checkobject(&y->g_pd)) - gobj_displace(y, x, 0, heightchange); canvas_redraw(x); } --- 651,656 ---- *************** *** 990,995 **** we just suppress that here. */ if (cw > 5 && ch > 5) ! canvas_setbounds(x, txpix, typix, ! txpix + cw - HORIZBORDER, typix + ch - VERTBORDER); }
--- 983,987 ---- we just suppress that here. */ if (cw > 5 && ch > 5) ! canvas_setbounds(x, txpix, typix, txpix + cw - HORIZBORDER, typix + ch - VERTBORDER); }
*************** *** 1264,1272 **** /* ---------------- generic widget behavior ------------------------- */
- void gobj_displace(t_gobj *x, t_glist *glist, int dx, int dy) { - t_widgetbehavior *w = x->g_pd->c_wb; - if (w && w->w_displacefn) w->w_displacefn(x, glist, dx, dy); - } - void gobj_select(t_gobj *x, t_glist *glist, int state) { t_widgetbehavior *w = x->g_pd->c_wb; --- 1256,1259 ---- *************** *** 2506,2514 **** /* -------------------- widget behavior for garray ------------ */
- static void garray_displace(t_gobj *z, t_glist *glist, int dx, int dy) {} - static void garray_select(t_gobj *z, t_glist *glist, int state) {} - static void garray_activate(t_gobj *z, t_glist *glist, int state) {} - static void garray_delete(t_gobj *z, t_glist *glist) {} - static void garray_vis(t_gobj *z, t_glist *glist, int vis) { t_garray *x = (t_garray *)z; --- 2493,2496 ---- *************** *** 2524,2538 **** #define ARRAYWRITECHUNKSIZE 1000
! static void garray_save(t_gobj *z, t_binbuf *b) ! { int style, filestyle; t_garray *x = (t_garray *)z; t_array *array = garray_getarray(x); t_template *scalartemplate; ! if (x->x_scalar->sc_template != gensym("pd-_float_array")) ! { ! /* LATER "save" the scalar as such */ ! pd_error(x, "can't save arrays of type %s yet", ! x->x_scalar->sc_template->s_name); return; } --- 2506,2517 ---- #define ARRAYWRITECHUNKSIZE 1000
! static void garray_save(t_gobj *z, t_binbuf *b) { int style, filestyle; t_garray *x = (t_garray *)z; t_array *array = garray_getarray(x); t_template *scalartemplate; ! if (x->x_scalar->sc_template != gensym("pd-_float_array")) { ! /* LATER "save" the scalar as such */ ! pd_error(x, "can't save arrays of type %s yet", x->x_scalar->sc_template->s_name); return; } *************** *** 2541,2548 **** return; } ! style = template_getfloat(scalartemplate, gensym("style"), ! x->x_scalar->sc_vec, 0); ! filestyle = (style == PLOTSTYLE_POINTS ? 1 : ! (style == PLOTSTYLE_POLY ? 0 : style)); binbuf_addv(b, "sssisi;", gensym("#X"), gensym("array"), x->x_name, array->a_n, &s_float, x->x_saveit + 2 * filestyle); --- 2520,2525 ---- return; } ! style = template_getfloat(scalartemplate, gensym("style"), x->x_scalar->sc_vec, 0); ! filestyle = (style == PLOTSTYLE_POINTS ? 1 : (style == PLOTSTYLE_POLY ? 0 : style)); binbuf_addv(b, "sssisi;", gensym("#X"), gensym("array"), x->x_name, array->a_n, &s_float, x->x_saveit + 2 * filestyle); *************** *** 2562,2575 **** }
! t_widgetbehavior garray_widgetbehavior = ! { ! 0, ! garray_displace, ! garray_select, ! garray_activate, ! garray_delete, ! garray_vis, ! garray_click, ! };
/* ----------------------- public functions -------------------- */ --- 2539,2543 ---- }
! t_widgetbehavior garray_widgetbehavior = {0, 0, 0, 0, 0, garray_vis, garray_click};
/* ----------------------- public functions -------------------- */ *************** *** 3508,3521 **** }
- static void graph_displace(t_gobj *z, t_glist *glist, int dx, int dy) { - t_glist *x = (t_glist *)z; - if (!x->gl_isgraph) text_widgetbehavior.w_displacefn(z, glist, dx, dy); - else { - x->gl_obj.te_xpix += dx; - x->gl_obj.te_ypix += dy; - glist_redraw(x); - } - } - static void graph_select(t_gobj *z, t_glist *glist, int state) { t_glist *x = (t_glist *)z; --- 3476,3479 ---- *************** *** 3605,3612 **** }
! t_widgetbehavior graph_widgetbehavior = ! { ! 0, ! graph_displace, graph_select, graph_activate, --- 3563,3567 ---- }
! t_widgetbehavior graph_widgetbehavior = {0,0, graph_select, graph_activate, *************** *** 8147,8151 **** static t_class *gatom_class; static void text_vis(t_gobj *z, t_glist *glist, int vis); - static void text_displace(t_gobj *z, t_glist *glist, int dx, int dy);
void canvas_startmotion(t_canvas *x); --- 8102,8105 ---- *************** *** 8556,8566 **** }
- static void text_displace(t_gobj *z, t_glist *glist, int dx, int dy) { - t_text *x = (t_text *)z; - x->te_xpix += dx; - x->te_ypix += dy; - /* assuming we got that command from desire.tk; then we don't have to actually - move anything because the GUI does that for us. */ - } static void text_select(t_gobj *z, t_glist *glist, int state) {} static void text_activate(t_gobj *z, t_glist *glist, int state) {} --- 8510,8513 ---- *************** *** 8629,8635 ****
/* this one is for everyone but "gatoms"; it's imposed in m_class.c */ ! t_widgetbehavior text_widgetbehavior = { ! 0, text_displace, text_select, text_activate, text_delete, text_vis, 0, ! };
void text_setto(t_text *x, t_glist *glist, char *buf, int bufsize) { --- 8576,8580 ----
/* this one is for everyone but "gatoms"; it's imposed in m_class.c */ ! t_widgetbehavior text_widgetbehavior = {0, 0, text_select, text_activate, text_delete, text_vis, 0};
void text_setto(t_text *x, t_glist *glist, char *buf, int bufsize) {