The class titled-pinboard-object
provides a pinboard object with a title. The title is regarded as part of the object in geometry calculations.
titled-pinboard-object
does not allow the value :frame
for the titled-object initarg
title-position
. The values :top
, :bottom
, :left
and :right
are allowed.
This example creates three instances of titled-pinboard-object
and one of item-pinboard-object, all with with a yellow background. Note that:
titled-pinboard-object
, as opposed to the item-pinboard-object. To specify the title background, we pass it in the
title-args
.:visible-min-width
(and other geometric hints) can be used to override this.titled-object-title
of the titled-pinboard-object
does not reset its width.(setq tpo1 (make-instance 'capi:titled-pinboard-object
:graphics-args
'(:background :yellow)
:x 10 :y 10
:width 150 :height 20
:title "Short"
:title-position :left
:title-args
'(:background :red ))
tpo2 (make-instance 'capi:titled-pinboard-object
:graphics-args
'(:background :yellow)
:x 10 :y 40
:width 150 :height 20
:title "Long title"
:title-position :left)
tpo3 (make-instance 'capi:titled-pinboard-object
:graphics-args
'(:background :yellow)
:x 10 :y 70
:width 150 :height 20
:title "Short"
:title-position :left
:title-args
'(:visible-min-width 100))
ipo (make-instance 'capi:item-pinboard-object
:graphics-args
'(:background :yellow)
:x 10 :y 100
:width 150 :height 20
:text "Item Pinboard" ))
(setq pl (capi:contain
(make-instance 'capi:pinboard-layout
:visible-min-width 200
:visible-min-height 200
:description
(list tpo1 tpo2 tpo3 ipo))))
(capi:apply-in-pane-process
pl
#'(lambda()
(setf (capi:titled-object-title tpo1)
"Longer...")))
CAPI User Guide and Reference Manual (Unix version) - 3 Aug 2017