Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!swrinde!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!decuac!ufp.dco.dec.com!murphy From: murphy@ufp.dco.dec.com (Rick Murphy) Newsgroups: comp.windows.x Subject: Re: DECwindows (XUI) novice question Message-ID: <1990Oct19.105434@ufp.dco.dec.com> Date: 19 Oct 90 14:54:34 GMT References: <1990Oct18.180103@mccall.com> Sender: news@decuac.dec.com (Network News) Reply-To: murphy@burfle.dco.dec.com Organization: Digital Equipment Corporation, Landover MD Lines: 29 In article <1990Oct18.180103@mccall.com>, tp@mccall.com (Terry Poot) writes: >We are trying to convert an application from VWS to DECwindows. ... >Now the problem: the only callback in the window widget is an expose callback. >This would be fine for a static graphic display, but this is an _interactive_ >graphics application. The user can grab objects and move them, or select them >and then by hitting various keyboard keys, he does various operations on them >(for the curious, the application places pattern pieces on a printing plate). Use the translation mechanism. For example, compile a translation table containing : your-routine() and add the compiled translations to the window widget's argument list when you create it. You can use the translation mechanism to handle callbacks for mouse actions, keystrokes, and so forth. Should be adequate to handle whatever you need. >Bonus question (assuming the above problem is solvable): how do I manage which >widget controls the keyboard? XtCallAcceptFocus(widget-to-get-the-focus, ×tamp) -Rick -- Rick Murphy, WA1SPT/4 DEC Washington ULTRIX Resource Center Domain: murphy@ufp.dco.dec.com -or- murphy@ufp.enet.dec.com Bang: decwrl!ufp.enet!murphy Ding: (301) 306-2985 Disclaimer: This nonsense came from an AI program written in TECO. Ignore it.