NextPrevUpTopContentsIndex

pinboard-pane-position

Generic Function
Summary

Gets and sets the location of an object inside its parent pinboard-layout.

Package

capi

Signature

pinboard-pane-position self => x , y

Signature

(setf pinboard-pane-position) x , y self => x , y

Arguments

self

A pinboard-object or simple-pane.

Values

x , y

The horizontal and vertical coordinates in the pinboard-layout parent of self .

Description

The generic function pinboard-pane-position returns as multiple values x , y the coordinates of self inside its parent pinboard-layout.

(setf pinboard-pane-position) sets the location of self in its parent.

Examples
(let* ((po (make-instance 'capi:item-pinboard-object 
                          :text "5x5" :x 5 :y 5
                          :graphics-args 
                          '(:background :red)))
       (pl (capi:contain 
            (make-instance 'capi:pinboard-layout 
                           :description (list po)
                           :visible-min-width 200
                           :visible-min-height 200))))
  (capi:execute-with-interface
   (capi:element-interface pl)
   #'(lambda (po)
       (dotimes (x 20)
         (mp:wait-processing-events 1)
         (let ((new-x (* (1+ x) 10))
               (new-y (* 5 (+ 2 x))))
           (setf (capi:item-text po)
                 (format nil "~ax~a" new-x new-y))
           (setf (capi:pinboard-pane-position po)
                 (values new-x new-y)))))
   po))
See also

pinboard-layout
pinboard-pane-size


LispWorks CAPI Reference Manual - 25 Jul 2006

NextPrevUpTopContentsIndex