-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmenu.h
114 lines (103 loc) · 3.03 KB
/
menu.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
/***************************************************************************
*
* Copyright (c) 1997, 1998 Timpanogas Research Group, Inc. All Rights
* Reserved.
*
* AUTHOR : Jeff V. Merkey
* FILE : MENU.H
* DESCRIP : Text Menu Screen Code for MANOS v1.0
* DATE : March 17, 1998
*
*
***************************************************************************/
#include "types.h"
#define TRUE 1
#define FALSE 0
#define MAX_MENU 100
#define BORDER_SINGLE 1
#define BORDER_DOUBLE 2
typedef struct _MENU_FRAME {
LONG num;
LONG startx;
LONG endx;
LONG starty;
LONG endy;
LONG curx;
LONG cury;
LONG pcurx;
LONG pcury;
LONG windowSize;
LONG border;
LONG active;
LONG header_color;
LONG border_color;
LONG fill_color;
LONG text_color;
BYTE *p;
BYTE header[80];
SCREEN *screen;
BYTE **elementStrings;
LONG elementCount;
LONG *elementValues;
BYTE *elementStorage;
LONG owner;
LONG (*elementFunction)(SCREEN *, LONG, BYTE *);
LONG (*warnFunction)(SCREEN *);
long choice;
long index;
long top;
long bottom;
LONG selected;
LONG (*keyboardHandler)(SCREEN *, LONG);
LONG keyboardMask;
LONG screenMode;
LONG nLines;
} menu_frame_t;
extern menu_frame_t menu_frame[MAX_MENU];
extern LONG get_resp(LONG num);
extern LONG fill_menu(LONG num, LONG ch, LONG attr);
extern LONG save_menu(LONG num);
extern LONG restore_menu(LONG num);
extern LONG close_menu(LONG num);
extern LONG free_menu(LONG num);
extern LONG display_menu_header(LONG num);
extern LONG draw_menu_border(LONG num);
extern void display_menu(LONG num);
extern LONG add_item_to_menu(LONG num, BYTE *item, LONG value);
extern LONG activate_menu(LONG num);
extern LONG make_menu(SCREEN *screen,
BYTE *header,
int startx,
int starty,
LONG windowSize,
LONG border,
LONG hcolor,
LONG bcolor,
LONG fcolor,
LONG tcolor,
LONG (*elementFunction)(SCREEN *, LONG, BYTE *),
LONG (*warnFunction)(SCREEN *));
extern LONG menu_write_string(LONG num, BYTE *p, LONG x, LONG y, LONG attr);
extern LONG free_portal(LONG num);
extern LONG activate_portal(LONG num);
extern LONG update_portal(LONG num);
extern LONG update_static_portal(LONG num);
extern LONG make_portal(SCREEN *screen,
BYTE *header,
int startx,
int starty,
int endx,
int endy,
LONG numberOfLines,
LONG border,
LONG hcolor,
LONG bcolor,
LONG fcolor,
LONG tcolor,
LONG (*keyboardHandler)(SCREEN *, LONG));
extern LONG write_portal(LONG num, BYTE *p, int x, int y, LONG attr);
extern LONG write_screen_comment_line(SCREEN *screen, BYTE *p, LONG attr);
extern LONG activate_static_portal(LONG num);
extern LONG deactivate_static_portal(LONG num);
extern LONG disable_portal_input(LONG num);
extern LONG enable_portal_input(LONG num);