Just a little correction at the it.po file.
[midnight-commander.git] / src / menu.h
blobf63426ffc8b00ce3f47c7e3b291a56a7366e88b0
1 #ifndef __MENU_H
2 #define __MENU_H
4 #include "dlg.h"
5 #include "widget.h"
7 typedef void (*callfn) (void);
9 typedef struct {
10 char first_letter;
11 char *text;
12 int hot_key;
13 callfn call_back;
14 } menu_entry;
16 typedef struct Menu {
17 char *name;
18 int count;
19 int max_entry_len;
20 int selected;
21 int hotkey;
22 menu_entry *entries;
23 int start_x; /* position relative to menubar start */
24 char *help_node;
25 } Menu;
27 extern int menubar_visible;
29 /* The button bar menu */
30 typedef struct WMenu {
31 Widget widget;
33 int active; /* If the menubar is in use */
34 int dropped; /* If the menubar has dropped */
35 Menu **menu; /* The actual menus */
36 int items;
37 int selected; /* Selected menu on the top bar */
38 int subsel; /* Selected entry on the submenu */
39 int max_entry_len; /* Cache value for the columns in a box */
40 int previous_selection; /* Selected widget before activating menu */
41 } WMenu;
43 Menu *create_menu (char *name, menu_entry *entries, int count,
44 char *help_node);
45 void destroy_menu (Menu *menu);
46 WMenu *menubar_new (int y, int x, int cols, Menu *menu[], int items);
47 void menubar_arrange (WMenu *menubar);
49 #endif /* __MENU_H */