Thread View: comp.windows.interviews
2 messages
2 total messages
Started by Jay Gowdy
Sun, 20 Dec 1992 21:06
InputHandlers and margins
Author: Jay Gowdy
Date: Sun, 20 Dec 1992 21:06
Date: Sun, 20 Dec 1992 21:06
37 lines
1859 bytes
1859 bytes
I have a very simple IV question that's been bugging me for a while:
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));
Note that I have to do the margining myself here with an hbox, but
the input handler acts as I expect it, i.e., as soon as the mouse
enters the frame, the enter callback is invoked.
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.
Jay
Re: InputHandlers and margins
Author: Mark Linton
Date: Mon, 21 Dec 1992 22:51
Date: Mon, 21 Dec 1992 22:51
35 lines
2383 bytes
2383 bytes
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.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads