Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17753
Modified Files: Tag: devel_0_39 desire.c desire.h Log Message: .
Index: desire.h =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.h,v retrieving revision 1.1.2.18 retrieving revision 1.1.2.19 diff -C2 -d -r1.1.2.18 -r1.1.2.19 *** desire.h 3 Sep 2006 04:57:34 -0000 1.1.2.18 --- desire.h 3 Sep 2006 05:14:04 -0000 1.1.2.19 *************** *** 112,116 **** unsigned int gl_loading:1; /* am now loading from file */ unsigned int gl_willvis:1; /* make me visible after loading */ - unsigned int gl_edit:1; /* edit mode */ unsigned int gl_goprect:1; /* draw rectangle for graph-on-parent */ unsigned int gl_isgraph:1; /* show as graph on parent */ --- 112,115 ---- *************** *** 217,228 **** EXTERN t_canvas *glist_getcanvas(t_glist *x); EXTERN void glist_delete(t_glist *x, t_gobj *y); - - /* -------------------- TO BE SORTED OUT --------------------- */ - EXTERN void glist_retext(t_glist *x, t_text *y); EXTERN int glist_isvisible(t_glist *x); EXTERN int glist_istoplevel(t_glist *x); ! EXTERN t_glist *glist_findgraph(t_glist *x); ! EXTERN int glist_getfont(t_glist *x); ! EXTERN void glist_sort(t_glist *canvas); EXTERN void glist_read(t_glist *x, t_symbol *filename, t_symbol *format); EXTERN void glist_mergefile(t_glist *x, t_symbol *filename, t_symbol *format); --- 216,228 ---- EXTERN t_canvas *glist_getcanvas(t_glist *x); EXTERN void glist_delete(t_glist *x, t_gobj *y); EXTERN int glist_isvisible(t_glist *x); EXTERN int glist_istoplevel(t_glist *x); ! EXTERN t_canvas *canvas_getcurrent(void); ! EXTERN void canvas_deletelinesfor(t_canvas *x, t_text *text); ! EXTERN void canvas_deletelinesforio(t_canvas *x, t_text *text, t_inlet *inp, t_outlet *outp); ! EXTERN void linetraverser_start(t_linetraverser *t, t_canvas *x); ! EXTERN t_outconnect *linetraverser_next(t_linetraverser *t); ! ! /* -------------------- TO BE SORTED OUT --------------------- */ EXTERN void glist_read(t_glist *x, t_symbol *filename, t_symbol *format); EXTERN void glist_mergefile(t_glist *x, t_symbol *filename, t_symbol *format); *************** *** 238,255 **** float x1, float y1, float x2, float y2, float px1, float py1, float px2, float py2); - EXTERN void glist_arraydialog(t_glist *parent, t_symbol *name, - t_floatarg size, t_floatarg saveit, t_floatarg newgraph); EXTERN t_binbuf *glist_writetobinbuf(t_glist *x, int wholething); EXTERN int glist_isgraph(t_glist *x); EXTERN void glist_redraw(t_glist *x); - EXTERN void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime, - char *tag, int x1, int y1, int x2, int y2); - EXTERN void glist_eraseiofor(t_glist *glist, t_object *ob, char *tag); EXTERN void canvas_create_editor(t_glist *x, int createit); - void canvas_deletelinesforio(t_canvas *x, t_text *text, t_inlet *inp, t_outlet *outp); - EXTERN void text_setto(t_text *x, t_glist *glist, char *buf, int bufsize); - EXTERN void text_drawborder(t_text *x, t_glist *glist, char *tag, int width, int height, int firsttime); - EXTERN void text_eraseborder(t_text *x, t_glist *glist, char *tag); EXTERN int text_xcoord(t_text *x, t_glist *glist); EXTERN int text_ycoord(t_text *x, t_glist *glist); --- 238,246 ---- *************** *** 262,266 **** EXTERN t_symbol *canvas_makebindsym(t_symbol *s); EXTERN void canvas_vistext(t_canvas *x, t_text *y); - EXTERN void canvas_deletelinesfor(t_canvas *x, t_text *text); EXTERN void canvas_redraw(t_canvas *x);
--- 253,256 ---- *************** *** 271,284 **** EXTERN void canvas_redrawallfortemplate(t_template *tmpl, int action); EXTERN void canvas_redrawallfortemplatecanvas(t_canvas *x, int action); - EXTERN void canvas_setusedastemplate(t_canvas *x); - EXTERN t_canvas *canvas_getcurrent(void); EXTERN t_symbol *canvas_realizedollar(t_canvas *x, t_symbol *s); EXTERN t_canvas *canvas_getrootfor(t_canvas *x); EXTERN void canvas_dirty(t_canvas *x, t_int n); - EXTERN int canvas_getfont(t_canvas *x); EXTERN void canvas_resortinlets(t_canvas *x); EXTERN void canvas_resortoutlets(t_canvas *x); EXTERN void canvas_free(t_canvas *x); - EXTERN void canvas_editmode(t_canvas *x, t_floatarg yesplease); EXTERN int canvas_isabstraction(t_canvas *x); EXTERN int canvas_istable(t_canvas *x); --- 261,270 ---- *************** *** 290,319 **** EXTERN int canvas_setdeleting(t_canvas *x, int flag); EXTERN int canvas_getindex(t_canvas *x, t_gobj *y); - EXTERN void canvas_connect(t_canvas *x, - t_floatarg fwhoout, t_floatarg foutno,t_floatarg fwhoin, t_floatarg finno); - EXTERN void canvas_disconnect(t_canvas *x, - float index1, float outno, float index2, float inno); - EXTERN int canvas_isconnected (t_canvas *x, t_text *ob1, int n1, t_text *ob2, int n2); - EXTERN void canvas_selectinrect(t_canvas *x, int lox, int loy, int hix, int hiy); - EXTERN void canvas_fattenforscalars(t_canvas *x, int *x1, int *y1, int *x2, int *y2); EXTERN void canvas_visforscalars(t_canvas *x, t_glist *glist, int vis); EXTERN int canvas_clicksub(t_canvas *x, int xpix, int ypix, int shift, int alt, int dbl, int doit); EXTERN t_glist *canvas_getglistonsuper(void); - EXTERN void linetraverser_start(t_linetraverser *t, t_canvas *x); - EXTERN t_outconnect *linetraverser_next(t_linetraverser *t); - EXTERN void linetraverser_skipobject(t_linetraverser *t); - EXTERN t_template *garray_template(t_garray *x); - EXTERN t_garray *graph_array(t_glist *gl, t_symbol *s, t_symbol *tmpl, t_floatarg f, t_floatarg saveit); EXTERN t_array *array_new(t_symbol *templatesym, t_gpointer *parent); EXTERN void array_resize(t_array *x, int n); EXTERN void array_free(t_array *x); - EXTERN t_gstub *gstub_new(t_glist *gl, t_array *a); EXTERN void gstub_cutoff(t_gstub *gs); EXTERN void gpointer_setglist(t_gpointer *gp, t_glist *glist, t_scalar *x); - EXTERN void word_init(t_word *wp, t_template *tmpl, t_gpointer *gp); EXTERN void word_restore(t_word *wp, t_template *tmpl, int argc, t_atom *argv); --- 276,291 ----
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.143 retrieving revision 1.1.2.144 diff -C2 -d -r1.1.2.143 -r1.1.2.144 *** desire.c 3 Sep 2006 04:57:33 -0000 1.1.2.143 --- desire.c 3 Sep 2006 05:14:01 -0000 1.1.2.144 *************** *** 456,464 **** }
- void linetraverser_skipobject(t_linetraverser *t) { - t->tr_nextoc = 0; - t->tr_nextoutno = t->tr_nout; - } - /* -------------------- the canvas object -------------------------- */ int glist_valid = 10000; --- 456,459 ---- *************** *** 536,540 **** } x->gl_willvis = vis; - x->gl_edit = !strncmp(x->gl_name->s_name, "Untitled", 8); x->gl_font = sys_nearestfontsize(font); pd_pushsym((t_pd *)x); --- 531,534 ---- *************** *** 791,795 **** int glist_istoplevel(t_glist *x) {return x->gl_havewindow || !x->gl_isgraph;}
! int glist_getfont(t_glist *x) { while (!x->gl_env) if (!(x = x->gl_owner)) bug("t_canvasenvironment"); return x->gl_font; --- 785,789 ---- int glist_istoplevel(t_glist *x) {return x->gl_havewindow || !x->gl_isgraph;}
! static int glist_getfont(t_glist *x) { while (!x->gl_env) if (!(x = x->gl_owner)) bug("t_canvasenvironment"); return x->gl_font; *************** *** 1379,1383 **** }
! int canvas_isconnected (t_canvas *x, t_text *ob1, int n1, t_text *ob2, int n2) { t_linetraverser t; t_outconnect *oc; --- 1373,1378 ---- }
! /* keep me */ ! static int canvas_isconnected (t_canvas *x, t_text *ob1, int n1, t_text *ob2, int n2) { t_linetraverser t; t_outconnect *oc; *************** *** 1430,1434 **** canvas_find_index2 = myindex2; vmess((t_pd *)x, gensym("menu-open"), ""); - canvas_editmode(x, 1.); return 1; } --- 1425,1428 ---- *************** *** 1484,1488 **** /* got it... now show it. */ canvas_vis(glist_getcanvas(gl), 1); - canvas_editmode(glist_getcanvas(gl), 1.); return 1; } --- 1478,1481 ---- *************** *** 1594,1604 **** #define NHIST 15
- void canvas_editmode(t_canvas *x, t_floatarg fyesplease) { - int yesplease = fyesplease; - if (yesplease && x->gl_edit) return; - x->gl_edit = !x->gl_edit; - sys_mgui(glist_getcanvas(x),"editmode=","i",x->gl_edit); - } - static t_glist *canvas_last_glist; static int canvas_last_glist_x, canvas_last_glist_y; --- 1587,1590 ---- *************** *** 1867,1873 **** }
/* this is called back from the dialog window to create a garray. The otherflag requests that we find an existing graph to put it in. */ ! void glist_arraydialog(t_glist *parent, t_symbol *name, t_floatarg size, t_floatarg fflags, t_floatarg otherflag) { t_glist *gl; --- 1853,1861 ---- }
+ t_glist *glist_findgraph(t_glist *x); + /* this is called back from the dialog window to create a garray. The otherflag requests that we find an existing graph to put it in. */ ! static void glist_arraydialog(t_glist *parent, t_symbol *name, t_floatarg size, t_floatarg fflags, t_floatarg otherflag) { t_glist *gl; *************** *** 2681,2688 **** }
- void glist_retext(t_glist *glist, t_text *y) { - if (glist->gl_editor && glist->gl_editor->e_rtext) gobj_changed(y,0); - } - t_canvas *glist_getcanvas(t_glist *x) { while (x->gl_owner && !x->gl_havewindow && x->gl_isgraph) x = x->gl_owner; --- 2669,2672 ---- *************** *** 2963,2970 **** }
! /* redraw all the items in a glist. We construe this to mean ! redrawing in its own window and on parent, as needed in each case. ! This is too conservative -- for instance, when you draw an "open" ! rectangle on the parent, you shouldn't have to redraw the window! */ void glist_redraw(t_glist *x) { if (glist_isvisible(x)) { --- 2947,2954 ---- }
! /* redraw all the items in a glist. We construe this to mean ! redrawing in its own window and on parent, as needed in each case. ! This is too conservative -- for instance, when you draw an "open" ! rectangle on the parent, you shouldn't have to redraw the window! */ void glist_redraw(t_glist *x) { if (glist_isvisible(x)) { *************** *** 2972,2977 **** if (glist_istoplevel(x)) { t_gobj *g; ! for (g = x->gl_list; g; g = g->g_next) gobj_changed(x,0); ! sys_mgui(x,"draw_canvas_wires",""); canvas_drawredrect(x, 0); if (x->gl_goprect) canvas_drawredrect(x, 1); --- 2956,2960 ---- if (glist_istoplevel(x)) { t_gobj *g; ! glist_each(g,x) gobj_changed(x,0); canvas_drawredrect(x, 0); if (x->gl_goprect) canvas_drawredrect(x, 1); *************** *** 4325,4334 **** }
! /* make a new scalar and add to the glist. We create a "gp" here which ! will be used for array items to point back here. This gp doesn't do ! reference counting or "validation" updates though; the parent won't go away ! without the contained arrays going away too. The "gp" is copied out ! by value in the word_init() routine so we can throw our copy away. */ ! t_scalar *scalar_new(t_glist *owner, t_symbol *templatesym) { t_scalar *x; --- 4308,4316 ---- }
! /* make a new scalar and add to the glist. We create a "gp" here which ! will be used for array items to point back here. This gp doesn't do ! reference counting or "validation" updates though; the parent won't go away ! without the contained arrays going away too. The "gp" is copied out ! by value in the word_init() routine so we can throw our copy away. */ t_scalar *scalar_new(t_glist *owner, t_symbol *templatesym) { t_scalar *x; *************** *** 6991,6995 **** } else { int xpix, ypix; - pd_vmess((t_pd *)glist_getcanvas(gl), gensym("editmode"), "i", 1); SETSYMBOL(&at, gensym("comment")); glist_getnextxy(gl, &xpix, &ypix); --- 6973,6976 ---- *************** *** 7040,7044 **** } else { int xpix, ypix; - pd_vmess((t_pd *)gl, gensym("editmode"), "i", 1); glist_getnextxy(gl, &xpix, &ypix); canvas_objtext(gl, xpix, ypix, 1, b); --- 7021,7024 ---- *************** *** 7050,7054 **** t_binbuf *b = binbuf_new(); int xpix, ypix; - pd_vmess((t_pd *)gl, gensym("editmode"), "i", 1); SETSYMBOL(&at, guiobjname); binbuf_restore(b, 1, &at); --- 7030,7033 ---- *************** *** 7116,7125 **** binbuf_clear(x->m_text.te_binbuf); binbuf_add(x->m_text.te_binbuf, argc, argv); ! glist_retext(x->m_glist, &x->m_text); }
static void message_add2(t_message *x, t_symbol *s, int argc, t_atom *argv) { binbuf_add(x->m_text.te_binbuf, argc, argv); ! glist_retext(x->m_glist, &x->m_text); }
--- 7095,7104 ---- binbuf_clear(x->m_text.te_binbuf); binbuf_add(x->m_text.te_binbuf, argc, argv); ! gobj_changed(x->m_glist,0); }
static void message_add2(t_message *x, t_symbol *s, int argc, t_atom *argv) { binbuf_add(x->m_text.te_binbuf, argc, argv); ! gobj_changed(x->m_glist,0); }
*************** *** 7127,7131 **** binbuf_add(x->m_text.te_binbuf, argc, argv); binbuf_addsemi(x->m_text.te_binbuf); ! glist_retext(x->m_glist, &x->m_text); }
--- 7106,7110 ---- binbuf_add(x->m_text.te_binbuf, argc, argv); binbuf_addsemi(x->m_text.te_binbuf); ! gobj_changed(x->m_glist,0); }
*************** *** 7134,7152 **** SETCOMMA(&a); binbuf_add(x->m_text.te_binbuf, 1, &a); ! glist_retext(x->m_glist, &x->m_text); }
! static void message_addsemi(t_message *x) { ! message_add(x, 0, 0, 0); ! }
static void message_adddollar(t_message *x, t_floatarg f) { t_atom a; int n = f; ! if (n < 0) ! n = 0; SETDOLLAR(&a, n); binbuf_add(x->m_text.te_binbuf, 1, &a); ! glist_retext(x->m_glist, &x->m_text); }
--- 7113,7128 ---- SETCOMMA(&a); binbuf_add(x->m_text.te_binbuf, 1, &a); ! gobj_changed(x->m_glist,0); }
! static void message_addsemi(t_message *x) {message_add(x,0,0,0);}
static void message_adddollar(t_message *x, t_floatarg f) { t_atom a; int n = f; ! if (n<0) n=0; SETDOLLAR(&a, n); binbuf_add(x->m_text.te_binbuf, 1, &a); ! gobj_changed(x->m_glist,0); }
*************** *** 7155,7159 **** SETDOLLSYM(&a, s); binbuf_add(x->m_text.te_binbuf, 1, &a); ! glist_retext(x->m_glist, &x->m_text); }
--- 7131,7135 ---- SETDOLLSYM(&a, s); binbuf_add(x->m_text.te_binbuf, 1, &a); ! gobj_changed(x->m_glist,0); }
*************** *** 7173,7177 **** } else { int xpix, ypix; - pd_vmess((t_pd *)gl, gensym("editmode"), "i", 1); glist_getnextxy(gl, &xpix, &ypix); x->m_text.te_xpix = xpix-3; --- 7149,7152 ---- *************** *** 7352,7356 **** outlet_new(&x->a_text, x->a_atom.a_type == A_FLOAT ? &s_float: &s_symbol); inlet_new(&x->a_text, &x->a_text.te_pd, 0, 0); - pd_vmess((t_pd *)gl, gensym("editmode"), "i", 1); glist_getnextxy(gl, &xpix, &ypix); x->a_text.te_xpix = xpix; --- 7327,7330 ---- *************** *** 8806,8811 **** class_addmethod3(c,canvas_close,"close","F");
- class_addmethod3(c,canvas_editmode, "editmode","F"); - class_addmethod3(c,canvas_print, "print","s"); class_addmethod3(c,canvas_find, "find","*"); --- 8780,8783 ---- *************** *** 8830,8834 **** class_addmethod3(c,graph_ylabel,"ylabel","*"); class_addmethod3(c,graph_array,"array","sfsF"); - class_addmethod3(c,glist_arraydialog,"arraydialog","sfff"); class_addmethod3(c,glist_sort,"sort","");
--- 8802,8805 ----