/[LeafOK_CVS]/lbbs/include/menu.h
ViewVC logotype

Diff of /lbbs/include/menu.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 by sysadm, Fri Mar 18 16:05:57 2005 UTC Revision 1.6 by sysadm, Mon Mar 21 17:08:21 2005 UTC
# Line 15  Line 15 
15   *                                                                         *   *                                                                         *
16   ***************************************************************************/   ***************************************************************************/
17    
18  #define MAX_MENUITEM_LENGTH     50  #define MAX_MENUITEM_LENGTH             50
19  #define MAX_MENUITEMS           30  #define MAX_MENUITEMS                   30
20    #define MAX_MENUNAME_LENGTH             20
21    #define MAX_MENUACTION_LENGTH           20
22    #define MAX_MENUTITLE_LENGTH            50
23    #define MAX_MENUS                       256
24    #define MAX_MENU_DEPTH                  50
25    
26  struct _menuitem {  struct _menu_item
27          int col, row;  {
28          char key;    int row, col, r_row, r_col;
29          char text[MAX_MENUITEM_LENGTH];    char action[MAX_MENUACTION_LENGTH];
30      int submenu;
31      int priv, level, display;
32      char name[MAX_MENUNAME_LENGTH];
33      char text[MAX_MENUITEM_LENGTH];
34  };  };
35  typedef struct _menuitem MENUITEM;  typedef struct _menu_item MENU_ITEM;
36    
37  struct _menu {  struct _menu_title
38          MENUITEM items[MAX_MENUITEMS];  {
39          int item_count, item_cur_pos;    int row, col, show;
40      char text[MAX_MENUTITLE_LENGTH];
41    };
42    typedef struct _menu_title MENU_TITLE;
43    
44    struct _menu_screen
45    {
46      int row, col, show;
47      char filename[256];
48    };
49    typedef struct _menu_screen MENU_SCREEN;
50    
51    struct _menu
52    {
53      char name[MAX_MENUNAME_LENGTH];
54      MENU_TITLE title;
55      MENU_SCREEN screen;
56      MENU_ITEM *items[MAX_MENUITEMS];
57      int item_count, item_cur_pos;
58  };  };
59  typedef struct _menu MENU;  typedef struct _menu MENU;
60    
61  extern MENU bbs_main_menu;  struct _menu_set
62    {
63      MENU *p_menu[MAX_MENUS];
64      MENU *p_menu_select[MAX_MENU_DEPTH];
65      int menu_count;
66      int menu_select_depth;
67    };
68    typedef struct _menu_set MENU_SET;
69    
70    extern MENU_SET bbs_menu;
71    
72    const char *menu_control (MENU_SET * p_menu_set, int key);
73    
74    int display_menu (MENU * p_menu);
75    
76    MENU *get_menu (MENU_SET * p_menu_set, const char *menu_name);


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1