home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / windows / intervie / 3450 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  2.3 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!haven.umd.edu!ames!sgi!twilight!fido!marktwain.rad.sgi.com!linton
  2. From: linton@marktwain.rad.sgi.com (Mark Linton)
  3. Newsgroups: comp.windows.interviews
  4. Subject: Re: InputHandlers and margins
  5. Date: 21 Dec 1992 22:51:18 GMT
  6. Organization: sgi
  7. Lines: 35
  8. Distribution: world
  9. Message-ID: <1h5hp6INN815@fido.asd.sgi.com>
  10. References: <BzKtBn.F0F.1@cs.cmu.edu>
  11. Reply-To: linton@marktwain.rad.sgi.com (Mark Linton)
  12. NNTP-Posting-Host: marktwain.rad.sgi.com
  13.  
  14. In article <BzKtBn.F0F.1@cs.cmu.edu>, jayg+@CS.CMU.EDU (Jay Gowdy) writes:
  15. |> I have an ActiveHandler subclass that set's it's body as follows:
  16. |> 
  17. |> body(layout.fixed_span(kit.outset_frame(character_glyph
  18. |>                        size, size));
  19. |> 
  20. |> The problem is, events such as enter and leave only take place
  21. |> over the character glyph!  It seems that kit.outset_frame sets up a 
  22. |> margin around the glyph it contains, and events are not reported in
  23. |> the margins of glyphs for some odd reason.  Now it seems to me that
  24. |> this behaviour would be hard to implement, therefore there _must_ be
  25. |> some way to turn it off (yeah, I'm an optimist)!
  26. |> 
  27. |> By the way, for some other odd reason kit.bright_inset_frame does 
  28. |> _not_ put a margin around it's glyphs, and the following works fine:
  29. |> 
  30. |> body(layout.fixed_span(kit.bright_inset_frame(
  31. |>             layout.hbox(layout.hglue(),
  32. |>                         character_glyph,
  33. |>                         layout.hglue())), size, size));
  34. |> 
  35. |> I've noticed this behaviour in other glyphs that marginalize things,
  36. |> but its only been annoying, not critical, as it is in this case.  
  37. |> Please tell me 1) why this is happening 2) how I can stop it.
  38.  
  39. 1)  The why is a bit obscure.  It has to do with the last two parameters
  40. to the BevelFrame constructor and their affect on BevelFrame::pick.
  41. I'm not sure I can defend the pick behavior of bright_inset_frame and
  42. outset_frame being different, but that is why.  The reason the margin
  43. usage is different is that bright_inset_frame tries to allocate the margin
  44. from the body itself, as opposed to adding it.
  45.  
  46. 2)  This is easier.  The Target class is very useful for controlling pick
  47. behavior.  You can wrap a target around the body so that the entire
  48. body will be picked.  The TargetPrimitiveHit tag is the most useful.
  49.