All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

drop-object-collection-index Accessor

Summary

Gets the index and relative place in the collection that an object is being dropped over.

Package

capi

Signatures

drop-object-collection-index drop-object => index, placement

(setf (drop-object-collection-index drop-object) (values new-index new-placement))

Arguments
drop-object
A drop-object, as passed to the drop-callback.
new-index
An integer.
new-placement
One of :above, :item or :below.
Values
index
An integer.
placement
One of :above, :item or :below.
Description

The accessor drop-object-collection-index accesses the index and place relative to that index within the collection that the object drop-object is being dropped over. This information is only meaningful when the pane is an instance of list-panel or tree-view.

The returned value index is the position in the collection (see get-collection-item or choice-selection). The returned value placement indicates whether the user is dropping above, on or below the item at index.

There is also a setf expander that can be called with the values new-index and new-placement within the :drag stage of the operation, to adjust where the user will be allowed to drop the object.

Notes

drop-object-collection-index should only be called within a drop-callback. It is not supported on X11/Motif. See simple-pane for information about drop callbacks.

Examples

For an example illustrating the use of drag and drop in a choice, see:

(example-edit-file "capi/choice/drag-and-drop")
See also

drop-object-collection-item
17 Drag and Drop


CAPI User Guide and Reference Manual (Unix version) - 01 Dec 2021 19:32:42