mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 12:56:51 +03:00
2ebdf91079
* m-utf-8: (223 commits) Fix wildcard pattern in file select and file find dialogs Project builds with option --disable-charsets Deleted build-glib1.sh because glib1 don't work with utf-8 fix building without --enable-charset Total replacement to mc_search stuff in all places Search engine: if found_len parameter NULL, then mc_search_run don't try to fill them src/view.c: Reworked search stuff to usage src/search refactoring: rename edit/editcmd_dialog.c:editcmd_dialog__get_search_types_list to Search engine: development of hex search complete Search engine: remove forgotten debug string and reindent file Search engine: configure.ac: if present glib-2.14 and higher, libpcre don't linked Search engine: now used regexp external engines: src/find.c: Fixed core dump if content search pattern no present edit/editcmd_dialogs.c: fixed state of search type between dialog window calls Find files: checkbox 'Regular expression' for content search now default unchecked Find files: changes for usage of new search engine: Fix copy of current/opposite path to command line: remove charset info from path src/Makefile.am: add some header files to Make-tracking Fixed editor menu reloading.
53 lines
1.3 KiB
C
53 lines
1.3 KiB
C
|
|
/** \file menu.h
|
|
* \brief Header: pulldown menu code
|
|
*/
|
|
|
|
#ifndef MC_MENU_H
|
|
#define MC_MENU_H
|
|
|
|
#include "widget.h"
|
|
|
|
typedef void (*callfn) (void);
|
|
|
|
typedef struct {
|
|
char first_letter;
|
|
const char *label;
|
|
struct hotkey_t text;
|
|
callfn call_back;
|
|
} menu_entry;
|
|
|
|
typedef struct Menu {
|
|
struct hotkey_t text;
|
|
int count;
|
|
int max_entry_len;
|
|
int selected;
|
|
menu_entry *entries;
|
|
int start_x; /* position relative to menubar start */
|
|
char *help_node;
|
|
} Menu;
|
|
|
|
extern int menubar_visible;
|
|
|
|
/* The button bar menu */
|
|
typedef struct WMenu {
|
|
Widget widget;
|
|
|
|
int active; /* If the menubar is in use */
|
|
int dropped; /* If the menubar has dropped */
|
|
Menu **menu; /* The actual menus */
|
|
int items;
|
|
int selected; /* Selected menu on the top bar */
|
|
int subsel; /* Selected entry on the submenu */
|
|
int max_entry_len; /* Cache value for the columns in a box */
|
|
int previous_widget; /* Selected widget ID before activating menu */
|
|
} WMenu;
|
|
|
|
Menu *create_menu (const char *name, menu_entry *entries, int count,
|
|
const char *help_node);
|
|
void destroy_menu (Menu *menu);
|
|
WMenu *menubar_new (int y, int x, int cols, Menu *menu[], int items);
|
|
void menubar_arrange (WMenu *menubar);
|
|
|
|
#endif
|