|
38 | 38 | print-spec |
39 | 39 | style |
40 | 40 | max-display-items) |
41 | | - "Creates a popup-menu at the cursor position and displays it. Used for things |
42 | | - such as completions. |
| 41 | + "Create a popup-menu and display it. |
43 | 42 |
|
44 | | - - `items`: is a list of anything, but print-spec must be able to turn it into a string. |
| 43 | + By default, create it at the cursor position, but obey the :gravity of STYLE. |
| 44 | +
|
| 45 | + Used for things such as completions. |
| 46 | +
|
| 47 | + - `items`: a list of anything, but PRINT-SPEC must be able to turn it into a string. |
45 | 48 | - `action-callback`: function taking an item (from `items`) as a parameter. It is run once an item is selected. |
46 | | - - `print-spec`: A function taking an `item` as a paremeter and returns it's string representation. |
47 | | - - `style`: No Documentation |
48 | | - - `max-display-items`: integer limiting the number of items that can be displayed at once." |
| 49 | + - `print-spec`: a function taking an `item` as a paremeter and returning its string representation. |
| 50 | + - style: a STYLE struct or a plist of args that is applied to MAKE-STYLE. Defaults to *STYLE*: uses borders and has no offset on the Y axis. |
| 51 | +
|
| 52 | + Example: '(:use-border t :offset-y 0) |
| 53 | +
|
| 54 | + Other properties include: :gravity (default: :cursor), :background-color, :offset-x, :cursor-invisible, :shape. |
| 55 | +
|
| 56 | + Other gravity possibilities are (see `ensure-gravity`): |
| 57 | +
|
| 58 | + :center |
| 59 | + :top-display |
| 60 | + :bottom-display |
| 61 | + :top |
| 62 | + :topright |
| 63 | + :cursor |
| 64 | + :follow-cursor |
| 65 | + :mouse-cursor |
| 66 | + :vertically-adjacent-window |
| 67 | + :vertically-adjacent-window-dynamic |
| 68 | + :horizontally-adjacent-window |
| 69 | + :horizontally-above-window |
| 70 | +
|
| 71 | + - `max-display-items`: an integer limiting the number of items that can be displayed at once." |
49 | 72 | (declare (ignore action-callback print-spec style max-display-items)) |
50 | 73 | (apply #'lem-if:display-popup-menu (implementation) |
51 | 74 | items |
|
0 commit comments