Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!usc!samsung!emory!ogccse!cvedc!nosun!fpssun!celit!ucsdhub!hp-sdd!hplabs!hplabsz!mayer From: mayer@hplabsz.HPL.HP.COM (Niels Mayer) Newsgroups: comp.windows.x Subject: Re: intercepting a call to XtAddCallback Message-ID: <4322@hplabsz.HPL.HP.COM> Date: 8 Nov 89 02:20:31 GMT References: <1792@gazette.bcm.tmc.edu> Reply-To: mayer@hplabs.hp.com (Niels Mayer) Organization: Hewlett-Packard Labs, Software Technology Lab, Palo Alto, CA. Lines: 38 Summary: Expires: Sender: Followup-To: In article <1792@gazette.bcm.tmc.edu> jcarson@moniz.bcm.tmc.edu (Janet Carson) writes: >I am writing a widget which is essentially a "wrapper" around >several subwidgets. By using intialize_hook and set_values_hook, >I pass the arguments for "my widget" on to the subwidget which >"really" wants them. However, I have a problem with callbacks. > ... >Is there any way for a widget to intercept a call to XtAddCallback >and re-direct it to another widget? Take a look at the implementation of the Motif RowColumn manager. If you specify an XmNentryCallback, all activate events on the rowcolumn widget's children (aka entries) will be handled by the rowcolumn widget. Here's the relevant source code... please don't look at it if you don't have a source licence.... ...Ha ha ha.... just joking... If I did that, I'd have lawyers swarming over me like a halo-of-flies on dung. ------------------------------------------------------------------------------- Niels Mayer -- hplabs!mayer -- mayer@hplabs.hp.com Human-Computer Interaction Department Hewlett-Packard Laboratories Palo Alto, CA. *