Re: [Ongui-dev] event model
Status: Alpha
Brought to you by:
robinrowe
|
From: Robin R. <ro...@Mo...> - 2003-11-17 21:19:05
|
Mike, > ...I started a new job among other things. That's great! Congratulations! > On a lighter note, I think I've now convinced myself that your > "simple" event model will work even for advanced applications > (initially I was hesitant, if you remember, and was considering > pushing a listener event model). So: never mind. Consider me a > convert. Whoo hoo! Glad to hear that! My issue with listener architectures is they expose users to too much plumbing. The OnGui model as implemented in the gfx prototype is not as restrictive as it seems at first glance. There are three mechanisms implemented in the architecture to enable covering all event contingencies efficiently: 1.) The ususal case where you want to catch the dozen or so typical GUI events. Applies 98% of the time. In OnGui the generic event model just magically is there, no plumbing. Simply call the virtual On handler for your event. However, what if you need to catch an atypical event without a specific On handler in the generic model? 2.) The case where you want an atypical event in addition to the typical events. There is a catch-all On handler at the bottom of the generic event system. You can trap it there easily. But, what if that is too inefficient? 3.) The case where the catch-all handler and generic event system invoke too much overhead, that you only want to catch specific events, to tune the event model for maximum performance. In that case you write your own master event handler and call the method that installs that in place of the generic master handler for that window. Gives full access to plumbing when you need it. > In any case, I know we briefly discussed what low-level library to > use. If you have no objections, I'd like to initially use GDK, since > this is already ported (or being ported) to the platforms you > specified. I think you are right. Proceed using GDK unless we discover a strong reason not to. Cheers, Robin --------------------------------------------------------------------------- Rob...@Mo... Hollywood, California www.CinePaint.org Free motion picture and still image editing software |