Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20057
Modified Files:
Tag: devel_0_39
desire.c desire.h
Log Message:
removed gobj_getrect and stuff.
Index: desire.h
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.h,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -C2 -d -r1.1.2.9 -r1.1.2.10
*** desire.h 2 Sep 2006 06:44:55 -0000 1.1.2.9
--- desire.h 2 Sep 2006 07:23:13 -0000 1.1.2.10
***************
*** 368,373 ****
--- 368,375 ----
/* ------------------- functions on any gobj ----------------------------- */
+ /*
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);
***************
*** 484,488 ****
--- 486,492 ----
EXTERN void canvas_resortoutlets(t_canvas *x);
EXTERN void canvas_free(t_canvas *x);
+ /*
EXTERN void canvas_updatewindowlist( void);
+ */
EXTERN void canvas_editmode(t_canvas *x, t_floatarg yesplease);
EXTERN int canvas_isabstraction(t_canvas *x);
***************
*** 493,498 ****
--- 497,504 ----
EXTERN void canvas_rename(t_canvas *x, t_symbol *s, t_symbol *dir);
EXTERN void canvas_loadbang(t_canvas *x);
+ /*
EXTERN int canvas_hitbox(t_canvas *x, t_gobj *y, int xpos, int ypos,
int *x1p, int *y1p, int *x2p, int *y2p);
+ */
EXTERN int canvas_setdeleting(t_canvas *x, int flag);
EXTERN int canvas_getindex(t_canvas *x, t_gobj *y);
Index: desire.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v
retrieving revision 1.1.2.133
retrieving revision 1.1.2.134
diff -C2 -d -r1.1.2.133 -r1.1.2.134
*** desire.c 2 Sep 2006 07:11:32 -0000 1.1.2.133
--- desire.c 2 Sep 2006 07:23:12 -0000 1.1.2.134
***************
*** 1264,1272 ****
/* ---------------- generic widget behavior ------------------------- */
- void gobj_getrect(t_gobj *x, t_glist *glist, int *x1, int *y1, int *x2, int *y2) {
- t_widgetbehavior *w = x->g_pd->c_wb;
- if (w && w->w_getrectfn) w->w_getrectfn(x, glist, x1, y1, x2, y2);
- }
-
void gobj_displace(t_gobj *x, t_glist *glist, int dx, int dy) {
t_widgetbehavior *w = x->g_pd->c_wb;
--- 1264,1267 ----
***************
*** 2509,2558 ****
}
- /*
- static void array_getrect(t_array *array, t_glist *glist,
- int *xp1, int *yp1, int *xp2, int *yp2)
- {
- float x1 = 0x7fffffff, y1 = 0x7fffffff, x2 = -0x7fffffff, y2 = -0x7fffffff;
- t_canvas *elemtemplatecanvas;
- t_template *elemtemplate;
- int elemsize, yonset, wonset, xonset, i;
-
- if (!array_getfields(array->a_templatesym, &elemtemplatecanvas,
- &elemtemplate, &elemsize, 0, 0, 0, &xonset, &yonset, &wonset))
- {
- int incr;
- // if it has more than 2000 points, just check 300 of them.
- if (array->a_n < 2000)
- incr = 1;
- else incr = array->a_n / 300;
- for (i = 0; i < array->a_n; i += incr)
- {
- float pxpix, pypix, pwpix;
- array_getcoordinate(glist, (char *)(array->a_vec) +
- i * elemsize,
- xonset, yonset, wonset, i, 0, 0, 1,
- 0, 0, 0,
- &pxpix, &pypix, &pwpix);
- if (pwpix < 2) pwpix = 2;
- if (pxpix < x1) x1 = pxpix;
- if (pxpix > x2) x2 = pxpix;
- if (pypix - pwpix < y1) y1 = pypix - pwpix;
- if (pypix + pwpix > y2) y2 = pypix + pwpix;
- }
- }
- *xp1 = x1;
- *yp1 = y1;
- *xp2 = x2;
- *yp2 = y2;
- }
- */
-
/* -------------------- widget behavior for garray ------------ */
- static void garray_getrect(t_gobj *z, t_glist *glist, int *xp1, int *yp1, int *xp2, int *yp2) {
- t_garray *x = (t_garray *)z;
- gobj_getrect(&x->x_scalar->sc_gobj, glist, xp1, yp1, xp2, yp2);
- }
-
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) {}
--- 2504,2509 ----
***************
*** 2613,2617 ****
t_widgetbehavior garray_widgetbehavior =
{
! garray_getrect,
garray_displace,
garray_select,
--- 2564,2568 ----
t_widgetbehavior garray_widgetbehavior =
{
! 0,
garray_displace,
garray_select,
***************
*** 2959,2963 ****
static void graph_vis(t_gobj *gr, t_glist *unused_glist, int vis);
static void graph_graphrect(t_gobj *z, t_glist *glist, int *xp1, int *yp1, int *xp2, int *yp2);
- static void graph_getrect (t_gobj *z, t_glist *glist, int *xp1, int *yp1, int *xp2, int *yp2);
void canvas_drawredrect(t_canvas *x, int doit);
--- 2910,2913 ----
***************
*** 3201,3209 ****
t_inlet *ip;
for (vp = vec, xmax = -0x7fffffff, maxp = 0, j = ninlets; j--; vp++) {
! int x1, y1, x2, y2;
t_gobj *g = *vp;
if (!g) continue;
! gobj_getrect(g, x, &x1, &y1, &x2, &y2);
! if (x1 > xmax) xmax = x1, maxp = vp;
}
if (!maxp) break;
--- 3151,3159 ----
t_inlet *ip;
for (vp = vec, xmax = -0x7fffffff, maxp = 0, j = ninlets; j--; vp++) {
! int x1;
t_gobj *g = *vp;
if (!g) continue;
! x1 = ((t_text *)g)->te_xpix;
! if (x1 > xmax) {xmax = x1; maxp = vp;}
}
if (!maxp) break;
***************
*** 3250,3257 ****
t_outlet *ip;
for (vp = vec, xmax = -0x7fffffff, maxp = 0, j = noutlets; j--; vp++) {
! int x1, y1, x2, y2;
t_gobj *g = *vp;
if (!g) continue;
! gobj_getrect(g, x, &x1, &y1, &x2, &y2);
if (x1 > xmax) xmax = x1, maxp = vp;
}
--- 3200,3207 ----
t_outlet *ip;
for (vp = vec, xmax = -0x7fffffff, maxp = 0, j = noutlets; j--; vp++) {
! int x1;
t_gobj *g = *vp;
if (!g) continue;
! x1 = ((t_text *)g)->te_xpix;
if (x1 > xmax) xmax = x1, maxp = vp;
}
***************
*** 3441,3445 ****
/*if (vis && canvas_showtext(x))
rtext_draw(glist_findrtext(parent_glist, &x->gl_obj));*/
! graph_getrect(gr, parent_glist, &x1, &y1, &x2, &y2);
/*if (!vis)
rtext_erase(glist_findrtext(parent_glist, &x->gl_obj));*/
--- 3391,3397 ----
/*if (vis && canvas_showtext(x))
rtext_draw(glist_findrtext(parent_glist, &x->gl_obj));*/
! x1=y1=69;
! x2=y2=242;
! /*graph_getrect(gr, parent_glist, &x1, &y1, &x2, &y2);*/
/*if (!vis)
rtext_erase(glist_findrtext(parent_glist, &x->gl_obj));*/
***************
*** 3556,3613 ****
}
- /* get the rectangle, enlarged to contain all the "contents" --
- meaning their formal bounds rectangles. */
- static void graph_getrect(t_gobj *z, t_glist *glist,
- int *xp1, int *yp1, int *xp2, int *yp2)
- {
- int x1 = 0x7fffffff, y1 = 0x7fffffff, x2 = -0x7fffffff, y2 = -0x7fffffff;
- t_glist *x = (t_glist *)z;
- if (x->gl_isgraph)
- {
- int hadwindow;
- t_gobj *g;
- t_text *ob;
- int x21, y21, x22, y22;
-
- graph_graphrect(z, glist, &x1, &y1, &x2, &y2);
- if (canvas_showtext(x))
- {
- text_widgetbehavior.w_getrectfn(z, glist, &x21, &y21, &x22, &y22);
- if (x22 > x2)
- x2 = x22;
- if (y22 > y2)
- y2 = y22;
- }
- if (!x->gl_goprect)
- {
- /* expand the rectangle to fit in text objects; this applies only
- to the old (0.37) graph-on-parent behavior. */
- /* lie about whether we have our own window to affect gobj_getrect
- calls below. */
- hadwindow = x->gl_havewindow;
- x->gl_havewindow = 0;
- for (g = x->gl_list; g; g = g->g_next)
- if ((!(ob = pd_checkobject(&g->g_pd))) || text_shouldvis(ob, x))
- {
- /* don't do this for arrays, just let them hang outside the
- box. */
- if (pd_class(&g->g_pd) == garray_class)
- continue;
- gobj_getrect(g, x, &x21, &y21, &x22, &y22);
- if (x22 > x2)
- x2 = x22;
- if (y22 > y2)
- y2 = y22;
- }
- x->gl_havewindow = hadwindow;
- }
- }
- else text_widgetbehavior.w_getrectfn(z, glist, &x1, &y1, &x2, &y2);
- *xp1 = x1;
- *yp1 = y1;
- *xp2 = x2;
- *yp2 = y2;
- }
-
static void graph_displace(t_gobj *z, t_glist *glist, int dx, int dy) {
t_glist *x = (t_glist *)z;
--- 3508,3511 ----
***************
*** 3709,3713 ****
t_widgetbehavior graph_widgetbehavior =
{
! graph_getrect,
graph_displace,
graph_select,
--- 3607,3611 ----
t_widgetbehavior graph_widgetbehavior =
{
! 0,
graph_displace,
graph_select,
***************
*** 8230,8234 ****
int pd_pickle(t_foo *foo, char *fmt, ...);
int pd_savehead(t_binbuf *b, void /*t_iemgui*/ *x, char *name);
- void iemgui_getrect(t_gobj *z, t_glist *glist, int *xp1, int *yp1, int *xp2, int *yp2);
#ifdef MSW
--- 8128,8131 ----
***************
*** 8251,8255 ****
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);
- static void text_getrect (t_gobj *z, t_glist *glist, int *xp1, int *yp1, int *xp2, int *yp2);
void canvas_startmotion(t_canvas *x);
--- 8148,8151 ----
***************
*** 8660,8667 ****
}
- static void text_getrect(t_gobj *z, t_glist *glist, int *xp1, int *yp1, int *xp2, int *yp2) {
- *xp1 = *yp1 = *xp2 = *yp2 = 42; /* desire */
- }
-
static void text_displace(t_gobj *z, t_glist *glist, int dx, int dy) {
t_text *x = (t_text *)z;
--- 8556,8559 ----
***************
*** 8738,8743 ****
/* this one is for everyone but "gatoms"; it's imposed in m_class.c */
t_widgetbehavior text_widgetbehavior = {
! text_getrect, text_displace, text_select,
! text_activate, text_delete, text_vis, 0,
};
--- 8630,8634 ----
/* 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,
};