From cd7351501a5cd83bf0609ff855671f33c99e580d Mon Sep 17 00:00:00 2001 From: lecoanet Date: Wed, 20 Sep 2006 12:32:11 +0000 Subject: Added the collapsemotions command. --- generic/tkZinc.c | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) (limited to 'generic') 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: -- cgit v1.1