|
|
1.1 root 1: /* Copyright (c) 1987 AT&T */
2: /* All Rights Reserved */
3:
4: /* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
5: /* The copyright notice above does not evidence any */
6: /* actual or intended publication of such source code. */
7:
8: #include <sccsid.h>
9: HVERSION(menu, @(#)menu.h 1.1.1.2 (5/12/87));
10:
11: /*
12: * Defines for Tmenu and Titem menu structures.
13: * Old menu structures can be found in <dmd.h>.
14: */
15:
16: typedef struct Titem
17: {
18: char *text; /* string for menu */
19: struct {
20: unsigned short uval; /* user field */
21: unsigned short grey; /* flag indicates invalid selection */
22: } ufield;
23: struct Tmenu *next; /* pointer to sub-menu */
24: Bitmap *icon; /* pointer to the icons bitmap */
25: struct Font *font; /* font defined for this item */
26: void (*dfn)(); /* execute function before sub-menu */
27: void (*bfn)(); /* execute function after sub-menu */
28: void (*hfn)(); /* execute function on selection */
29: } Titem;
30:
31: typedef struct Tmenu
32: {
33: Titem *item; /* Titem array, ending with text=0 */
34: short prevhit; /* private to menuhit() */
35: short prevtop; /* private to menuhit() */
36: Titem *(*generator)(); /* used if item == 0 */
37: short menumap; /* bit definition for user Titem structure */
38: } Tmenu;
39:
40: /*
41: * The following bit definitions are for the user to define
42: * the structure of the user Titem structure. These bits are
43: * stored in the menumap data member, which converts the user
44: * Titem structure into that of the Titem structure defined above.
45: */
46: #define TM_TEXT 0x0001 /* defines the text field */
47: #define TM_UFIELD 0x0002 /* defines the ufield field */
48: #define TM_NEXT 0x0004 /* defines the next field */
49: #define TM_ICON 0x0008 /* defines the icon field */
50: #define TM_FONT 0x0010 /* defines the font field */
51: #define TM_DFN 0x0020 /* defines the dfn field */
52: #define TM_BFN 0x0040 /* defines the bfn field */
53: #define TM_HFN 0x0080 /* defines the hfn field */
54:
55: #define TM_EXPAND 1 /* expand submenus on invocation */
56: #define TM_NORET 2 /* don't return until non-selection */
57: #define TM_STATIC 4 /* select on button depression */
58: #define TM_POINT 8 /* specify a point for the root menu */
59:
60: #define MAX_TMFIELDS 9 /* number of fields in Titem */
61: #define MAX_MASK 0x0100 /* upper limit bit definition */
62:
63:
64: /*
65: * Definition of an item in the More submenu
66: */
67: typedef struct Titem1 {
68: char *text;
69: struct {
70: unsigned short uval;
71: unsigned short grey;
72: } ufield;
73: struct Tmenu *next;
74: Bitmap *icon;
75: void (*dfn)();
76: } Titem1;
77:
78:
79: extern void tm_ret(); /* return function from TM_NORET */
80: extern Titem *tmenuhit();
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.