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