Macros | Functions
popupmnu.c File Reference
#include <assert.h>
#include <inttypes.h>
#include <stdbool.h>
#include "nvim/vim.h"
#include "nvim/api/private/helpers.h"
#include "nvim/ascii.h"
#include "nvim/popupmnu.h"
#include "nvim/charset.h"
#include "nvim/ex_cmds.h"
#include "nvim/memline.h"
#include "nvim/move.h"
#include "nvim/option.h"
#include "nvim/screen.h"
#include "nvim/search.h"
#include "nvim/strings.h"
#include "nvim/memory.h"
#include "nvim/window.h"
#include "nvim/edit.h"
#include "nvim/ui.h"


#define PUM_DEF_HEIGHT   10
#define PUM_DEF_WIDTH   15


void pum_display (pumitem_T *array, int size, int selected, bool array_changed)
void pum_redraw (void)
 Redraw the popup menu, using "pum_first" and "pum_selected". More...
void pum_undisplay (void)
 Undisplay the popup menu (later). More...
void pum_clear (void)
bool pum_visible (void)
bool pum_drawn (void)
int pum_get_height (void)

Detailed Description

Popup menu (PUM)

Macro Definition Documentation

#define PUM_DEF_HEIGHT   10
#define PUM_DEF_WIDTH   15

Function Documentation

void pum_clear ( void  )

Clear the popup menu. Currently only resets the offset to the first displayed item.

void pum_display ( pumitem_T array,
int  size,
int  selected,
bool  array_changed 

Show the popup menu with items "array[size]". "array" must remain valid until pum_undisplay() is called! When possible the leftmost character is aligned with screen column "col". The menu appears above the screen line "row" or at "row" + "height" - 1.

selectedindex of initially selected item, none if out of range
array_changedif true, array contains different items since last call if false, a new item is selected, but the array is the same
bool pum_drawn ( void  )
true if the popup menu is displayed and drawn on the grid.
int pum_get_height ( void  )

Gets the height of the menu.

the height of the popup menu, the number of entries visible. Only valid when pum_visible() returns TRUE!
void pum_redraw ( void  )

Redraw the popup menu, using "pum_first" and "pum_selected".

void pum_undisplay ( void  )

Undisplay the popup menu (later).

bool pum_visible ( void  )
true if the popup menu is displayed.