[linux-audio-dev] Re: a bit off topic: GUI-lib-programming (how does it usually work?)

From: Loki Davison <loki.davison@email-addr-hidden>
Date: Sun Mar 05 2006 - 17:00:10 EET

On 3/6/06, Julien Claassen <julien@email-addr-hidden-lab.de> wrote:
> Hi!
> I know, this may be a bit off topic. But I've a dificulty:
> I'm currently programming a textbase "GUI"-lib. I want the programming API
> to be similar to on of a real GUI-lib (gtk, you name them).
> Now I'm wondering, there are menus. Menus have menuitems and if you click
> on
> one, something should happen. How is this "something should happen" part
> usually done?

It's done by registering a call back. In current gtk versions this is
done by having actions and they have a label and are associated with a
particular function. Using the python bindings
http://www.pygtk.org/pygtk2tutorial/sec-UIManager.html explains the
general idea for menus. There is an example there. All buttons etc in
gtk work the same i.e with call backs being registered.

Loki
Received on Sun Mar 5 20:15:07 2006

This archive was generated by hypermail 2.1.8 : Sun Mar 05 2006 - 20:15:07 EET