1
2
3
4
5
6
7
8
9 #ifndef MC__WIDGET_MENU_H
10 #define MC__WIDGET_MENU_H
11
12
13
14 #define MENUBAR(x) ((WMenuBar *)(x))
15
16 #define menu_separator_new() NULL
17
18
19
20
21
22 struct menu_entry_t;
23 typedef struct menu_entry_t menu_entry_t;
24
25 struct menu_t;
26 typedef struct menu_t menu_t;
27
28
29 typedef struct WMenuBar
30 {
31 Widget widget;
32
33 gboolean is_dropped;
34 GList *menu;
35 guint current;
36 unsigned long previous_widget;
37 } WMenuBar;
38
39
40
41 extern const global_keymap_t *menu_map;
42
43
44
45 menu_entry_t *menu_entry_new (const char *name, long command);
46 void menu_entry_free (menu_entry_t * me);
47
48 menu_t *menu_new (const char *name, GList * entries, const char *help_node);
49 void menu_set_name (menu_t * menu, const char *name);
50 void menu_free (menu_t * menu);
51
52 WMenuBar *menubar_new (GList * menu);
53 void menubar_set_menu (WMenuBar * menubar, GList * menu);
54 void menubar_add_menu (WMenuBar * menubar, menu_t * menu);
55 void menubar_arrange (WMenuBar * menubar);
56
57 WMenuBar *menubar_find (const WDialog * h);
58
59 void menubar_activate (WMenuBar * menubar, gboolean dropped, int which);
60
61
62
63 #endif