Re: How to catch "mouse leave" event ?
Two things come to mind:
1) As Espen suggested, put the button in a pinboard-layout, register
for mouse motion, and see if you can't combine WITH-GEOMETRY and the
x, y coordinates passed to the event handler to get the behavior you
want.
2) If you're feeling bold, and the above solution doesn't work, you
can always get at the underlying representation of a CAPI widget and
try to play around with that. For example, on the Win32 personal
ediition (I assume you're using Windows from your mention of
WM_MOUSELEAVE):
CL-USER 4 > (capi-internals:representation (capi:contain
(make-instance 'capi:push-button)))
#<Representation CAPI-WIN32-LIB::R-PUSHBUTTON #<CAPI:PUSH-BUTTON "NIL"
200EF747>>
and you can use the Inspector to see if that's useful to you. Perhaps
it isn't, though, as I'm not sure how you'd hook a message handler
into a button on Windows if there's already an event handler
defined...
On 2/16/07, Lisper <lisptracker@mail.ru> wrote:
>
> I am afraid you are right. ;-( There is starting long term project where
> Lisp would be perfect choice, but one of the key requirements is specific
> GUI with flat buttons, etc. I can implement much of missing GUI elements,
> but need more control. I see in QT library that same functionality is
> implemented using WM_MOUSELEAVE notifications.
>
> ----- Original Message -----
> From: "Bill Atkins" <atkinw@rpi.edu>
> To: "Lisper" <lisptracker@mail.ru>
> Sent: Friday, February 16, 2007 11:13 PM
> Subject: Re: How to catch "mouse leave" event ?
>
>
> > On 2/16/07, Lisper <lisptracker@mail.ru> wrote:
> >> It is doesn't solve whole problem. It captures mouse motion only within
> >> the
> >> pane, but it don't catch a moment when mouse leave the pane. Toolbar
> >> buttons
> >> somehow know when mouse leaves toolbar area. How do they know that ?
> >
> > Presumably because toolbars are implemented as native widgets, and
> > native toolbar buttons know how to do that.
> >
> > --
> > Bill Atkins
> >
>
>
--
Bill Atkins