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 gboolean previously_visible;
38 } WMenuBar;
39
40
41
42 extern const global_keymap_t *menu_map;
43
44
45
46 menu_entry_t *menu_entry_new (const char *name, long command);
47 void menu_entry_free (menu_entry_t *me);
48
49 menu_t *menu_new (const char *name, GList *entries, const char *help_node);
50 void menu_set_name (menu_t *menu, const char *name);
51 void menu_free (menu_t *menu);
52
53 WMenuBar *menubar_new (GList *menu);
54 void menubar_set_menu (WMenuBar *menubar, GList *menu);
55 void menubar_add_menu (WMenuBar *menubar, menu_t *menu);
56 void menubar_arrange (WMenuBar *menubar);
57
58 WMenuBar *menubar_find (const WDialog *h);
59
60 void menubar_activate (WMenuBar *menubar, gboolean dropped, int which);
61
62
63
64 #endif