[PD-cvs] pd/src desire.c,1.1.2.217.2.222,1.1.2.217.2.223
Mathieu Bouchard
matju at users.sourceforge.net
Sat Aug 18 06:19:27 CEST 2007
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21658
Modified Files:
Tag: desiredata
desire.c
Log Message:
removed funcs for redrawing scalars etc which is going to be handled with observers later
Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.217.2.222
retrieving revision 1.1.2.217.2.223
diff -C2 -d -r1.1.2.217.2.222 -r1.1.2.217.2.223
*** desire.c 18 Aug 2007 04:16:51 -0000 1.1.2.217.2.222
--- desire.c 18 Aug 2007 04:19:21 -0000 1.1.2.217.2.223
***************
*** 1021,1043 ****
static void template_notify(t_template *, t_symbol *s, int argc, t_atom *argv);
- /* redraw all "scalars" (do this if a drawing command is changed.)
- LATER we'll use the "template" information to select which ones we
- redraw. Action = 0 for redraw, 1 for draw only, 2 for erase. */
- static void canvas_redrawall(t_canvas *gl, int action) {
- int vis = canvas_isvisible(gl);
- canvas_each(g,gl) {
- if (vis && g->_class == scalar_class) {
- if (action == 1) {/*if (canvas_isvisible(gl)) gobj_vis(g, gl, 1);*/}
- else if (action == 2) {/*if (canvas_isvisible(gl)) gobj_vis(g, gl, 0);*/}
- else scalar_redraw((t_scalar *)g, gl);
- } else if (g->_class == canvas_class) canvas_redrawall((t_canvas *)g, action);
- }
- }
-
- /* public interface for above. */
- static void canvas_redrawallfortemplate(t_template *t, int action) {
- canvases_each(x) canvas_redrawall(x, action);
- }
-
/* find the template defined by a canvas, and redraw all elements for that */
void canvas_redrawallfortemplatecanvas(t_canvas *x, int action) {
--- 1021,1024 ----
***************
*** 1051,1057 ****
continue;
tmpl = template_findbyname(argv[1].a_symbol);
! canvas_redrawallfortemplate(tmpl, action);
}
! canvas_redrawallfortemplate(0, action);
}
--- 1032,1038 ----
continue;
tmpl = template_findbyname(argv[1].a_symbol);
! //canvas_redrawallfortemplate(tmpl, action);
}
! //canvas_redrawallfortemplate(0, action);
}
***************
*** 2042,2047 ****
x->boxes->add(y);
if (x->gop && !x->goprect && pd_checkobject(y)) SET(goprect,1);
! if (class_isdrawcommand(y->_class))
! canvas_redrawallfortemplate(template_findbyname(canvas_makebindsym(canvas_getcanvas(x)->name)), 0);
}
--- 2023,2027 ----
x->boxes->add(y);
if (x->gop && !x->goprect && pd_checkobject(y)) SET(goprect,1);
! //if (class_isdrawcommand(y->_class)) canvas_redrawallfortemplate(template_findbyname(canvas_makebindsym(canvas_getcanvas(x)->name)), 0);
}
***************
*** 2049,2055 ****
void canvas_delete(t_canvas *x, t_gobj *y) {
bool chkdsp = !!zgetfn(y,gensym("dsp"));
! int drawcommand = class_isdrawcommand(y->_class);
/* if we're a drawing command, erase all scalars now, before deleting it; we'll redraw them once it's deleted below. */
! if (drawcommand) canvas_redrawallfortemplate(template_findbyname(canvas_makebindsym(canvas_getcanvas(x)->name)), 2);
canvas_deletelinesfor(x,(t_text *)y);
x->boxes->remove_by_value(y);
--- 2029,2035 ----
void canvas_delete(t_canvas *x, t_gobj *y) {
bool chkdsp = !!zgetfn(y,gensym("dsp"));
! //int drawcommand = class_isdrawcommand(y->_class);
/* if we're a drawing command, erase all scalars now, before deleting it; we'll redraw them once it's deleted below. */
! //if (drawcommand) canvas_redrawallfortemplate(template_findbyname(canvas_makebindsym(canvas_getcanvas(x)->name)), 2);
canvas_deletelinesfor(x,(t_text *)y);
x->boxes->remove_by_value(y);
***************
*** 2057,2061 ****
pd_free(y);
if (chkdsp) canvas_update_dsp();
! if (drawcommand) canvas_redrawallfortemplate(template_findbyname(canvas_makebindsym(canvas_getcanvas(x)->name)), 1);
}
--- 2037,2041 ----
pd_free(y);
if (chkdsp) canvas_update_dsp();
! //if (drawcommand) canvas_redrawallfortemplate(template_findbyname(canvas_makebindsym(canvas_getcanvas(x)->name)), 1);
}
***************
*** 3790,3794 ****
/* if there's none, we just replace the template with our own and conform it. */
t_template *y = template_new(&s_, argc, argv);
! canvas_redrawallfortemplate(t, 2);
/* Unless the new template is different from the old one, there's nothing to do. */
if (!template_match(t, y)) {
--- 3770,3774 ----
/* if there's none, we just replace the template with our own and conform it. */
t_template *y = template_new(&s_, argc, argv);
! //canvas_redrawallfortemplate(t, 2);
/* Unless the new template is different from the old one, there's nothing to do. */
if (!template_match(t, y)) {
***************
*** 3800,3804 ****
pd_free(y);
t->list = x;
! canvas_redrawallfortemplate(t, 1);
}
} else {
--- 3780,3784 ----
pd_free(y);
t->list = x;
! //canvas_redrawallfortemplate(t, 1);
}
} else {
***************
*** 3834,3838 ****
t_template *t = x->t;
if (x == t->list) {
! canvas_redrawallfortemplate(t, 2);
if (x->next) {
/* if we were first on the list, and there are others on the list, make a new template corresponding
--- 3814,3818 ----
t_template *t = x->t;
if (x == t->list) {
! //canvas_redrawallfortemplate(t, 2);
if (x->next) {
/* if we were first on the list, and there are others on the list, make a new template corresponding
***************
*** 3846,3850 ****
for (t_gtemplate *y=z->list; y ; y=y->next) y->t=z;
} else t->list = 0;
! canvas_redrawallfortemplate(t, 1);
} else {
t_gtemplate *x2, *x3;
--- 3826,3830 ----
for (t_gtemplate *y=z->list; y ; y=y->next) y->t=z;
} else t->list = 0;
! //canvas_redrawallfortemplate(t, 1);
} else {
t_gtemplate *x2, *x3;
More information about the Pd-cvs
mailing list