Data Structures | Macros | Functions
menu.c File Reference
#include <assert.h>
#include <inttypes.h>
#include <string.h>
#include "nvim/vim.h"
#include "nvim/ascii.h"
#include "nvim/menu.h"
#include "nvim/charset.h"
#include "nvim/cursor.h"
#include "nvim/eval.h"
#include "nvim/ex_docmd.h"
#include "nvim/getchar.h"
#include "nvim/memory.h"
#include "nvim/message.h"
#include "nvim/misc1.h"
#include "nvim/keymap.h"
#include "nvim/garray.h"
#include "nvim/state.h"
#include "nvim/strings.h"
#include "nvim/ui.h"
#include "nvim/eval/typval.h"

Data Structures

struct  menutrans_T


#define MENUDEPTH   10 /* maximum depth of menus */
#define TBUFFER_LEN   256
#define FREE_MENUTRANS(mt)


void ex_menu (exarg_T *eap)
bool menu_get (char_u *const path_name, int modes, list_T *list)
vimmenu_Tfind_menu (vimmenu_T *menu, char_u *name, int modes)
char_uset_context_in_menu_cmd (expand_T *xp, char_u *cmd, char_u *arg, int forceit)
char_uget_menu_name (expand_T *xp, int idx)
char_uget_menu_names (expand_T *xp, int idx)
char_umenu_name_skip (char_u *const name)
int get_menu_cmd_modes (const char_u *cmd, bool forceit, int *noremap, int *unmenu)
int menu_is_menubar (char_u *name)
int menu_is_popup (char_u *name)
int menu_is_toolbar (char_u *name)
int menu_is_separator (char_u *name)
void ex_emenu (exarg_T *eap)
void ex_menutranslate (exarg_T *eap)

Macro Definition Documentation

#define FREE_MENUTRANS (   mt)
menutrans_T* _mt = (mt); \
xfree(_mt->from); \
char_u * to
Definition: menu.c:1442
Definition: menu.c:1439
char_u * from_noamp
Definition: menu.c:1441
char_u * from
Definition: menu.c:1440
#define MENUDEPTH   10 /* maximum depth of menus */
#define TBUFFER_LEN   256

Function Documentation

void ex_emenu ( exarg_T eap)
void ex_menu ( exarg_T eap)

Do the :menu command and relatives.

eapEx command arguments
void ex_menutranslate ( exarg_T eap)
vimmenu_T* find_menu ( vimmenu_T menu,
char_u name,
int  modes 

Find menu matching required name and modes

menutop menu to start looking from
namepath towards the menu
menu if name is null, found menu or NULL
int get_menu_cmd_modes ( const char_u cmd,
bool  forceit,
int *  noremap,
int *  unmenu 

Returns the MENU_MODES specified by menu command cmd. (eg :menu! returns MENU_CMDLINE_MODE | MENU_INSERT_MODE)

[in]cmdstring like "nmenu", "vmenu", etc.
[in]forceitbang (!) was given after the command
[out]noremapIf not NULL, the flag it points to is set according to whether the command is a "nore" command.
[out]unmenuIf not NULL, the flag it points to is set according to whether the command is an "unmenu" command.
char_u* get_menu_name ( expand_T xp,
int  idx 
char_u* get_menu_names ( expand_T xp,
int  idx 
bool menu_get ( char_u *const  path_name,
int  modes,
list_T list 

Export menus matching path path_name

modessupported modes, see MENU_MODES
[in,out]listmust be allocated
false if could not find path_name
int menu_is_menubar ( char_u name)
int menu_is_popup ( char_u name)
int menu_is_separator ( char_u name)
int menu_is_toolbar ( char_u name)
char_u* menu_name_skip ( char_u *const  name)

Skip over this element of the menu path and return the start of the next element. Any \ and ^Vs are removed from the current element.

namemay be modified.
start of the next element
char_u* set_context_in_menu_cmd ( expand_T xp,
char_u cmd,
char_u arg,
int  forceit