home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume27 / ytalk-3.0 / part01 / menu.h < prev    next >
C/C++ Source or Header  |  1993-08-20  |  2KB  |  47 lines

  1. /* menu.h */
  2.  
  3. /*               NOTICE
  4.  *
  5.  * Copyright (c) 1990,1992,1993 Britt Yenne.  All rights reserved.
  6.  * 
  7.  * This software is provided AS-IS.  The author gives no warranty,
  8.  * real or assumed, and takes no responsibility whatsoever for any 
  9.  * use or misuse of this software, or any damage created by its use
  10.  * or misuse.
  11.  * 
  12.  * This software may be freely copied and distributed provided that
  13.  * no part of this NOTICE is deleted or edited in any manner.
  14.  * 
  15.  */
  16.  
  17. /* Mail comments or questions to ytalk@austin.eds.com */
  18.  
  19. /* The following structure defines a menu item.  It will be displayed
  20.  * to the user as the _key_ followed by the _item_.  If an item's _key_
  21.  * is pressed, the _func_ for that item is called with one argument:
  22.  * the _key_ pressed.
  23.  */
  24. typedef struct {
  25.     char *item;        /* item string, ie: "add a user" */
  26.     void (*func)();    /* function to call */
  27.     ychar key;        /* activating keypress, ie: "a" */
  28. } menu_item;
  29.  
  30. extern menu_item *menu_ptr;    /* if non-NULL, current menu in processing */
  31.  
  32. /* global functions */
  33.  
  34. extern void    kill_menu    ();                /* menu.c */
  35. extern void    update_menu    ();                /* menu.c */
  36. extern int    show_menu    ( /* menuptr, len */ );        /* menu.c */
  37. extern int    show_text    ( /* prompt, func */ );        /* menu.c */
  38. extern int    show_mesg    ();                /* menu.c */
  39. extern int    show_main_menu    ();                /* menu.c */
  40. extern int    show_option_menu();                /* menu.c */
  41. extern int    show_user_menu    ( /* title, func */ );        /* menu.c */
  42. extern int    show_error_menu    ( /* str1, str2 */ );        /* menu.c */
  43. extern int    yes_no        ( /* prompt */ );        /* menu.c */
  44. extern void    update_user_menu();                /* menu.c */
  45.  
  46. /* EOF */
  47.