/[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.8 by sysadm, Sat May 7 09:28:12 2005 UTC Revision 1.10 by sysadm, Wed Apr 30 09:18:19 2025 UTC
# Line 1  Line 1 
1  /***************************************************************************  /***************************************************************************
2                            menu.h  -  description                                                    menu.h  -  description
3                               -------------------                                                           -------------------
4      begin                : Wed Mar 16 2004          begin                : Wed Mar 16 2004
5      copyright            : (C) 2005 by Leaflet          copyright            : (C) 2005 by Leaflet
6      email                : leaflet@leafok.com          email                : leaflet@leafok.com
7   ***************************************************************************/   ***************************************************************************/
8    
9  /***************************************************************************  /***************************************************************************
# Line 18  Line 18 
18  #ifndef _MENU_H_  #ifndef _MENU_H_
19  #define _MENU_H_  #define _MENU_H_
20    
21  #define MAX_MENUITEM_LENGTH             50  #define MAX_MENUITEM_LENGTH 50
22  #define MAX_MENUITEMS                   30  #define MAX_MENUITEMS 30
23  #define MAX_MENUNAME_LENGTH             256  #define MAX_MENUNAME_LENGTH 256
24  #define MAX_MENUACTION_LENGTH           20  #define MAX_MENUACTION_LENGTH 20
25  #define MAX_MENUTITLE_LENGTH            50  #define MAX_MENUTITLE_LENGTH 50
26  #define MAX_MENUS                       256  #define MAX_MENUS 256
27  #define MAX_MENU_DEPTH                  50  #define MAX_MENU_DEPTH 50
28    
29  struct _menu_item  struct _menu_item
30  {  {
31    int row, col, r_row, r_col;          int row, col, r_row, r_col;
32    char action[MAX_MENUACTION_LENGTH];          char action[MAX_MENUACTION_LENGTH];
33    int submenu;          int submenu;
34    int priv, level, display;          int priv, level, display;
35    char name[MAX_MENUNAME_LENGTH];          char name[MAX_MENUNAME_LENGTH];
36    char text[MAX_MENUITEM_LENGTH];          char text[MAX_MENUITEM_LENGTH];
37  };  };
38  typedef struct _menu_item MENU_ITEM;  typedef struct _menu_item MENU_ITEM;
39    
40  struct _menu_title  struct _menu_title
41  {  {
42    int row, col, show;          int row, col, show;
43    char text[MAX_MENUTITLE_LENGTH];          char text[MAX_MENUTITLE_LENGTH];
44  };  };
45  typedef struct _menu_title MENU_TITLE;  typedef struct _menu_title MENU_TITLE;
46    
47  struct _menu_screen  struct _menu_screen
48  {  {
49    int row, col, show;          int row, col, show;
50    char filename[256];          char filename[256];
51  };  };
52  typedef struct _menu_screen MENU_SCREEN;  typedef struct _menu_screen MENU_SCREEN;
53    
54  struct _menu  struct _menu
55  {  {
56    char name[MAX_MENUNAME_LENGTH];          char name[MAX_MENUNAME_LENGTH];
57    MENU_TITLE title;          MENU_TITLE title;
58    MENU_SCREEN screen;          MENU_SCREEN screen;
59    MENU_ITEM *items[MAX_MENUITEMS];          MENU_ITEM *items[MAX_MENUITEMS];
60    int item_count, item_cur_pos;          int item_count, item_cur_pos;
61  };  };
62  typedef struct _menu MENU;  typedef struct _menu MENU;
63    
64  struct _menu_set  struct _menu_set
65  {  {
66    char conf_file[256];          char conf_file[256];
67    MENU *p_menu[MAX_MENUS];          MENU *p_menu[MAX_MENUS];
68    MENU *p_menu_select[MAX_MENU_DEPTH];          MENU *p_menu_select[MAX_MENU_DEPTH];
69    int menu_count;          int menu_count;
70    int menu_select_depth;          int menu_select_depth;
71  };  };
72  typedef struct _menu_set MENU_SET;  typedef struct _menu_set MENU_SET;
73    
74  extern MENU_SET bbs_menu;  extern MENU_SET bbs_menu;
75    
76  extern int load_menu (MENU_SET * p_menu_set, const char *conf_file);  extern int load_menu(MENU_SET *p_menu_set, const char *conf_file);
77  extern void unload_menu (MENU_SET * p_menu_set);  
78  extern int reload_menu (MENU_SET * p_menu_set);  extern void unload_menu(MENU_SET *p_menu_set);
79  extern int menu_control (MENU_SET * p_menu_set, int key);  
80  extern int display_menu (MENU * p_menu);  extern int reload_menu(MENU_SET *p_menu_set);
81  extern MENU *get_menu (MENU_SET * p_menu_set, const char *menu_name);  
82    extern int menu_control(MENU_SET *p_menu_set, int key);
83    
84    extern int display_menu(MENU *p_menu);
85    
86    extern int display_current_menu(MENU_SET *p_menu_set);
87    
88    extern MENU *get_menu(MENU_SET *p_menu_set, const char *menu_name);
89    
90  #endif //_MENU_H_  #endif //_MENU_H_


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

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