summaryrefslogtreecommitdiff
path: root/apps/plugins/pdbox/PDa/src/g_text.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/pdbox/PDa/src/g_text.c')
-rw-r--r--apps/plugins/pdbox/PDa/src/g_text.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/apps/plugins/pdbox/PDa/src/g_text.c b/apps/plugins/pdbox/PDa/src/g_text.c
index ece0f58763..63105c0aa9 100644
--- a/apps/plugins/pdbox/PDa/src/g_text.c
+++ b/apps/plugins/pdbox/PDa/src/g_text.c
@@ -814,10 +814,10 @@ static void gatom_param(t_gatom *x, t_symbol *sel, int argc, t_atom *argv)
814 /* ---------------- gatom-specific widget functions --------------- */ 814 /* ---------------- gatom-specific widget functions --------------- */
815static void gatom_getwherelabel(t_gatom *x, t_glist *glist, int *xp, int *yp) 815static void gatom_getwherelabel(t_gatom *x, t_glist *glist, int *xp, int *yp)
816{ 816{
817 int x1, y1, x2, y2, width, height; 817 int x1, y1, x2, y2 /*, width, height */;
818 text_getrect(&x->a_text.te_g, glist, &x1, &y1, &x2, &y2); 818 text_getrect(&x->a_text.te_g, glist, &x1, &y1, &x2, &y2);
819 width = x2 - x1; 819 /* width = x2 - x1; */
820 height = y2 - y1; 820 /* height = y2 - y1; */
821 if (x->a_wherelabel == ATOM_LABELLEFT) 821 if (x->a_wherelabel == ATOM_LABELLEFT)
822 { 822 {
823 *xp = x1 - 3 - 823 *xp = x1 - 3 -
@@ -1265,9 +1265,9 @@ static t_widgetbehavior gatom_widgetbehavior =
1265void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime, 1265void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime,
1266 char *tag, int x1, int y1, int x2, int y2) 1266 char *tag, int x1, int y1, int x2, int y2)
1267{ 1267{
1268 int n = obj_noutlets(ob), nplus = (n == 1 ? 1 : n-1), i;
1269#ifdef ROCKBOX 1268#ifdef ROCKBOX
1270 (void) glist; 1269 (void) glist;
1270 (void) ob;
1271 (void) firsttime; 1271 (void) firsttime;
1272 (void) tag; 1272 (void) tag;
1273 (void) x1; 1273 (void) x1;
@@ -1275,11 +1275,12 @@ void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime,
1275 (void) x2; 1275 (void) x2;
1276 (void) y2; 1276 (void) y2;
1277#else /* ROCKBOX */ 1277#else /* ROCKBOX */
1278 int n = obj_noutlets(ob), i;
1278 int width = x2 - x1; 1279 int width = x2 - x1;
1279#endif /* ROCKBOX */ 1280 int nplus = (n == 1 ? 1 : n-1);
1281
1280 for (i = 0; i < n; i++) 1282 for (i = 0; i < n; i++)
1281 { 1283 {
1282#ifndef ROCKBOX
1283 int onset = x1 + (width - IOWIDTH) * i / nplus; 1284 int onset = x1 + (width - IOWIDTH) * i / nplus;
1284 if (firsttime) 1285 if (firsttime)
1285 sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %so%d\n", 1286 sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %so%d\n",
@@ -1292,13 +1293,12 @@ void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime,
1292 glist_getcanvas(glist), tag, i, 1293 glist_getcanvas(glist), tag, i,
1293 onset, y2 - 1, 1294 onset, y2 - 1,
1294 onset + IOWIDTH, y2); 1295 onset + IOWIDTH, y2);
1295#endif /* ROCKBOX */
1296 } 1296 }
1297
1297 n = obj_ninlets(ob); 1298 n = obj_ninlets(ob);
1298 nplus = (n == 1 ? 1 : n-1); 1299 nplus = (n == 1 ? 1 : n-1);
1299 for (i = 0; i < n; i++) 1300 for (i = 0; i < n; i++)
1300 { 1301 {
1301#ifndef ROCKBOX
1302 int onset = x1 + (width - IOWIDTH) * i / nplus; 1302 int onset = x1 + (width - IOWIDTH) * i / nplus;
1303 if (firsttime) 1303 if (firsttime)
1304 sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %si%d\n", 1304 sys_vgui(".x%x.c create rectangle %d %d %d %d -tags %si%d\n",
@@ -1311,15 +1311,15 @@ void glist_drawiofor(t_glist *glist, t_object *ob, int firsttime,
1311 glist_getcanvas(glist), tag, i, 1311 glist_getcanvas(glist), tag, i,
1312 onset, y1, 1312 onset, y1,
1313 onset + IOWIDTH, y1 + EXTRAPIX); 1313 onset + IOWIDTH, y1 + EXTRAPIX);
1314#endif /* ROCKBOX */
1315 } 1314 }
1315#endif /* ROCKBOX */
1316} 1316}
1317 1317
1318void text_drawborder(t_text *x, t_glist *glist, 1318void text_drawborder(t_text *x, t_glist *glist,
1319 char *tag, int width2, int height2, int firsttime) 1319 char *tag, int width2, int height2, int firsttime)
1320{ 1320{
1321 t_object *ob; 1321 t_object *ob;
1322 int x1, y1, x2, y2, width, height; 1322 int x1, y1, x2, y2 /* , width, height */;
1323 1323
1324#ifdef ROCKBOX 1324#ifdef ROCKBOX
1325 (void) width2; 1325 (void) width2;
@@ -1327,8 +1327,8 @@ void text_drawborder(t_text *x, t_glist *glist,
1327#endif 1327#endif
1328 1328
1329 text_getrect(&x->te_g, glist, &x1, &y1, &x2, &y2); 1329 text_getrect(&x->te_g, glist, &x1, &y1, &x2, &y2);
1330 width = x2 - x1; 1330 /* width = x2 - x1; */
1331 height = y2 - y1; 1331 /* height = y2 - y1; */
1332 if (x->te_type == T_OBJECT) 1332 if (x->te_type == T_OBJECT)
1333 { 1333 {
1334#ifndef ROCKBOX 1334#ifndef ROCKBOX