On Mon, 5 Apr 1999, Bob Ebert wrote:

> I like the idea of having a callback mechanism.  Probably we could make do
> with just one call-back hook that gets called once before any form stuff
> was drawn but after the erase, once for each gadget, and once after all the
> form stuff was drawn.

We've done without callbacks so far (except for the sort functions and the
form handler functions), and I think I'd like to see it stay that way. But
maybe we could get a new set of events for gadgets, or a new event filter
function that makes it easy to generate events for gadgets.

> It would be up to you to figure out how to draw the gadget, but you could
> do your own dispatching using data from the gadget.  Not very C++, I admit,
> but it only costs 4 bytes per form, and I think we might be able to manage
> that.

Create, redraw, pen-down inside, and destroy are probably all we need. I
think we can skip cursor focus just for the moment. 

> An alternative solution would be to create a frmDrawObject event that would
> get passed to the form's event handler.  That's sort of nice because it
> doesn't change any data structures and probably won't break any apps.
> ...but it's a lot more overhead, and I think it requires the form's event
> handler to be reentrant.
> 
> Any more ideas?

A sub-handler?
"case frmGadget: FrmHandleGadgets(myGadgetEventHandlerFunc)", perhaps?

It feels like it would also make sense for FrmHandleGadgets() to take
care, intrinsically, of drawing purely graphical thingies like rectangles
and lines. 

-- 
Kenneth Albanowski ([EMAIL PROTECTED], CIS: 70705,126)


Reply via email to