File: menu_tool.h

package info (click to toggle)
xtrojka 123-12
  • links: PTS
  • area: non-free
  • in suites: slink
  • size: 492 kB
  • ctags: 443
  • sloc: ansic: 3,087; makefile: 135; sh: 19
file content (68 lines) | stat: -rw-r--r-- 1,405 bytes parent folder | download | duplicates (4)
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
/*
 *	xtrojka (c) 1994,1995,1996 Maarten Los
 *
 *	#include "COPYRIGHT"	
 *
 *	created:	27.xi.1995
 *	modified:	24.xii.1995	major restyle
 *			11.iii.1996	added prototypes
 *
 *
 *	header file for menu_tool.c
 */

#ifndef _menu_tool_h_
#define _menu_tool_h_

#define HOTKEY_LEN		2
#define HOTKEY_WHITE		1
#define ITEM_WHITE		1

#define SEPARATOR		'-'
#define NO_HOT			"_"
#define CHECKMARK		187


typedef struct _ITEM_LIST {
	String	name;
	String	hotkey;
} ITEM_LIST;


/*
 *	this block should be statically defined!
 *	it must be passed in 'client_data' to a callback function
 */
typedef struct _MENU_BLOCK {
	Widget	menu_button;		
	Widget	menu_shell;
	Widget	menu_box;
	int	item_count;
	void	(*std_callback)();
} MENU_BLOCK;


/*
 *	function prototypes
 */

void init_menu_sys(void);
void init_trojkamenu(void);
void init_speedmenu(void);
MENU_BLOCK *create_menu(String, Widget, Widget*, Widget*, void());
void add_menu(MENU_BLOCK*, String, Widget *);
void format_menu(ITEM_LIST*, Widget *, int);
void popup_callback(Widget, XtPointer, XtPointer);
void trojkamenu_select_callback(Widget, XtPointer, XtPointer);
void speedmenu_select_callback(Widget, XtPointer, XtPointer);
void enable(int, int, flag);
void check_wizard_item(flag);
void check_slick_item(flag);
void check_speed_item(int, flag);
void check_item(Widget, flag);
char *format_item(char *, char*, int, flag);


#endif /* _menu_tool_h_ */