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

pinboard-object-at-position Generic Function

Summary

Returns the uppermost pinboard object containing a specified point.

Package

capi

Signature

pinboard-object-at-position pinboard x y

Arguments
pinboard
A real.
A real.
Description

The generic function pinboard-object-at-position returns the uppermost pinboard object in pinboard that contains the point specified by x and y. It determines this by mapping over every pinboard object within the pinboard until it finds one for which the generic function over-pinboard-object-p returns t.

Examples
(setq pinboard 
      (capi:contain 
       (make-instance 
        'capi:pinboard-layout)
       :best-width 300
       :best-height 300))
 
(capi:apply-in-pane-process
 pinboard
 #'(lambda ()
     (make-instance 'capi:item-pinboard-object
                    :text "Hello world"
                    :x 100 :y 100
                    :parent pinboard)))
 
(capi:pinboard-object-at-position pinboard 0 0)
 
(capi:pinboard-object-at-position pinboard 110 110)
See also

over-pinboard-object-p
pinboard-object-overlap-p
pinboard-object
pinboard-layout


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