- Subject: Re: help with menus and callbacks
- From: Joe Robertson <jmrobert@xxxxxxxxxxxxxxxx>
- Date: Fri, 11 May 2001 10:42:21 -0500
Thanks all,
This has got me going.
I could really use that section about designing slang apps.
Theres a lot to learn about Slang and how to make portable apps with it.
I'm not trying for portable yet, just a demo app to inspire others.
For anyone whos interested its a quicken clone.
http://www.huntsvilleal.com/~jmrobert/anvil/anvil.html
John E. Davis writes:
I am not really sure what you are looking for. The bulk of the code
in menu.c deals with drawing the menus, navigation, and so on. Once a
menu is selected, the callback is executed via, e.g.,
int execute_menu_callback (Menu *m)
{
return m->callback ();
}
where, e.g.,
typedef struct
{
int (*callback) (void);
}
Menu;
--John
Goran Koruga writes:
> You can also find that in my IRC client that's using slang. Take a look
> at file input.c, parse_kbd(). The way I get the appropriate function from
> a table might seem complicated, but I did it for efficiency reasons (i.e.
> you don't have to walk the array to find a key). URL is :
>
> http://users.netraam.com/~jm/justirc/
>
> Btw, John, could you please update URL for it? The old URL was
> http://tel.netraam.com/jm/justirc/. Please do the same for my other app
> (http://tel.netraam.com/jm/pupette/ ->
> http://users.netraam.com/~jm/pupette/). Thank you.
>
> Best regards,
> Goran
--
Joe Robertson -----------------------------
[E] jmrobert@xxxxxxxx
[W] http://www.huntsvilleal.com/~jmrobert
[ICQ] 2586528
---------------------------------------------
"I am... after all... a SuperHero."
Larry-Boy
http://www.larry-boy.com
---------------------------------------------
[2001 date index]
[2001 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]