1 /*
2  * wmslib/src/but/menu.h, part of wmslib (Library functions)
3  * Copyright (C) 1995-1996 William Shubert.
4  * See "configure.h.in" for more copyright information.
5  *
6  * Includes for menu.c
7  */
8 
9 #ifndef  _BUT_MENU_H_
10 #define  _BUT_MENU_H_  1
11 
12 
13 /**********************************************************************
14  * Constants
15  **********************************************************************/
16 #define  BUTMENU_OLEND     NULL
17 #define  BUTMENU_OLBREAK   (&butMenu_dummy)
18 
19 #define  BUTMENU_DISABLED  1  /* Flags. */
20 #define  BUTMENU_END       2  /* Private. */
21 #define  BUTMENU_BREAK     4  /* Private. */
22 
23 
24 /**********************************************************************
25  * Global variables
26  **********************************************************************/
27 /* Private. */
28 extern char  butMenu_dummy;
29 
30 
31 /**********************************************************************
32  * Functions
33  **********************************************************************/
34 extern But  *butMenu_upCreate(ButOut (*func)(But *but, int value),
35 			      void *packet, ButWin *win, int layer,
36 			      int toplayer, int flags, const char *title,
37 			      const char *optlist[], int cur_opt);
38 extern But  *butMenu_downCreate(ButOut (*func)(But *but, int value),
39 				void *packet, ButWin *win, int layer,
40 				int toplayer, int flags, const char *title,
41 				const char *optlist[], int cur_opt);
42 extern void  butMenu_set(But *but, int new_opt);
43 extern int   butMenu_get(But *but);
44 extern void  butMenu_setColor(But *but, int fg, int bg);
45 /* If newcval is -1, then it will be left unchanged. */
46 extern void  butMenu_setText(But *but, const char *title,
47 			     const char *optlist[], int newcval);
48 extern void  butMenu_setOptionName(But *but, const char *new, int entryNum);
49 /*
50  * flags should be from the BUTMENU_DISABLED list above.
51  */
52 extern void  butMenu_setFlags(But *but, int optnum, uint flags);
53 
54 #endif  /* _BUT_MENU_H_ */
55