Re: [gtk-list] Re: key bind class



From: Owen Taylor <otaylor@redhat.com>

>You might want to look at:
>
>  http://archive.redhat.com/gtk-list/1998-July/0525.html
>
>That briefly summerizes the "binding" system for GTK+.
>The binding system is intended for doing things like
>setting up keystroke bindings for Entry and Text widgets.

What if an application wants to be notified by a key stroke, which has no
relation whatsoever to an existing widget? Should it listen to
key_press_event's or it is possible to use the new GTK binding system or the
existing accelerator system?

>Neither of the systems allow multiple key sequences, of course,
>and there is no builtin abstraction that would allow modifying
>toolbars to activate menu items, so it isn't really exactly
>what you are talking about with your commandapp.

In the command API, configurability is archived through separating menus,
toolbars and key bindings as much as possible. A toolbar button or key
binding cannot rely on the existance of a certain menu item. In the future,
toolbars and menubar will be the same - it's up to the user to decide what
his toolbar/menubar should look like. The key binding shown in a menu item
is looked up in the list of key bindings, but otherwise there is not a
specific key binding for a menu item.

>However,
>there is enough overlap there that more comprehensive systems
>should possibly be built on top of these facilities instead
>of being put into GTK+ along side.

Again, what facility should I use? Right now the key parser class I created
listens to
key_press_events of widgets (usually the main window). Do you suggest I
change to a different system?

Regards,
Oskar Liljeblad (osk@hem.passagen.se)






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