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).
interface
layout
title-pane
display-pane
text-input-pane
toolbar
button-panel
list-panel
option-pane
progress-bar
output-pane
slider
A title string for the current pane (or nil
).
Keyword arguments to the title make-instance.
The font used for the title.
How to adjust the title relative to the pane.
A message string for the current pane (or nil
).
Keyword arguments to the message make-instance
.
The font used for the message.
titled-object-title
titled-object-title-font
titled-object-message
titled-object-message-font
The titled pane makes its decorations from title panes, and their look can be changed with the arguments title-args
and message-args
.
The message is always placed below the pane, but the title's position can be adjusted by specifying a title position which can be any of the following.
Place the title to the left of the pane.
Place the title to the right of the pane.
Place the title above the pane.
Place the title below the pane.
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
.
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)))
titled-object
corresponds to the LispWorks 4.1 class titled-pane
. For backwards compatibility the accessors titled-pane-title
and titled-pane-message
are provided.