aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/menu.h
diff options
context:
space:
mode:
authorMatthieu Coudron <mattator@gmail.com>2017-03-21 03:21:53 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-07-28 01:27:58 +0200
commitdc685387a3d60e9ea3d09c80c74d4613b618cf14 (patch)
tree76dc55b7f9bf077dd0f16c94d01a23e43663390a /src/nvim/menu.h
parente6d54407ba8ce580fbd81cb9389eb9ce4483597b (diff)
downloadrneovim-dc685387a3d60e9ea3d09c80c74d4613b618cf14.tar.gz
rneovim-dc685387a3d60e9ea3d09c80c74d4613b618cf14.tar.bz2
rneovim-dc685387a3d60e9ea3d09c80c74d4613b618cf14.zip
viml: introduce menu_get() function #6322
menu_get({path}, {modes}). See :h menu_get.
Diffstat (limited to 'src/nvim/menu.h')
-rw-r--r--src/nvim/menu.h47
1 files changed, 26 insertions, 21 deletions
diff --git a/src/nvim/menu.h b/src/nvim/menu.h
index a84b7d812e..5ff979f2bf 100644
--- a/src/nvim/menu.h
+++ b/src/nvim/menu.h
@@ -6,7 +6,9 @@
#include "nvim/types.h" // for char_u and expand_T
#include "nvim/ex_cmds_defs.h" // for exarg_T
-/* Indices into vimmenu_T->strings[] and vimmenu_T->noremap[] for each mode */
+/// Indices into vimmenu_T->strings[] and vimmenu_T->noremap[] for each mode
+/// \addtogroup MENU_INDEX
+/// @{
#define MENU_INDEX_INVALID -1
#define MENU_INDEX_NORMAL 0
#define MENU_INDEX_VISUAL 1
@@ -16,8 +18,12 @@
#define MENU_INDEX_CMDLINE 5
#define MENU_INDEX_TIP 6
#define MENU_MODES 7
+/// @}
+/// note MENU_INDEX_TIP is not a 'real' mode
-/* Menu modes */
+/// Menu modes
+/// \addtogroup MENU_MODES
+/// @{
#define MENU_NORMAL_MODE (1 << MENU_INDEX_NORMAL)
#define MENU_VISUAL_MODE (1 << MENU_INDEX_VISUAL)
#define MENU_SELECT_MODE (1 << MENU_INDEX_SELECT)
@@ -26,31 +32,30 @@
#define MENU_CMDLINE_MODE (1 << MENU_INDEX_CMDLINE)
#define MENU_TIP_MODE (1 << MENU_INDEX_TIP)
#define MENU_ALL_MODES ((1 << MENU_INDEX_TIP) - 1)
-/*note MENU_INDEX_TIP is not a 'real' mode*/
+/// @}
-/* Start a menu name with this to not include it on the main menu bar */
+/// Start a menu name with this to not include it on the main menu bar
#define MNU_HIDDEN_CHAR ']'
typedef struct VimMenu vimmenu_T;
struct VimMenu {
- int modes; /* Which modes is this menu visible for? */
- int enabled; /* for which modes the menu is enabled */
- char_u *name; /* Name of menu, possibly translated */
- char_u *dname; /* Displayed Name ("name" without '&') */
- char_u *en_name; /* "name" untranslated, NULL when "name"
- * was not translated */
- char_u *en_dname; /* "dname" untranslated, NULL when "dname"
- * was not translated */
- int mnemonic; /* mnemonic key (after '&') */
- char_u *actext; /* accelerator text (after TAB) */
- long priority; /* Menu order priority */
- char_u *strings[MENU_MODES]; /* Mapped string for each mode */
- int noremap[MENU_MODES]; /* A REMAP_ flag for each mode */
- bool silent[MENU_MODES]; /* A silent flag for each mode */
- vimmenu_T *children; /* Children of sub-menu */
- vimmenu_T *parent; /* Parent of menu */
- vimmenu_T *next; /* Next item in menu */
+ int modes; ///< Which modes is this menu visible for
+ int enabled; ///< for which modes the menu is enabled
+ char_u *name; ///< Name of menu, possibly translated
+ char_u *dname; ///< Displayed Name ("name" without '&')
+ char_u *en_name; ///< "name" untranslated, NULL when
+ ///< was not translated
+ char_u *en_dname; ///< NULL when "dname" untranslated
+ int mnemonic; ///< mnemonic key (after '&')
+ char_u *actext; ///< accelerator text (after TAB)
+ long priority; ///< Menu order priority
+ char_u *strings[MENU_MODES]; ///< Mapped string for each mode
+ int noremap[MENU_MODES]; ///< A \ref REMAP_VALUES flag for each mode
+ bool silent[MENU_MODES]; ///< A silent flag for each mode
+ vimmenu_T *children; ///< Children of sub-menu
+ vimmenu_T *parent; ///< Parent of menu
+ vimmenu_T *next; ///< Next item in menu
};