Article View: comp.windows.interviews
Article #727event handler around a button IV3.1
From: Michael Bennett
Date: Fri, 02 Oct 1992 01:12
Date: Fri, 02 Oct 1992 01:12
28 lines
1937 bytes
1937 bytes
I want to create a MonoGlyph that can be used to supply help information about its body. Pressing the "help" key over the MonoGlyph will cause some action helpful to the user. At first I tried to do this by modifying the pick() function for my help glyph. This didn't work in my particular case because the body of the help glyph is a push_button. The Button, as an ActiveHandler, grabs events while the cursor is within the Button. It grabbed my keystroke events and ignored them. Shouldn't the Button somehow send along keystrokes since it doesn't care about them? And, possibly related, why does Handle::event() now return a boolean? What does it mean? Is this what the button event grabber should use to indicate that it didn't handle the keystroke event so it can be dispatched to someone who wants it? Next, I tried making my help glyph an InputHandler. This works great, now I get keystrokes, with the convenient keystroke() function. But, now the Button isn't getting any events. So, I played around with append_input_handler() and next_focus() but didn't get anwhere. Finally, I resorted to the fact that I knew my help glyph was arround a Button, and made the help glyph and ActiveHandler, and had it pass all but the keystroke events on to the Button. This works fine, but only in my very specific case. What if my help glyph surrounds a Box of two Buttons? Anyone know what I should be doing to accomplish this?
Technical Details
Message-ID:
<1992Oct2.011228.19895@redwood.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!ames!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!rpi!newsserver.pixel.kodak.com!psinntp!psinntp!redwood!newsShow Full Headers
Complete Article Headers
Newsgroups: comp.windows.interviews Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!ames!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!rpi!newsserver.pixel.kodak.com!psinntp!psinntp!redwood!news From: bennett@mozart.redwood.com (Michael Bennett) Subject: event handler around a button IV3.1 Message-ID: <1992Oct2.011228.19895@redwood.com> Sender: news@redwood.com Organization: Redwood Design Automation Date: Fri, 2 Oct 92 01:12:28 GMT Lines: 28