aboutsummaryrefslogtreecommitdiff
path: root/generic/tkZinc.c
diff options
context:
space:
mode:
authorlecoanet2006-09-20 12:32:11 +0000
committerlecoanet2006-09-20 12:32:11 +0000
commitcd7351501a5cd83bf0609ff855671f33c99e580d (patch)
tree9d584a18c49b564ef9269f1fd35ea60ed2bea525 /generic/tkZinc.c
parent654c0eb3f8d8ac65901bc0f64afa961951b34413 (diff)
downloadtkzinc-cd7351501a5cd83bf0609ff855671f33c99e580d.zip
tkzinc-cd7351501a5cd83bf0609ff855671f33c99e580d.tar.gz
tkzinc-cd7351501a5cd83bf0609ff855671f33c99e580d.tar.bz2
tkzinc-cd7351501a5cd83bf0609ff855671f33c99e580d.tar.xz
Added the collapsemotions command.
Diffstat (limited to 'generic/tkZinc.c')
-rw-r--r--generic/tkZinc.c34
1 files changed, 29 insertions, 5 deletions
diff --git a/generic/tkZinc.c b/generic/tkZinc.c
index 9b9dca1..736cebd 100644
--- a/generic/tkZinc.c
+++ b/generic/tkZinc.c
@@ -4082,8 +4082,8 @@ WidgetObjCmd(ClientData client_data, /* Information about the widget.
#endif
{
"add", "addtag", "anchorxy", "bbox", "becomes", "bind",
- "cget", "chggroup", "clone", "configure", "contour",
- "coords", "currentpart", "cursor", "dchars",
+ "cget", "chggroup", "clone", "collapsemotions", "configure",
+ "contour", "coords", "currentpart", "cursor", "dchars",
"dtag", "find", "fit", "focus", "gdelete",
"gettags", "gname", "group", "hasanchors", "hasfields",
"hastag", "index", "insert", "itemcget", "itemconfigure",
@@ -4095,9 +4095,9 @@ WidgetObjCmd(ClientData client_data, /* Information about the widget.
};
enum sub_cmds {
ZN_W_ADD, ZN_W_ADDTAG, ZN_W_ANCHORXY, ZN_W_BBOX, ZN_W_BECOMES, ZN_W_BIND,
- ZN_W_CGET, ZN_W_CHGGROUP, ZN_W_CLONE, ZN_W_CONFIGURE,
- ZN_W_CONTOUR, ZN_W_COORDS, ZN_W_CURRENTPART, ZN_W_CURSOR, ZN_W_DCHARS,
- ZN_W_DTAG, ZN_W_FIND, ZN_W_FIT, ZN_W_FOCUS, ZN_W_GDELETE,
+ ZN_W_CGET, ZN_W_CHGGROUP, ZN_W_CLONE, ZN_W_COLLAPSEMOTIONS,
+ ZN_W_CONFIGURE, ZN_W_CONTOUR, ZN_W_COORDS, ZN_W_CURRENTPART, ZN_W_CURSOR,
+ ZN_W_DCHARS, ZN_W_DTAG, ZN_W_FIND, ZN_W_FIT, ZN_W_FOCUS, ZN_W_GDELETE,
ZN_W_GETTAGS, ZN_W_GNAME, ZN_W_GROUP, ZN_W_HASANCHORS, ZN_W_HASFIELDS,
ZN_W_HASTAG, ZN_W_INDEX, ZN_W_INSERT, ZN_W_ITEMCGET, ZN_W_ITEMCONFIGURE,
ZN_W_LAYOUT, ZN_W_LOWER, ZN_W_MONITOR, ZN_W_NUMPARTS, ZN_W_POSTSCRIPT,
@@ -4622,6 +4622,30 @@ WidgetObjCmd(ClientData client_data, /* Information about the widget.
}
break;
/*
+ * collapsemotions
+ */
+ case ZN_W_COLLAPSEMOTIONS:
+ {
+ ZnBool collapse, current;
+
+ if ((argc != 2) && (argc != 3)) {
+ Tcl_WrongNumArgs(interp, 1, args, "collapsemotions ?boolean?");
+ goto error;
+ }
+ if (argc == 3) {
+ if (Tcl_GetBooleanFromObj(interp, args[2], &collapse) != TCL_OK) {
+ goto error;
+ }
+ current = Tk_CollapseMotionEvents(wi->dpy, collapse);
+ }
+ else {
+ current = Tk_CollapseMotionEvents(wi->dpy, 1);
+ Tk_CollapseMotionEvents(wi->dpy, current);
+ }
+ Tcl_SetObjResult(interp, Tcl_NewBooleanObj(current));
+ break;
+ }
+ /*
* configure
*/
case ZN_W_CONFIGURE: