All Manuals > Release Notes and Installation Guide > 12 Release Notes

12.5 New CAPI features

See the CAPI User Guide and Reference Manual for more details of these, unless directed otherwise. This section is not relevant to LispWorks for Mobile Runtime.

12.5.1 Line numbers in editor-pane

The class capi:editor-pane has a new initarg :line-numbers-p to control the display of line numbers and new initargs :line-numbers-background, :line-numbers-foreground, :line-numbers-font, :line-numbers-wrapped-string, :line-numbers-width-string, :line-numbers-separator-thickness, :line-numbers-separator-color, :line-numbers-separator-dash, :line-numbers-right-gap, :line-numbers-highlight-background and :line-numbers-highlight-foreground to specify their appearance.

The new function capi:editor-pane-set-line-numbers-appearance can be used to change the appearance of the line numbers in an existing capi:editor-pane.

The new variables capi:*editor-pane-default-line-numbers-background*, capi:*editor-pane-default-line-numbers-foreground*, capi:*editor-pane-default-line-numbers-font*, capi:*editor-pane-default-line-numbers-wrapped-string*, capi:*editor-pane-default-line-numbers-width-string*, capi:*editor-pane-default-line-numbers-separator-thickness*, capi:*editor-pane-default-line-numbers-separator-color*, capi:*editor-pane-default-line-numbers-separator-dash*, capi:*editor-pane-default-line-numbers-right-gap*, capi:*editor-pane-default-line-numbers-highlight-background* and capi:*editor-pane-default-line-numbers-highlight-foreground* provide initial values for the appearance of the line numbers.

12.5.2 In-place editing for tree-view and list-panel

The new initarg :editing-callback for the class capi:collection allows in-place editing of items in a capi:tree-view or capi:list-panel.

The new functions capi:collection-item-get-editing-string, capi:collection-item-set-editing-string get and set the current in-place editing string.

The new function capi:collection-item-edit starts an in-place editing operation.

12.5.3 Support for GTK+ 3

The CAPI now supports GTK+ 3 if it is available. By default, LispWorks uses GTK+ 3 if available and uses GTK+ 2 otherwise. See 19.3.1 The version of GTK+ that LispWorks uses in the CAPI User Guide and Reference Manual for more details.

12.5.4 Support for Wayland on GTK+

The CAPI now supports Wayland on GTK+ if it is available.

The new function capi:screen-display-type returns the type of display being used by a screen if you need to distinguish between displaying on X11 or Wayland when using GTK+.

There are some differences between X11 and Wayland:

12.5.5 Forcing dark mode on GTK+

The new function capi:force-dark-mode can be used to tell LispWorks on GTK+ to display as if in dark or not in dark mode.

12.5.6 Scaling graphics for high resolution monitors on Microsoft Windows

The new function win32:set-dpi-awareness allows you to control what happens with scaling when displaying on a high resolution monitor on Microsoft Windows.

12.5.7 Determining scale factor for graphics

The new functions capi:pane-scale-factor and capi:screen-scale-factor can be used find the scale factor of a pane or a screen.

12.5.8 Evaluating forms in a Listener

The new function capi:editor-pane-evaluate-region-in-listener evaluates a region of the buffer in a Listener.

12.5.9 Checking if an interface is currently displayed

The new functions capi:interface-displayed-p, capi:interface-fully-created-p, capi:interface-being-created-p and capi:interface-fully-destroyed-p can be used to determine the creation state of an capi:interface.

12.5.10 Hiding or showing scroll bars

The new function capi:simple-pane-show-scroll-bars can be used to change the visibility of the scroll bars of a pane.

12.5.11 Blocking mouse wheel events

The new function capi:simple-pane-block-mouse-wheel can be used to block or unblock mouse wheel events for a pane.

12.5.12 Closing all interfaces that have been created with contain

The new function capi:quit-all-contain-interfaces tries to quit (by capi:quit-interface) all interfaces that were created using capi:contain or capi:make-container.

12.5.13 Leaving resizble gaps in a layout

The new class capi:dummy-pane can be used to leave resizble gaps between other pane in a layout.

12.5.14 Preventing a pane from being resized except by a layout divider

The x-ratios (or y-ratios) in a capi:grid-layout (and hence capi:row-layout or capi:column-layout) can now contain :fixed, which allows the corresponding child pane to be resized by a divider but not when the user resizes the layout (typically by resizing the whole window).

The new function capi:set-layout-ratios-keeping-fixed can be used to set the ratios of a capi:row-layout or capi:column-layout keeping :fixed items.

The new function capi:set-layout-description-and-ratios can be used to simultaneously set the description and ratios of a capi:row-layout or capi:column-layout, optionally keeping :fixed items.

12.5.15 Recording the positions of layout dividers

The new function !function!capi:grid-layout-get-sizes can be used to create a list of the sizes of the panes in a layout with dividers, which can be recorded for future use.

12.5.16 The armed-image is now implemented for button on Cocoa

The :armed-image initarg is now implemented for the class capi:button on Cocoa, like on other platforms.

12.5.17 Displaying a level indicator on Cocoa

The class capi:slider has a new :level-indicator-style initarg, which makes itr display as a NSLevelIndicator on Cocoa.

12.5.18 The accelerator in a menu-item on Cocoa can now specify just Control-Option

On Cocoa, the :accelerator initarg to capi:menu-item is now allowed to specify just the Control-Option modifiers, without the Accelerator modifier. In previous releases, accelerators without the Accelerator modifier were ignored.

For example:

:accelerator "Control-Option-a"

12.5.19 Aligning the text in text-input-pane

The class capi:text-input-pane has a new initarg :alignment which controls the horizontal alignment of the text in the pane.

12.5.20 Controlling tree-view buttons and lines on Microsoft Windows

On Microsoft Windows, the class capi:tree-view has a new initarg :has-lines, which specifies if the pane has buttons for expanding child nodes and/or lines between nodes, and if these are present for the root nodes. This replaces the :has-root-line initarg, which is not deprecated.

12.5.21 Column resizing improvement on Microsoft Windows

On Microsoft Windows, double clicking on the separator between columns in the header of a multi-column list-panel now resizes the column to fit its contents. Cocoa and GTK already did this.

12.5.22 Horizontal scrolling for tree-view

The :horizontal-scroll initarg now works for capi:tree-view on Microsoft Windows. This has the effect of turning off horizontal scrolling by default. In previous releases, horizontal scrolling was enabled regardless of the value of the :horizontal-scroll initarg.

12.5.23 Controlling the color of in-place completion dialogs

The new generic functions capi:editor-pane-in-place-style, capi:editor-pane-arglist-displayer-style and capi:text-input-pane-in-place-style can be specialized for subclasses of capi:editor-pane and capi:text-input-pane to control the color and font used by in-place completion dialogs and the arglist displayer.

12.5.24 Clipboard and selection functions return a second value

The functions capi:clipboard, capi:clipboard-empty, capi:selection and capi:selection-empty are now documented to return a second value. They have always done this, but it was not documented.


Release Notes and Installation Guide - 25 Feb 2025 19:14:05