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

NextPrevUpTopContentsIndex

titled-pinboard-object

Class
Summary

A pinboard object with a title.

Package

capi

Superclasses

pinboard-object
titled-object

Subclasses

image-pinboard-object

Description

The class titled-pinboard-object provides a pinboard object with a title. The title is regarded as part of the object in geometry calculations.

Notes

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.

Example

This example creates three instances of titled-pinboard-object and one of item-pinboard-object, all with with a yellow background. Note that:

  1. The title does not have the yellow background in the titled-pinboard-object, as opposed to the item-pinboard-object. To specify the title background, we pass it in the title-args .
  2. The width of the title area is determined by the title, but passing :visible-min-width (and other geometric hints) can be used to override this.
  3. Setting the 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...")))
See also

item-pinboard-object
Creating graphical objects


CAPI User Guide and Reference Manual (Unix version) - 3 Aug 2017

NextPrevUpTopContentsIndex