aboutsummaryrefslogtreecommitdiff
path: root/toxy/widget.c
diff options
context:
space:
mode:
authorN.N. <krzyszcz@users.sourceforge.net>2005-01-27 14:42:55 +0000
committerN.N. <krzyszcz@users.sourceforge.net>2005-01-27 14:42:55 +0000
commitbfb359fd22e61faaca3a6e49ad3b7a81f2d71551 (patch)
treed070071515c7e7f53073da32046b24855e8307c8 /toxy/widget.c
parent6435314717c5fb8fa062eb682c72c8df095b1be3 (diff)
cyclone alpha52 and toxy alpha15 (see notes.txt for cyclone, toxy and shared)
svn path=/trunk/externals/miXed/; revision=2550
Diffstat (limited to 'toxy/widget.c')
-rw-r--r--toxy/widget.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/toxy/widget.c b/toxy/widget.c
index 6700812..9481b89 100644
--- a/toxy/widget.c
+++ b/toxy/widget.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2003-2004 krzYszcz and others.
+/* Copyright (c) 2003-2005 krzYszcz and others.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
@@ -21,7 +21,7 @@
static t_class *makeshift_class;
#ifdef KRZYSZCZ
-#define WIDGET_DEBUG
+//#define WIDGET_DEBUG
//#define TOW_DEBUG
//#define WIDGET_PROFILE
#endif
@@ -77,7 +77,7 @@ typedef struct _widget
int x_width;
int x_height;
t_symbol *x_background;
- int x_hasstate;
+ int x_hasstate; /* no longer used, LATER rethink */
int x_disabled;
int x_selected;
int x_update; /* see widget_update() */
@@ -293,8 +293,9 @@ static void widget_displace(t_gobj *z, t_glist *glist, int dx, int dy)
t_widget *x = (t_widget *)z;
t_text *t = (t_text *)z;
#if 0
- post("displace %d %d (%d %d -> %d %d)",
- dx, dy, t->te_xpix, t->te_ypix, t->te_xpix + dx, t->te_ypix + dy);
+ loudbug_post("displace %d %d (%d %d -> %d %d)",
+ dx, dy, t->te_xpix, t->te_ypix,
+ t->te_xpix + dx, t->te_ypix + dy);
#endif
t->te_xpix += dx;
t->te_ypix += dy;
@@ -311,8 +312,8 @@ static void widget_select(t_gobj *z, t_glist *glist, int flag)
char *mypathname = widget_getmypathname(x, glist)->s_name;
if (flag)
{
- sys_vgui("%s config -bg blue %s\n", mypathname,
- (x->x_hasstate ? "-state disabled" : ""));
+ sys_vgui("%s config -bg blue\n", mypathname);
+ sys_vgui("event generate %s <<disable>>\n", mypathname);
x->x_selected = 1;
}
else
@@ -321,9 +322,9 @@ static void widget_select(t_gobj *z, t_glist *glist, int flag)
sys_vgui("%s config -bg %s\n", mypathname,
(x->x_background ? x->x_background->s_name : "gray"));
else
- sys_vgui("%s config -bg %s %s\n", mypathname,
- (x->x_background ? x->x_background->s_name : "gray"),
- (x->x_hasstate ? "-state normal" : ""));
+ sys_vgui("%s config -bg %s \n", mypathname,
+ (x->x_background ? x->x_background->s_name : "gray"));
+ sys_vgui("event generate %s <<enable>>\n", mypathname);
x->x_selected = 0;
}
}
@@ -342,7 +343,7 @@ static void widget_pushoptions(t_widget *x, int doit)
#ifdef WIDGET_DEBUG
int sz;
char *dp = scriptlet_getcontents(x->x_transient, &sz);
- post("vis: \"%s\"", dp);
+ loudbug_post("vis: \"%s\"", dp);
#endif
if (doit)
{
@@ -898,8 +899,7 @@ static void widget__inout(t_widget *x, t_floatarg f)
if (!x->x_selected)
{
char *mypathname = widget_getmypathname(x, x->x_glist)->s_name;
- if (x->x_hasstate)
- sys_vgui("%s config -state normal\n", mypathname);
+ sys_vgui("event generate %s <<enable>>\n", mypathname);
}
x->x_disabled = 0;
}
@@ -909,8 +909,7 @@ static void widget__inout(t_widget *x, t_floatarg f)
if (!x->x_selected)
{
char *mypathname = widget_getmypathname(x, x->x_glist)->s_name;
- if (x->x_hasstate)
- sys_vgui("%s config -state disabled\n", mypathname);
+ sys_vgui("event generate %s <<disable>>\n", mypathname);
}
x->x_disabled = 1;
}