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
 

Macros

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

Functions

void ex_menu (exarg_T *eap)
 
bool menu_get (char_u *const path_name, int modes, list_T *list)
 
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)
Value:
menutrans_T* _mt = (mt); \
xfree(_mt->from); \
xfree(_mt->to)
xfree(tofree)
char_u * to
Definition: menu.c:1453
Definition: menu.c:1450
char_u * from_noamp
Definition: menu.c:1452
char_u * from
Definition: menu.c:1451
#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.

Parameters
eapEx command arguments
void ex_menutranslate ( exarg_T eap)
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)

Parameters
[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

Parameters
path_name
modessupported modes, see MENU_MODES
[in,out]listmust be allocated
Returns
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.

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