[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Pull down menus Was: Re: gEDA: Attributes
> Ah, while here and my net connection doesn't die, I've been
> thinking about the pulldown menus over the past few months. I would
> like to put the hotkeystrokes into the menus. That would unfortunately
> require a slight rewrite of the pulldown code, but while I'm doing that,
> I would also like a way to configure what goes into the pulldowns via
> scheme. Now I could come up with something that's not coupled to the
> current keymapping scheme code, but I would rather not have two different
> decoupled ways of specifying keymaps/functions. Any ideas on how this
> could be done (nicely)?
I have gone around thinking about this too for a month or something.
Stephen (Tell, yet another Stefan/Stephen/Steven/Steve :-) ) seemed to
have some nice ideas. My ideas has approached from the other direction,
sort to say.
Scheme functions (correctly defined) can take different number of
arguments. See for example function scm_make_gsubr used in
gnet3/src/g_register.c.. So if a function is called like in the key
mapping the functionallity is still the old one, but you could start to
add optional arguments to the functions like a list of selected objects or
similar.
Then the menu could be defined like the key mapping definitions (with
names,function to call, keymapping et al)and use it when using pull downs.
From that menu definition you could then create the keymapping maps.
This is more than a mouth full. That is why I have hesitated to bring up
the subject. And it is kind of blury too.
Regards,
/spe
/----------------------------------\
! Stefan Petersen, MSc EE ! \
! http://www.stacken.kth.se/~spe/ ! \___________
! spe@stacken.kth.se ! /
! stefan.petersen@home.se ! /
\----------------------------------/