[REBOL] Re: passing events between faces
From: james:mustard at: 4-Nov-2001 1:14
> What I am trying to get is if I click on the pass-plane over a button then
> that button will receive its normal events. The intention here is to
> this to any object on the underlying face - not just buttons.
heh.. self reply.. well only partially..
the following will pass the events to controls on another face - but does
not do their default responses - eg button presses, text focus etc.
work-form: layout/offset [
style abutton button with [feel: make feel [engage: func [f a e][either
within? e/offset f/offset f/size [insert f/texts e/offset show f][none]]]]
origin 0x0 space 0x0 abutton "A" abutton "B" abutton "C" abutton "D"
pass-plane: layout/size/offset  work-form/size 0x0
base-form: layout/size  work-form/size
pass-plane/effect: [colorize 255.0.0]
pass-plane/feel: make pass-plane/feel [engage: func [f a e][foreach o
work-form/pane [o/feel/engage o a e]]]
append base-form/pane work-form
append base-form/pane pass-plane
Is there a more efficient way to transfer events from a face to sub controls
on another face?