Re: GTK architecture



On Fri, 2003-02-14 at 16:17, Ernst De Ridder wrote:
> I've just begun examining the architecture of gtk, and was a bit shocked to
> find out that all event handling is hardcoded in the widgets. Am I missing
> something here?
> 
> If yes, what? If no, how did this happen and are there any plans to remedy
> this? 

No, there are no plans to "remedy" this.

Xt style hyper-configurability of event handling just means that you
never get it _exactly_ right, because you can't represent all the
fine details without code. (E.g, the menu handling in GTK+ doesn't
remotely fall into the pattern of "invoke this action when you
click on this widget with this button", it takes into account where
the mouse is clicked, _when_ it is clicked, and how it is moved.)

The Tk approach of putting the event handling details in interpreted
code is more reasonable, if you happen to have a standard interpreted
language available.

In the end, the only point in making event handling configurable
at a microscopic detail is a small amount of development convenience
for the library; users don't change this stuff, and when application
developers change it, it's almost always a bad idea.

What we are concerned with in GTK+ is making the event behavior
exactly right out of the box.

Regards,
                                                 Owen

[ Note that key bindings aren't at all hardcoded in GTK+ ]




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]