NextPrevUpTopContentsIndex

titled-object

Class
Summary

The class titled-object is a mixin class which provides support for decorating a pane with a title (a piece of text positioned next to the pane) and with a message (a piece of text below the pane).

Package

capi

Subclasses

interface
layout
title-pane
display-pane
text-input-pane
toolbar
button-panel
list-panel
option-pane
progress-bar
output-pane
slider

Initargs

:title

A title string for the pane (or nil ).

:title-args

Initargs to the title make-instance .

:title-font

The font used for the title.

:title-position

The position of the title.

:title-adjust

How to adjust the title relative to the pane.

:title-gap

The gap between the title and the pane.

:message

A message string for the pane (or nil ).

:mnemonic-title

A string specifying the title and a mnemonic. Applies only to the subclasses specified below.

:message-gap

The gap between the message and the pane.

Accessors

titled-object-title
titled-object-title-font
titled-object-message
titled-object-message-font

Description

The titled pane makes its title decoration from a title-pane and the message decoration from a message-pane.

The text of the title-pane is passed via the titled-object initarg title and the text of the message-pane is passed via the titled-object initarg message .

The initargs and font for the title-pane are passed via the titled-object initargs title-args and title-font respectively.

title-gap specifies the size in pixels of the gap between the title and the pane. The default value of title-gap is 3.

For subclasses other than interface, the font used for the message can be found by titled-object-message-font and set by (setf titled-object-message-font).

message-gap specifies the size in pixels of the gap between the message and the pane. The default value of message-gap is 3.

The message is always placed below the pane, but the title's position can be adjusted by specifying title-position which can be any of the following.

:left

Place the title to the left of the pane.

:right

Place the title to the right of the pane.

:top

Place the title above the pane.

:bottom

Place the title below the pane.

:frame

Place the title in a frame around the pane.

The title-adjust slot is used to adjust the title so that it is left justified, right justified or centered. The value of title-adjust can be any of the values accepted by the function pane-adjusted-offset, which are :left , :right , :top , :bottom , :center and :centre .

mnemonic-title offers an alternate way to provide the pane's title, and with a mnemonic. It takes effect only for button-panel, list-panel, list-view, option-pane, output-pane, progress-bar, scroll-bar, slider, text-input-pane, text-input-range, tree-view and their subclasses, and is interpreted as described for menu.

Note: titles and mnemonic titles can now be added in a grid-layout.

Examples

Try each of these examples to see some of the effects that titled panes can produce. Note that text-input-pane is a subclass of titled-object , and that it has a default title-position of :left .

(capi:contain (make-instance 'capi:text-input-pane))
(capi:contain (make-instance 'capi:text-input-pane
                              :title "Enter some text:"))
(capi:contain (make-instance 
               'capi:text-input-pane
               :title "Enter some text:"
               :title-position :top))
(capi:contain (make-instance 'capi:text-input-pane
                              :title "Enter some text:"
                              :title-position :top
                              :title-adjust :center))
(capi:contain (make-instance 'capi:text-input-pane
                             :title "Enter some text:"
                             :title-position :top
                             :title-adjust :right))
(capi:contain (make-instance 'capi:text-input-pane
                              :message "A message"))
(capi:contain (make-instance 'capi:text-input-pane
                              :message "A message"
                              :title "Enter some text:"))
(capi:contain (make-instance 'capi:text-input-pane
                             :title "Enter some text:"
                             :title-args
                              '(:foreground :red)))
Compatibility Note

titled-object corresponds to the LispWorks 4.1 class titled-pane . For backwards compatibility the accessors titled-pane-title and titled-pane-message , including setf methods, are provided. These simply trampoline to titled-object-title and titled-object-message , and may not be supported in future releases.

See also

message-pane
title-pane


LispWorks CAPI Reference Manual - 25 Jul 2006

NextPrevUpTopContentsIndex