contain element &rest interface-args &key screen process title as-dialog &allow-other-keys => element
A CAPI element.
A screen, or any argument accepted by convert-to-screen.
On GTK+, Microsoft Windows or Motif, a CAPI process, t
or nil
. On Cocoa, this argument is not supported.
A string.
A generalized boolean.
The function contain
creates and displays a container for the CAPI element
element
. contain
returns
element
as its result.
contain
is provided as a convenient way of testing CAPI functionality and is useful mainly during interactive development. Many of the CAPI examples use it.
The container is created using make-container, which can make containers for any of the following classes:
simple-pane
layout
interface
pinboard-object
menu
menu-item
menu-component
cl:list
In the case of a cl:list
, the CAPI tries to see what sort of objects they are and makes an appropriate container. For instance, if they were all simple-panes it would put them into a column-layout.
interface-args
, after removing the arguments
screen
and
process
, are passed to make-container
as the initargs to the interface.
title
is used as the title of the container.
as-dialog
can be nil
, t
or :no-escape-button
. The default value of
as-dialog
is nil
, which means display the interface as an ordinary window using display. When
as-dialog
is true it displays using display-dialog. When
as-dialog
is t
, contain
adds to the interface an escape button which invokes abort-dialog, to ensure that the user does not get stuck with a dialog that cannot be dismissed. When
as-dialog
is :no-escape-button
, it does not add the escape button. Any value of
as-dialog
has the same effect as t
.
The values of the arguments screen and process are passed to display when displaying the container.
(capi:contain (make-instance 'capi:text-input-pane))
(capi:contain (make-instance
'capi:column-layout
:description `("Title:"
,(make-instance
'capi:text-input-pane))))
(capi:contain (make-instance 'capi:menu-item)
:title "Test")
make-container
display
display-dialog
element
Getting Started
The correct thread for CAPI operations
Creating Panes with Your Own Drawing and Input
CAPI User Guide and Reference Manual (Unix version) - 3 Aug 2017