[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Dec 9 18:06:05 1999 
Subject:Re: Adding an Enter/Leave Callback 
From:Aaron Sloman See text for reply address 
Volume-ID:991209.02 

[To reply replace "Aaron.Sloman.XX" with "A.Sloman"]

Robin Popplestone <pop@roo.cs.umass.edu> writes:

> Date: 9 Dec 1999 14:02:03 GMT

> I'm bashing my head against a wall trying to discover how to add
> a callback to a widget that handles the event of the pointer entering
> and leaving a widget. There are various events listed in various help files
> which appear relevant, but none are accepted by the widget.

Try this:

XptAddCallback(<widget>, XtN mouseEvent, <callback procedure>, <client data>, identfn);

or

XtAddCallback(<widget>, XtN mouseEvent, <callback procedure>, <client data>);

I found out about "mouseEvent" from REF XpwGraphic. I don't know if
it works for other kinds of widgets, e.g. motif widgets like
propsheet widgets etc.

I don't fully understand the difference between the two formats (as
explained in REF xt_callback).

The former format (using XptAddCallback) is used to handle all event
types in the RCLIB package and it seems to work. See
    http://www.cs.bham.ac.uk/research/poplog/rclib/lib/rc_mousepic.p

Aaron
===
-- 
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL A.Sloman AT cs.bham.ac.uk   (NB: Anti Spam address)
PAPERS: http://www.cs.bham.ac.uk/research/cogaff/