| 1 |
/***************************************************************************
|
| 2 |
menu.h - description
|
| 3 |
-------------------
|
| 4 |
begin : Wed Mar 16 2004
|
| 5 |
copyright : (C) 2005 by Leaflet
|
| 6 |
email : leaflet@leafok.com
|
| 7 |
***************************************************************************/
|
| 8 |
|
| 9 |
/***************************************************************************
|
| 10 |
* *
|
| 11 |
* This program is free software; you can redistribute it and/or modify *
|
| 12 |
* it under the terms of the GNU General Public License as published by *
|
| 13 |
* the Free Software Foundation; either version 2 of the License, or *
|
| 14 |
* (at your option) any later version. *
|
| 15 |
* *
|
| 16 |
***************************************************************************/
|
| 17 |
|
| 18 |
#define MAX_MENUITEM_LENGTH 50
|
| 19 |
#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 |
|
| 25 |
struct _menu_item {
|
| 26 |
int col, row;
|
| 27 |
char action[MAX_MENUACTION_LENGTH];
|
| 28 |
int priv;
|
| 29 |
char name[MAX_MENUNAME_LENGTH];
|
| 30 |
char text[MAX_MENUITEM_LENGTH];
|
| 31 |
};
|
| 32 |
typedef struct _menu_item MENU_ITEM;
|
| 33 |
|
| 34 |
struct _menu_title {
|
| 35 |
int col, row;
|
| 36 |
char text[MAX_MENUTITLE_LENGTH];
|
| 37 |
};
|
| 38 |
typedef struct _menu_title MENU_TITLE;
|
| 39 |
|
| 40 |
struct _menu_screen {
|
| 41 |
int col, row;
|
| 42 |
char filename[256];
|
| 43 |
};
|
| 44 |
typedef struct _menu_screen MENU_SCREEN;
|
| 45 |
|
| 46 |
struct _menu {
|
| 47 |
char name[MAX_MENUNAME_LENGTH];
|
| 48 |
MENU_TITLE title;
|
| 49 |
MENU_SCREEN screen;
|
| 50 |
MENU_ITEM items[MAX_MENUITEMS];
|
| 51 |
int item_count, item_cur_pos;
|
| 52 |
};
|
| 53 |
typedef struct _menu MENU;
|
| 54 |
|
| 55 |
struct _menu_set {
|
| 56 |
MENU *p_menu[MAX_MENUS];
|
| 57 |
int menu_count;
|
| 58 |
};
|
| 59 |
typedef struct _menu_set MENU_SET;
|
| 60 |
|
| 61 |
extern MENU_SET bbs_menu;
|