1 /************************************************************************/
2 /*									*/
3 /*  Option menus.							*/
4 /*									*/
5 /************************************************************************/
6 
7 #   include	"appGuiBase.h"
8 
9 #   ifndef	GUI_OPTMENU_H
10 #   define	GUI_OPTMENU_H
11 
12 typedef void (*OptionmenuCallback)(	int		n,
13 					void *		through );
14 
15 #   ifdef USE_GTK
16 
17 typedef struct AppOptionmenu
18     {
19     APP_WIDGET			aomInplace;
20     APP_WIDGET			aomPulldown;
21 
22     OptionmenuCallback		aomCallback;
23     void *			aomTarget;
24     } AppOptionmenu;
25 
26 #   endif
27 
28 #   ifdef USE_MOTIF
29 
30 typedef struct AppOptionmenu
31     {
32     APP_WIDGET			aomInplace;
33     APP_WIDGET			aomPulldown;
34 
35     OptionmenuCallback		aomCallback;
36     void *			aomTarget;
37 
38     int				aomOptionsVisible;
39     } AppOptionmenu;
40 
41 #   endif
42 
43 /************************************************************************/
44 /*									*/
45 /*  Routine declarations.						*/
46 /*									*/
47 /************************************************************************/
48 
49 extern void appMakeOptionmenuInColumn(	AppOptionmenu *		aom,
50 					APP_WIDGET		parent,
51 					OptionmenuCallback	callBack,
52 					void *			through );
53 
54 extern void appMakeOptionmenuInRow(	AppOptionmenu *		aom,
55 					APP_WIDGET		row,
56 					int			column,
57 					int			colspan,
58 					OptionmenuCallback	callBack,
59 					void *			through );
60 
61 extern void appOptionmenuRefreshWidth(	AppOptionmenu *		aom );
62 
63 extern void appEmptyOptionmenu(		AppOptionmenu *		aom );
64 
65 extern void appGuiEnableOptionmenu(	AppOptionmenu *		aom,
66 					int			sensitive );
67 
68 extern APP_WIDGET appAddItemToOptionmenu( AppOptionmenu *	aom,
69 					const char *		label );
70 
71 extern void appDeleteItemFromOptionmenu( AppOptionmenu *	aom,
72 					APP_WIDGET		item );
73 
74 extern void appSetOptionmenu(		AppOptionmenu *		aom,
75 					int			num );
76 
77 extern void appInitOptionmenu(		AppOptionmenu *		aom );
78 
79 extern void appOptionmenuItemSetVisibility(	APP_WIDGET	w,
80 						int		visible );
81 
82 #   endif		/* GUI_OPTMENU_H */
83