Mercurial > vim
diff src/structs.h @ 12487:3f16cf18386c v8.0.1123
patch 8.0.1123: cannot define a toolbar for a window
commit https://github.com/vim/vim/commit/1b9645de3c05f37b5c30e78f999351b0cf486ade
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 17 23:03:31 2017 +0200
patch 8.0.1123: cannot define a toolbar for a window
Problem: Cannot define a toolbar for a window.
Solution: Add a window-local toolbar.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 17 Sep 2017 23:15:04 +0200 |
parents | 68d7bc045dbe |
children | 3ca08bf99396 |
line wrap: on
line diff
--- a/src/structs.h +++ b/src/structs.h @@ -70,6 +70,10 @@ typedef int scid_T; /* script ID */ typedef struct file_buffer buf_T; /* forward declaration */ typedef struct terminal_S term_T; +#ifdef FEAT_MENU +typedef struct VimMenu vimmenu_T; +#endif + /* * Reference to a buffer that stores the value of buf_free_count. * bufref_valid() only needs to check "buf" when the count differs. @@ -2611,6 +2615,14 @@ struct matchitem #endif }; +#ifdef FEAT_MENU +typedef struct { + int wb_startcol; + int wb_endcol; + vimmenu_T *wb_menu; +} winbar_item_T; +#endif + /* * Structure which contains all information that belongs to a window * @@ -2686,7 +2698,7 @@ struct window_S */ int w_winrow; /* first row of window in screen */ int w_height; /* number of rows in window, excluding - status/command line(s) */ + status/command/winbar line(s) */ int w_status_height; /* number of status lines (0 or 1) */ int w_wincol; /* Leftmost column of window in screen. use W_WINCOL() */ @@ -2798,6 +2810,12 @@ struct window_S char_u *w_localdir; /* absolute path of local directory or NULL */ +#ifdef FEAT_MENU + vimmenu_T *w_winbar; /* The root of the WinBar menu hierarchy. */ + winbar_item_T *w_winbar_items; /* list of items in the WinBar */ + int w_winbar_height; /* 1 if there is a window toolbar */ +#endif + /* * Options local to a window. * They are local because they influence the layout of the window or @@ -3064,8 +3082,6 @@ typedef struct cursor_entry /* 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? */