aboutsummaryrefslogtreecommitdiff
path: root/pddp
diff options
context:
space:
mode:
authorN.N. <krzyszcz@users.sourceforge.net>2005-06-13 20:41:52 +0000
committerN.N. <krzyszcz@users.sourceforge.net>2005-06-13 20:41:52 +0000
commit4155426928eab2265d78f4860c35e09057dde840 (patch)
treed261c307f9d6d3f1d34a4ed3fafde7420d0d227a /pddp
parentaebe147ae46e27127faa5c9d777de6b9ab822cc9 (diff)
toxy alpha19 and pddp alpha3 (see notes.txt for toxy and pddp)
svn path=/trunk/externals/miXed/; revision=3170
Diffstat (limited to 'pddp')
-rw-r--r--pddp/build_counter4
-rw-r--r--pddp/notes.txt6
-rw-r--r--pddp/pddplink.c31
3 files changed, 28 insertions, 13 deletions
diff --git a/pddp/build_counter b/pddp/build_counter
index 627f0ec..9a4c0ab 100644
--- a/pddp/build_counter
+++ b/pddp/build_counter
@@ -1,7 +1,7 @@
#define PDDP_VERSION "0.1"
#define PDDP_RELEASE "alpha"
-#define PDDP_BUILD 2
+#define PDDP_BUILD 3
#if 0
-PDDP_SNAPSHOT = 0.1-alpha2
+PDDP_SNAPSHOT = 0.1-alpha3
#endif
diff --git a/pddp/notes.txt b/pddp/notes.txt
index 168f51e..f087ed8 100644
--- a/pddp/notes.txt
+++ b/pddp/notes.txt
@@ -4,6 +4,12 @@ TODO for pddp
DONE for pddp
+alpha3
+ * .pd back-link tries not to open patches that are already open:
+ if a patch window already exists, it is raised and given focus instead
+ * new option "-gop" (visible in a gop)
+ * bug fix: unclickable in gop, unless visible
+
alpha2
* loading tcl scripts through "package require pddp":
. storing them in an immediate subdirectory of the path of pddplink's binary
diff --git a/pddp/pddplink.c b/pddp/pddplink.c
index d746bbd..307db62 100644
--- a/pddp/pddplink.c
+++ b/pddp/pddplink.c
@@ -25,6 +25,7 @@ typedef struct _pddplink
t_object x_ob;
t_glist *x_glist;
int x_isboxed;
+ int x_isgopvisible;
char *x_vistext;
int x_vissize;
int x_vislength;
@@ -113,23 +114,22 @@ static void pddplink_activate(t_gobj *z, t_glist *glist, int state)
static void pddplink_vis(t_gobj *z, t_glist *glist, int vis)
{
t_pddplink *x = (t_pddplink *)z;
+ t_rtext *y;
if (vis)
{
- if (glist->gl_havewindow)
+ if ((glist->gl_havewindow || x->x_isgopvisible)
+ && (y = glist_findrtext(glist, (t_text *)x)))
{
- t_rtext *y = glist_findrtext(glist, (t_text *)x);
rtext_draw(y);
sys_vgui(".x%lx.c itemconfigure %s -text {%s} -fill magenta\n",
- glist, rtext_gettag(y), x->x_vistext);
+ glist_getcanvas(glist), rtext_gettag(y), x->x_vistext);
}
}
else
{
- if (glist->gl_havewindow)
- {
- t_rtext *y = glist_findrtext(glist, (t_text *)x);
+ if ((glist->gl_havewindow || x->x_isgopvisible)
+ && (y = glist_findrtext(glist, (t_text *)x)))
rtext_erase(y);
- }
}
}
@@ -188,10 +188,15 @@ static void pddplink_click(t_pddplink *x, t_floatarg xpos, t_floatarg ypos,
static int pddplink_wbclick(t_gobj *z, t_glist *glist, int xpix, int ypix,
int shift, int alt, int dbl, int doit)
{
- if (doit)
- pddplink_click((t_pddplink *)z, (t_floatarg)xpix, (t_floatarg)ypix,
- (t_floatarg)shift, 0, (t_floatarg)alt);
- return (1);
+ t_pddplink *x = (t_pddplink *)z;
+ if (glist->gl_havewindow || x->x_isgopvisible)
+ {
+ if (doit)
+ pddplink_click(x, (t_floatarg)xpix, (t_floatarg)ypix,
+ (t_floatarg)shift, 0, (t_floatarg)alt);
+ return (1);
+ }
+ else return (0);
}
static int pddplink_isoption(char *name)
@@ -294,6 +299,7 @@ static void *pddplink_new(t_symbol *s, int ac, t_atom *av)
t_pddplink xgen, *x;
int skip;
xgen.x_isboxed = 0;
+ xgen.x_isgopvisible = 0;
xgen.x_vistext = 0;
xgen.x_vissize = 0;
if (xgen.x_ulink = pddplink_nextsymbol(ac, av, 0, &skip))
@@ -307,6 +313,8 @@ static void *pddplink_new(t_symbol *s, int ac, t_atom *av)
av += skip;
if (opt == gensym("-box"))
xgen.x_isboxed = 1;
+ else if (opt == gensym("-gop"))
+ xgen.x_isgopvisible = 1;
else if (opt == gensym("-text"))
{
t_symbol *nextsym = pddplink_nextsymbol(ac, av, 1, &skip);
@@ -323,6 +331,7 @@ static void *pddplink_new(t_symbol *s, int ac, t_atom *av)
x->x_dirsym = canvas_getdir(x->x_glist); /* FIXME */
x->x_isboxed = xgen.x_isboxed;
+ x->x_isgopvisible = xgen.x_isgopvisible;
x->x_vistext = xgen.x_vistext;
x->x_vissize = xgen.x_vissize;
x->x_vislength = (x->x_vistext ? strlen(x->x_vistext) : 0);